diff --git a/scripts/ci_test_printers.sh b/scripts/ci_test_printers.sh index 3306c134e2..0214484ab7 100755 --- a/scripts/ci_test_printers.sh +++ b/scripts/ci_test_printers.sh @@ -1,34 +1,9 @@ #!/usr/bin/env bash -### Test printer +### Test the EVM printer -cd tests/e2e/solc_parsing/test_data/compile/ || exit - -# Do not test the evm printer,as it needs a refactoring -ALL_PRINTERS="cfg,constructor-calls,contract-summary,data-dependency,echidna,function-id,function-summary,modifiers,call-graph,halstead,human-summary,inheritance,inheritance-graph,loc,martin,slithir,slithir-ssa,vars-and-auth,require,variable-order,declaration,ck" - -# Only test 0.5.17 to limit test time -for file in *0.5.17-compact.zip; do - if ! slither "$file" --print "$ALL_PRINTERS" ; then - echo "Printer failed" - echo "$file" - exit 1 - fi -done - -# Only test 0.8.12 to limit test time -for file in *0.8.12-compact.zip; do - if ! slither "$file" --print "declaration" ; then - echo "Printer failed" - echo "$file" - exit 1 - fi -done - -cd ../../.. || exit -# Needed for evm printer pip install evm-cfg-builder solc-select use "0.5.1" if ! slither examples/scripts/test_evm_api.sol --print evm; then echo "EVM printer failed" -fi +fi \ No newline at end of file diff --git a/slither/printers/call/call_graph.py b/slither/printers/call/call_graph.py index 38225e6d7a..29a2213a0c 100644 --- a/slither/printers/call/call_graph.py +++ b/slither/printers/call/call_graph.py @@ -74,7 +74,7 @@ def _process_internal_call( def _render_external_calls(external_calls: Set[str]) -> str: - return "\n".join(external_calls) + return "\n".join(sorted(external_calls)) def _render_internal_calls( @@ -87,8 +87,8 @@ def _render_internal_calls( lines.append(f"subgraph {_contract_subgraph(contract)} {{") lines.append(f'label = "{contract.name}"') - lines.extend(contract_functions[contract]) - lines.extend(contract_calls[contract]) + lines.extend(sorted(contract_functions[contract])) + lines.extend(sorted(contract_calls[contract])) lines.append("}") @@ -101,8 +101,8 @@ def _render_solidity_calls(solidity_functions: Set[str], solidity_calls: Set[str lines.append("subgraph cluster_solidity {") lines.append('label = "[Solidity]"') - lines.extend(solidity_functions) - lines.extend(solidity_calls) + lines.extend(sorted(solidity_functions)) + lines.extend(sorted(solidity_calls)) lines.append("}") @@ -205,7 +205,7 @@ def _process_functions(functions: Sequence[Function]) -> str: ) render_internal_calls = "" - for contract in all_contracts: + for contract in sorted(all_contracts, key=lambda x: x.name): render_internal_calls += _render_internal_calls( contract, contract_functions, contract_calls ) @@ -230,16 +230,12 @@ def output(self, filename: str) -> Output: filename(string) """ - all_contracts_filename = "" - if not filename.endswith(".dot"): - if filename in ("", "."): - filename = "" - else: - filename += "." - all_contracts_filename = f"{filename}all_contracts.call-graph.dot" - - if filename == ".dot": - all_contracts_filename = "all_contracts.dot" + if filename in ("", "."): + all_contracts_filename = "all_contracts.call-graph.dot" + elif not filename.endswith(".dot"): + all_contracts_filename = f"{filename}.all_contracts.call-graph.dot" + else: + all_contracts_filename = filename info = "" results = [] @@ -256,7 +252,7 @@ def output(self, filename: str) -> Output: } content = "\n".join( ["strict digraph {"] - + [_process_functions(list(all_functions_as_dict.values()))] + + [_process_functions(sorted(all_functions_as_dict.values(), key=lambda x: x.name))] + ["}"] ) f.write(content) diff --git a/slither/printers/guidance/echidna.py b/slither/printers/guidance/echidna.py index 0c47fa0f98..45a79c67f9 100644 --- a/slither/printers/guidance/echidna.py +++ b/slither/printers/guidance/echidna.py @@ -156,15 +156,8 @@ def _extract_assert(contracts: List[Contract]) -> Dict[str, Dict[str, List[Dict] # Create a named tuple that is serialization in json def json_serializable(cls): - # pylint: disable=unnecessary-comprehension - # TODO: the next line is a quick workaround to prevent pylint from crashing - # It can be removed once https://github.com/PyCQA/pylint/pull/3810 is merged - my_super = super - def as_dict(self): - yield { - name: value for name, value in zip(self._fields, iter(my_super(cls, self).__iter__())) - } + yield dict(zip(self._fields, super(cls, self).__iter__())) cls.__iter__ = as_dict return cls @@ -263,13 +256,15 @@ def _extract_constants( context_explored, ) - # Note: use list(set()) instead of set - # As this is meant to be serialized in JSON, and JSON does not support set + # Note: use sorted(set()) instead of set + # As this is meant to be serialized in JSON, and JSON does not support set. Moreover, + # we want stable results so the printer output is always the same for the same file if all_cst_used: - ret_cst_used[contract.name][_get_name(function)] = list(set(all_cst_used)) + ret_cst_used[contract.name][_get_name(function)] = sorted(set(all_cst_used)) if all_cst_used_in_binary: ret_cst_used_in_binary[contract.name][_get_name(function)] = { - k: list(set(v)) for k, v in all_cst_used_in_binary.items() + k: sorted(set(all_cst_used_in_binary[k])) + for k in sorted(all_cst_used_in_binary) } return ret_cst_used, ret_cst_used_in_binary @@ -315,7 +310,7 @@ def _have_external_calls(contracts: List[Contract]) -> Dict[str, List[str]]: if function.all_high_level_calls() or function.all_low_level_calls(): ret[contract.name].append(_get_name(function)) if contract.name in ret: - ret[contract.name] = list(set(ret[contract.name])) + ret[contract.name] = sorted(set(ret[contract.name])) return ret @@ -334,7 +329,7 @@ def _use_balance(contracts: List[Contract]) -> Dict[str, List[str]]: ): ret[contract.name].append(_get_name(function)) if contract.name in ret: - ret[contract.name] = list(set(ret[contract.name])) + ret[contract.name] = sorted(set(ret[contract.name])) return ret @@ -441,9 +436,9 @@ def output(self, filename: str) -> Output: # pylint: disable=too-many-locals use_balance = _use_balance(contracts) - with_fallback = list(_with_fallback(contracts)) + with_fallback = sorted(_with_fallback(contracts)) - with_receive = list(_with_receive(contracts)) + with_receive = sorted(_with_receive(contracts)) d = { "payable": payable, diff --git a/slither/slither.py b/slither/slither.py index 7adc0694ca..e32fd7b45e 100644 --- a/slither/slither.py +++ b/slither/slither.py @@ -11,7 +11,6 @@ from slither.printers.abstract_printer import AbstractPrinter from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc from slither.vyper_parsing.vyper_compilation_unit import VyperCompilationUnit -from slither.utils.output import Output from slither.vyper_parsing.ast.ast import parse logger = logging.getLogger("Slither") @@ -294,7 +293,7 @@ def run_detectors(self) -> List[Dict]: self.write_results_to_hide() return results - def run_printers(self) -> List[Output]: + def run_printers(self) -> List[Dict]: """ :return: List of registered printers outputs. """ diff --git a/tests/e2e/printers/README.md b/tests/e2e/printers/README.md new file mode 100644 index 0000000000..81095802f4 --- /dev/null +++ b/tests/e2e/printers/README.md @@ -0,0 +1,21 @@ +# Testing printers + +The printers are tested with files from the test data of `solc_parsing/compile` directory. + +They are automatically detected if added to the `all_detectors` element in `Slither`. + +## Snapshots + +The snapshots are generated using [pytest-insta](https://github.com/vberlier/pytest-insta). + +To update snapshots, run: + +```shell +pytest tests/e2e/printers/test_printers.py --insta update +``` + +This will create text files in `tests/e2e/printers/snapshots/` containing the expected output of printers. + + + + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..17765225d6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,21 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_29_C { +label = "C" +"29_f" [label="f"] +"29_f" -> "29_a" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_29_C { +label = "C" +"29_f" [label="f"] +"29_f" -> "29_a" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..b63f7c1acc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,42 @@ +Export tmp.zip-C-f().dot +Export tmp.zip-C-a().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->5; +1[label="Node Type: INLINE ASM 1 +"]; +1->2; +2[label="Node Type: END INLINE ASM 2 +"]; +2->3; +3[label="Node Type: INLINE ASM 3 +"]; +3->4; +4[label="Node Type: END INLINE ASM 4 +"]; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +a() + +IRs: +MODIFIER_CALL, C.a()()"]; +5->1; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: INLINE ASM 1 +"]; +1->2; +2[label="Node Type: END INLINE ASM 2 +"]; +2->3; +3[label="Node Type: _ 3 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..194f61d51a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 0 | +| TOTAL | 1 | 1 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..b671873af5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,17 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function a() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..3758b441f4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/e2e/solc_parsing/test_data/assembly-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/e2e/solc_parsing/test_data/assembly-all.sol#9 (14 - 16) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/assembly-all.sol#9-17 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..6c15e4a5c7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,5 @@ +Export tmp.zip-C-f().dot +Export tmp.zip-C-a().dot + +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..c910668762 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,27 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..629aebac16 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,17 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | ['a'] | [] | [] | ['a'] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| a() | internal | [] | [] | [] | [] | 1 | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..c9048be785 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 1 | 1 | 1 | 1 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 2 | 2 | 0 | 2 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 1 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..937b1a21c5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 16 +Number of assembly lines: 2 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..309632b598 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c29_C[shape="box"label=<
C
Public Functions:
f()
Modifiers:
a()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..043a7adfc8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 18 | +| sloc | 0 | 0 | 16 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 34 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..3d9417aa93 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | ['a'] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..4cf86cd014 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,7 @@ +Contract C + Function C.f() (*) + Expression: a() + IRs: + MODIFIER_CALL, C.a()() + Modifier C.a() + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..cdbde357f7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,21 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_14_C { +label = "C" +"14_f" [label="f"] +"14_f" -> "14_a" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_14_C { +label = "C" +"14_f" [label="f"] +"14_f" -> "14_a" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..0b1ec35470 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,75 @@ +Export tmp.zip-C-f().dot +Export tmp.zip-C-a().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->9; +1[label="Node Type: INLINE ASM 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +x_f_asm_0 = 0 + +IRs: +x_f_asm_0(uint256) := 0(uint256)"]; +3->4; +4[label="Node Type: END INLINE ASM 4 +"]; +4->5; +5[label="Node Type: INLINE ASM 5 +"]; +5->6; +6[label="Node Type: NEW VARIABLE 6 +"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +x_f_asm_1 = 0 + +IRs: +x_f_asm_1(uint256) := 0(uint256)"]; +7->8; +8[label="Node Type: END INLINE ASM 8 +"]; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +a() + +IRs: +MODIFIER_CALL, C.a()()"]; +9->1; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: INLINE ASM 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +y_a_asm_0 = 0 + +IRs: +y_a_asm_0(uint256) := 0(uint256)"]; +3->4; +4[label="Node Type: END INLINE ASM 4 +"]; +4->5; +5[label="Node Type: _ 5 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..194f61d51a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 0 | +| TOTAL | 1 | 1 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..b671873af5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,17 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function a() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..3758b441f4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/e2e/solc_parsing/test_data/assembly-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/e2e/solc_parsing/test_data/assembly-all.sol#9 (14 - 16) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/assembly-all.sol#9-17 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..6c15e4a5c7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,5 @@ +Export tmp.zip-C-f().dot +Export tmp.zip-C-a().dot + +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..4994912022 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,38 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..629aebac16 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,17 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | ['a'] | [] | [] | ['a'] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| a() | internal | [] | [] | [] | [] | 1 | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..e2e81d7c05 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 3 | 2 | 5 | 4 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 6 | 8 | 10 | 21 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 1 | 26 | 1 | 0.003 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..ea98958ae3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 16 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..f82ab8e313 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c14_C[shape="box"label=<
C
Public Functions:
f()
Modifiers:
a()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..043a7adfc8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 18 | +| sloc | 0 | 0 | 16 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 34 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..3d9417aa93 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | ['a'] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..0ea9968ee8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,16 @@ +Contract C + Function C.f() (*) + Expression: x_f_asm_0 = 0 + IRs: + x_f_asm_0(uint256) := 0(uint256) + Expression: x_f_asm_1 = 0 + IRs: + x_f_asm_1(uint256) := 0(uint256) + Expression: a() + IRs: + MODIFIER_CALL, C.a()() + Modifier C.a() + Expression: y_a_asm_0 = 0 + IRs: + y_a_asm_0(uint256) := 0(uint256) + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assembly_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..966c690602 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_105_C { +label = "C" +"105_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_105_C { +label = "C" +"105_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..528472a5c2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,98 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +assign = 10 + +IRs: +assign(uint256) := 10(uint256)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +assign |= 10 + +IRs: +assign(uint256) = assign | 10"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +assign ^= 10 + +IRs: +assign(uint256) = assign ^ 10"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +assign &= 10 + +IRs: +assign(uint256) = assign & 10"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +assign <<= 10 + +IRs: +assign(uint256) = assign << 10"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +assign >>= 10 + +IRs: +assign(uint256) = assign >> 10"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +assign += 10 + +IRs: +assign(uint256) = assign + 10"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +assign -= 10 + +IRs: +assign(uint256) = assign - 10"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +assign *= 10 + +IRs: +assign(uint256) = assign * 10"]; +10->11; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +assign /= 10 + +IRs: +assign(uint256) = assign / 10"]; +11->12; +12[label="Node Type: EXPRESSION 12 + +EXPRESSION: +assign %= 10 + +IRs: +assign(uint256) = assign % 10"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..dfcc916dfc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,13 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| assign | ['assign'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..d9b5cebc09 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/assignment-0.4.7.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/assignment-0.4.7.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/assignment-0.4.7.sol#2-16 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..983cdb4972 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,127 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.AND": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.CARET": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.DIVISION": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.LEFT_SHIFT": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.MODULO": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.MULTIPLICATION": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.OR": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.RIGHT_SHIFT": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.SUBTRACTION": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..69f52dafb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..9a5afc3aa7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 11 | 11 | 32 | 2 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 13 | 43 | 40 | 159 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 88 | 14002 | 778 | 0.194 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..ea98958ae3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 16 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..91adee3375 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c105_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..b9ca113208 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 17 | +| sloc | 0 | 0 | 16 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 33 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..26dbd229ed --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,36 @@ +Contract C + Function C.f() (*) + Expression: assign = 10 + IRs: + assign(uint256) := 10(uint256) + Expression: assign |= 10 + IRs: + assign(uint256) = assign | 10 + Expression: assign ^= 10 + IRs: + assign(uint256) = assign ^ 10 + Expression: assign &= 10 + IRs: + assign(uint256) = assign & 10 + Expression: assign <<= 10 + IRs: + assign(uint256) = assign << 10 + Expression: assign >>= 10 + IRs: + assign(uint256) = assign >> 10 + Expression: assign += 10 + IRs: + assign(uint256) = assign + 10 + Expression: assign -= 10 + IRs: + assign(uint256) = assign - 10 + Expression: assign *= 10 + IRs: + assign(uint256) = assign * 10 + Expression: assign /= 10 + IRs: + assign(uint256) = assign / 10 + Expression: assign %= 10 + IRs: + assign(uint256) = assign % 10 + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..5f6f8de87d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_52_C { +label = "C" +"52_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_52_C { +label = "C" +"52_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..aafa980843 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,98 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +assign = 10 + +IRs: +assign(uint256) := 10(uint256)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +assign |= 10 + +IRs: +assign(uint256) = assign | 10"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +assign ^= 10 + +IRs: +assign(uint256) = assign ^ 10"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +assign &= 10 + +IRs: +assign(uint256) = assign & 10"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +assign <<= 10 + +IRs: +assign(uint256) = assign << 10"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +assign >>= 10 + +IRs: +assign(uint256) = assign >> 10"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +assign += 10 + +IRs: +assign(uint256) = assign (c)+ 10"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +assign -= 10 + +IRs: +assign(uint256) = assign (c)- 10"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +assign *= 10 + +IRs: +assign(uint256) = assign (c)* 10"]; +10->11; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +assign /= 10 + +IRs: +assign(uint256) = assign (c)/ 10"]; +11->12; +12[label="Node Type: EXPRESSION 12 + +EXPRESSION: +assign %= 10 + +IRs: +assign(uint256) = assign % 10"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..dfcc916dfc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,13 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| assign | ['assign'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..d9b5cebc09 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/assignment-0.4.7.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/assignment-0.4.7.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/assignment-0.4.7.sol#2-16 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..a6eac7984b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,127 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.AND": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.CARET": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.DIVISION": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.LEFT_SHIFT": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.MODULO": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.MULTIPLICATION": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.OR": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.RIGHT_SHIFT": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.SUBTRACTION": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..69f52dafb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..9a5afc3aa7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 11 | 11 | 32 | 2 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 13 | 43 | 40 | 159 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 88 | 14002 | 778 | 0.194 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..ea98958ae3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 16 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..9bd215274f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c52_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..b9ca113208 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 17 | +| sloc | 0 | 0 | 16 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 33 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..847d425005 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,36 @@ +Contract C + Function C.f() (*) + Expression: assign = 10 + IRs: + assign(uint256) := 10(uint256) + Expression: assign |= 10 + IRs: + assign(uint256) = assign | 10 + Expression: assign ^= 10 + IRs: + assign(uint256) = assign ^ 10 + Expression: assign &= 10 + IRs: + assign(uint256) = assign & 10 + Expression: assign <<= 10 + IRs: + assign(uint256) = assign << 10 + Expression: assign >>= 10 + IRs: + assign(uint256) = assign >> 10 + Expression: assign += 10 + IRs: + assign(uint256) = assign (c)+ 10 + Expression: assign -= 10 + IRs: + assign(uint256) = assign (c)- 10 + Expression: assign *= 10 + IRs: + assign(uint256) = assign (c)* 10 + Expression: assign /= 10 + IRs: + assign(uint256) = assign (c)/ 10 + Expression: assign %= 10 + IRs: + assign(uint256) = assign % 10 + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_assignment_0_4_7_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..b84d1a5a28 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_163_C { +label = "C" +"163_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_163_C { +label = "C" +"163_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..6efccf2264 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,159 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +1 ** 2 + +IRs: +TMP_0(uint256) = 1 ** 2"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +1 * 2 + +IRs: +TMP_1(uint256) = 1 * 2"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +1 / 2 + +IRs: +TMP_2(uint256) = 1 / 2"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +1 & 2 + +IRs: +TMP_3(uint256) = 1 & 2"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +1 + 2 + +IRs: +TMP_4(uint256) = 1 + 2"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +1 - 2 + +IRs: +TMP_5(uint256) = 1 - 2"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +1 << 2 + +IRs: +TMP_6(uint256) = 1 << 2"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +1 >> 2 + +IRs: +TMP_7(uint256) = 1 >> 2"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +1 & 2 + +IRs: +TMP_8(uint256) = 1 & 2"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +1 ^ 2 + +IRs: +TMP_9(uint256) = 1 ^ 2"]; +10->11; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +1 | 2 + +IRs: +TMP_10(uint256) = 1 | 2"]; +11->12; +12[label="Node Type: EXPRESSION 12 + +EXPRESSION: +1 < 2 + +IRs: +TMP_11(bool) = 1 < 2"]; +12->13; +13[label="Node Type: EXPRESSION 13 + +EXPRESSION: +1 > 2 + +IRs: +TMP_12(bool) = 1 > 2"]; +13->14; +14[label="Node Type: EXPRESSION 14 + +EXPRESSION: +1 <= 2 + +IRs: +TMP_13(bool) = 1 <= 2"]; +14->15; +15[label="Node Type: EXPRESSION 15 + +EXPRESSION: +1 >= 2 + +IRs: +TMP_14(bool) = 1 >= 2"]; +15->16; +16[label="Node Type: EXPRESSION 16 + +EXPRESSION: +1 == 2 + +IRs: +TMP_15(bool) = 1 == 2"]; +16->17; +17[label="Node Type: EXPRESSION 17 + +EXPRESSION: +1 != 2 + +IRs: +TMP_16(bool) = 1 != 2"]; +17->18; +18[label="Node Type: EXPRESSION 18 + +EXPRESSION: +true && false + +IRs: +TMP_17(bool) = True && False"]; +18->19; +19[label="Node Type: EXPRESSION 19 + +EXPRESSION: +true || false + +IRs: +TMP_18(bool) = True || False"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..5e49435671 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..925e65d6ae --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/binaryoperation-0.4.7.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/binaryoperation-0.4.7.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/binaryoperation-0.4.7.sol#2-22 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..780facdc10 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,341 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ], + [ + { + "value": "4", + "type": "uint256" + } + ], + [ + { + "value": "False", + "type": "bool" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.AND": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.ANDAND": [ + [ + { + "value": "False", + "type": "bool" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ], + "BinaryType.CARET": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.DIVISION": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.EQUAL": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.GREATER": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.GREATER_EQUAL": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.LEFT_SHIFT": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.LESS_EQUAL": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.MULTIPLICATION": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.NOT_EQUAL": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.OR": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.OROR": [ + [ + { + "value": "False", + "type": "bool" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ], + "BinaryType.POWER": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.RIGHT_SHIFT": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.SUBTRACTION": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..69f52dafb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..4f94878444 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 19 | 18 | 38 | 3 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 21 | 57 | 80 | 250 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 114 | 28541 | 1586 | 0.311 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..f6f4f438df --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 23 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..eeeef63227 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c163_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..589d2c8360 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 24 | +| sloc | 0 | 0 | 23 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 47 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..6beace010a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,60 @@ +Contract C + Function C.f() (*) + Expression: 1 ** 2 + IRs: + TMP_0(uint256) = 1 ** 2 + Expression: 1 * 2 + IRs: + TMP_1(uint256) = 1 * 2 + Expression: 1 / 2 + IRs: + TMP_2(uint256) = 1 / 2 + Expression: 1 & 2 + IRs: + TMP_3(uint256) = 1 & 2 + Expression: 1 + 2 + IRs: + TMP_4(uint256) = 1 + 2 + Expression: 1 - 2 + IRs: + TMP_5(uint256) = 1 - 2 + Expression: 1 << 2 + IRs: + TMP_6(uint256) = 1 << 2 + Expression: 1 >> 2 + IRs: + TMP_7(uint256) = 1 >> 2 + Expression: 1 & 2 + IRs: + TMP_8(uint256) = 1 & 2 + Expression: 1 ^ 2 + IRs: + TMP_9(uint256) = 1 ^ 2 + Expression: 1 | 2 + IRs: + TMP_10(uint256) = 1 | 2 + Expression: 1 < 2 + IRs: + TMP_11(bool) = 1 < 2 + Expression: 1 > 2 + IRs: + TMP_12(bool) = 1 > 2 + Expression: 1 <= 2 + IRs: + TMP_13(bool) = 1 <= 2 + Expression: 1 >= 2 + IRs: + TMP_14(bool) = 1 >= 2 + Expression: 1 == 2 + IRs: + TMP_15(bool) = 1 == 2 + Expression: 1 != 2 + IRs: + TMP_16(bool) = 1 != 2 + Expression: true && false + IRs: + TMP_17(bool) = True && False + Expression: true || false + IRs: + TMP_18(bool) = True || False + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..7967e2561c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_81_C { +label = "C" +"81_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_81_C { +label = "C" +"81_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..4ef3856174 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,159 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +1 ** 2 + +IRs: +TMP_0(uint256) = 1 (c)** 2"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +1 * 2 + +IRs: +TMP_1(uint256) = 1 (c)* 2"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +1 / 2 + +IRs: +TMP_2(uint256) = 1 (c)/ 2"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +1 & 2 + +IRs: +TMP_3(uint256) = 1 & 2"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +1 + 2 + +IRs: +TMP_4(uint256) = 1 (c)+ 2"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +1 - 2 + +IRs: +TMP_5(uint256) = 1 (c)- 2"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +1 << 2 + +IRs: +TMP_6(uint256) = 1 << 2"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +1 >> 2 + +IRs: +TMP_7(uint256) = 1 >> 2"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +1 & 2 + +IRs: +TMP_8(uint256) = 1 & 2"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +1 ^ 2 + +IRs: +TMP_9(uint256) = 1 ^ 2"]; +10->11; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +1 | 2 + +IRs: +TMP_10(uint256) = 1 | 2"]; +11->12; +12[label="Node Type: EXPRESSION 12 + +EXPRESSION: +1 < 2 + +IRs: +TMP_11(bool) = 1 < 2"]; +12->13; +13[label="Node Type: EXPRESSION 13 + +EXPRESSION: +1 > 2 + +IRs: +TMP_12(bool) = 1 > 2"]; +13->14; +14[label="Node Type: EXPRESSION 14 + +EXPRESSION: +1 <= 2 + +IRs: +TMP_13(bool) = 1 <= 2"]; +14->15; +15[label="Node Type: EXPRESSION 15 + +EXPRESSION: +1 >= 2 + +IRs: +TMP_14(bool) = 1 >= 2"]; +15->16; +16[label="Node Type: EXPRESSION 16 + +EXPRESSION: +1 == 2 + +IRs: +TMP_15(bool) = 1 == 2"]; +16->17; +17[label="Node Type: EXPRESSION 17 + +EXPRESSION: +1 != 2 + +IRs: +TMP_16(bool) = 1 != 2"]; +17->18; +18[label="Node Type: EXPRESSION 18 + +EXPRESSION: +true && false + +IRs: +TMP_17(bool) = True && False"]; +18->19; +19[label="Node Type: EXPRESSION 19 + +EXPRESSION: +true || false + +IRs: +TMP_18(bool) = True || False"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..5e49435671 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..925e65d6ae --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/binaryoperation-0.4.7.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/binaryoperation-0.4.7.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/binaryoperation-0.4.7.sol#2-22 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..9563f847e8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,341 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ], + [ + { + "value": "4", + "type": "uint256" + } + ], + [ + { + "value": "False", + "type": "bool" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.AND": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.ANDAND": [ + [ + { + "value": "False", + "type": "bool" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ], + "BinaryType.CARET": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.DIVISION": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.EQUAL": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.GREATER": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.GREATER_EQUAL": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.LEFT_SHIFT": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.LESS_EQUAL": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.MULTIPLICATION": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.NOT_EQUAL": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.OR": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.OROR": [ + [ + { + "value": "False", + "type": "bool" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ], + "BinaryType.POWER": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.RIGHT_SHIFT": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.SUBTRACTION": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..69f52dafb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..4f94878444 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 19 | 18 | 38 | 3 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 21 | 57 | 80 | 250 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 114 | 28541 | 1586 | 0.311 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..f6f4f438df --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 23 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..aa7f603d6e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c81_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..589d2c8360 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 24 | +| sloc | 0 | 0 | 23 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 47 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..a45c33fbaa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,60 @@ +Contract C + Function C.f() (*) + Expression: 1 ** 2 + IRs: + TMP_0(uint256) = 1 (c)** 2 + Expression: 1 * 2 + IRs: + TMP_1(uint256) = 1 (c)* 2 + Expression: 1 / 2 + IRs: + TMP_2(uint256) = 1 (c)/ 2 + Expression: 1 & 2 + IRs: + TMP_3(uint256) = 1 & 2 + Expression: 1 + 2 + IRs: + TMP_4(uint256) = 1 (c)+ 2 + Expression: 1 - 2 + IRs: + TMP_5(uint256) = 1 (c)- 2 + Expression: 1 << 2 + IRs: + TMP_6(uint256) = 1 << 2 + Expression: 1 >> 2 + IRs: + TMP_7(uint256) = 1 >> 2 + Expression: 1 & 2 + IRs: + TMP_8(uint256) = 1 & 2 + Expression: 1 ^ 2 + IRs: + TMP_9(uint256) = 1 ^ 2 + Expression: 1 | 2 + IRs: + TMP_10(uint256) = 1 | 2 + Expression: 1 < 2 + IRs: + TMP_11(bool) = 1 < 2 + Expression: 1 > 2 + IRs: + TMP_12(bool) = 1 > 2 + Expression: 1 <= 2 + IRs: + TMP_13(bool) = 1 <= 2 + Expression: 1 >= 2 + IRs: + TMP_14(bool) = 1 >= 2 + Expression: 1 == 2 + IRs: + TMP_15(bool) = 1 == 2 + Expression: 1 != 2 + IRs: + TMP_16(bool) = 1 != 2 + Expression: true && false + IRs: + TMP_17(bool) = True && False + Expression: true || false + IRs: + TMP_18(bool) = True || False + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_binaryoperation_0_4_7_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..3315fc9227 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_145_C { +label = "C" +"145_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_145_C { +label = "C" +"145_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..b40fdd2377 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,164 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +3->13; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_0(bool) = i < 10 +CONDITION TMP_0"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: IF 6 + +EXPRESSION: +i % 2 == 0 + +IRs: +TMP_1(uint256) = i % 2 +TMP_2(bool) = TMP_1 == 0 +CONDITION TMP_2"]; +6->7[label="True"]; +6->8[label="False"]; +7[label="Node Type: BREAK 7 +"]; +7->3; +8[label="Node Type: END_IF 8 +"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +c ++ + +IRs: +TMP_3(uint256) := c(uint256) +c(uint256) = c + 1"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +i ++ + +IRs: +TMP_4(uint256) := i(uint256) +i(uint256) = i + 1"]; +10->5; +11[label="Node Type: BEGIN_LOOP 11 +"]; +11->14; +12[label="Node Type: END_LOOP 12 +"]; +13[label="Node Type: NEW VARIABLE 13 + +EXPRESSION: +j = 0 + +IRs: +j(uint256) := 0(uint256)"]; +13->11; +14[label="Node Type: IF_LOOP 14 + +EXPRESSION: +j < 10 + +IRs: +TMP_5(bool) = j < 10 +CONDITION TMP_5"]; +14->17[label="True"]; +14->12[label="False"]; +15[label="Node Type: BEGIN_LOOP 15 +"]; +15->18; +16[label="Node Type: END_LOOP 16 +"]; +16->24; +17[label="Node Type: NEW VARIABLE 17 + +EXPRESSION: +k = 0 + +IRs: +k(uint256) := 0(uint256)"]; +17->15; +18[label="Node Type: IF_LOOP 18 + +EXPRESSION: +k < 10 + +IRs: +TMP_6(bool) = k < 10 +CONDITION TMP_6"]; +18->19[label="True"]; +18->16[label="False"]; +19[label="Node Type: IF 19 + +EXPRESSION: +j % 2 == 0 && k % 3 == 0 + +IRs: +TMP_7(uint256) = j % 2 +TMP_8(bool) = TMP_7 == 0 +TMP_9(uint256) = k % 3 +TMP_10(bool) = TMP_9 == 0 +TMP_11(bool) = TMP_8 && TMP_10 +CONDITION TMP_11"]; +19->20[label="True"]; +19->21[label="False"]; +20[label="Node Type: BREAK 20 +"]; +20->16; +21[label="Node Type: END_IF 21 +"]; +21->22; +22[label="Node Type: EXPRESSION 22 + +EXPRESSION: +c ++ + +IRs: +TMP_12(uint256) := c(uint256) +c(uint256) = c + 1"]; +22->23; +23[label="Node Type: EXPRESSION 23 + +EXPRESSION: +k ++ + +IRs: +TMP_13(uint256) := k(uint256) +k(uint256) = k + 1"]; +23->18; +24[label="Node Type: EXPRESSION 24 + +EXPRESSION: +j ++ + +IRs: +TMP_14(uint256) := j(uint256) +j(uint256) = j + 1"]; +24->14; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..93150e3fe6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,16 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | +| j | ['j'] | +| k | ['k'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..b6f93f4e7b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/break-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/break-all.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/break-all.sol#2-20 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..1b79ca6989 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,109 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.EQUAL": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.MODULO": [ + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..3064b6f8c2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 6 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..c5309249b4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 28 | 7 | 41 | 9 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 16 | 69 | 48 | 276 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 16 | 4401 | 244 | 0.090 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..6ad79cb083 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 19 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..e94b823150 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c145_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..71aca793c0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 21 | +| sloc | 0 | 0 | 19 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 40 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..b98a304da8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,57 @@ +Contract C + Function C.f() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_0(bool) = i < 10 + CONDITION TMP_0 + Expression: i % 2 == 0 + IRs: + TMP_1(uint256) = i % 2 + TMP_2(bool) = TMP_1 == 0 + CONDITION TMP_2 + Expression: c ++ + IRs: + TMP_3(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: i ++ + IRs: + TMP_4(uint256) := i(uint256) + i(uint256) = i + 1 + Expression: j = 0 + IRs: + j(uint256) := 0(uint256) + Expression: j < 10 + IRs: + TMP_5(bool) = j < 10 + CONDITION TMP_5 + Expression: k = 0 + IRs: + k(uint256) := 0(uint256) + Expression: k < 10 + IRs: + TMP_6(bool) = k < 10 + CONDITION TMP_6 + Expression: j % 2 == 0 && k % 3 == 0 + IRs: + TMP_7(uint256) = j % 2 + TMP_8(bool) = TMP_7 == 0 + TMP_9(uint256) = k % 3 + TMP_10(bool) = TMP_9 == 0 + TMP_11(bool) = TMP_8 && TMP_10 + CONDITION TMP_11 + Expression: c ++ + IRs: + TMP_12(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: k ++ + IRs: + TMP_13(uint256) := k(uint256) + k(uint256) = k + 1 + Expression: j ++ + IRs: + TMP_14(uint256) := j(uint256) + j(uint256) = j + 1 + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..7ea4f440ff --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_72_C { +label = "C" +"72_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_72_C { +label = "C" +"72_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..442d43882c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,164 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +3->13; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_0(bool) = i < 10 +CONDITION TMP_0"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: IF 6 + +EXPRESSION: +i % 2 == 0 + +IRs: +TMP_1(uint256) = i % 2 +TMP_2(bool) = TMP_1 == 0 +CONDITION TMP_2"]; +6->7[label="True"]; +6->8[label="False"]; +7[label="Node Type: BREAK 7 +"]; +7->3; +8[label="Node Type: END_IF 8 +"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +c ++ + +IRs: +TMP_3(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +i ++ + +IRs: +TMP_4(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +10->5; +11[label="Node Type: BEGIN_LOOP 11 +"]; +11->14; +12[label="Node Type: END_LOOP 12 +"]; +13[label="Node Type: NEW VARIABLE 13 + +EXPRESSION: +j = 0 + +IRs: +j(uint256) := 0(uint256)"]; +13->11; +14[label="Node Type: IF_LOOP 14 + +EXPRESSION: +j < 10 + +IRs: +TMP_5(bool) = j < 10 +CONDITION TMP_5"]; +14->17[label="True"]; +14->12[label="False"]; +15[label="Node Type: BEGIN_LOOP 15 +"]; +15->18; +16[label="Node Type: END_LOOP 16 +"]; +16->24; +17[label="Node Type: NEW VARIABLE 17 + +EXPRESSION: +k = 0 + +IRs: +k(uint256) := 0(uint256)"]; +17->15; +18[label="Node Type: IF_LOOP 18 + +EXPRESSION: +k < 10 + +IRs: +TMP_6(bool) = k < 10 +CONDITION TMP_6"]; +18->19[label="True"]; +18->16[label="False"]; +19[label="Node Type: IF 19 + +EXPRESSION: +j % 2 == 0 && k % 3 == 0 + +IRs: +TMP_7(uint256) = j % 2 +TMP_8(bool) = TMP_7 == 0 +TMP_9(uint256) = k % 3 +TMP_10(bool) = TMP_9 == 0 +TMP_11(bool) = TMP_8 && TMP_10 +CONDITION TMP_11"]; +19->20[label="True"]; +19->21[label="False"]; +20[label="Node Type: BREAK 20 +"]; +20->16; +21[label="Node Type: END_IF 21 +"]; +21->22; +22[label="Node Type: EXPRESSION 22 + +EXPRESSION: +c ++ + +IRs: +TMP_12(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +22->23; +23[label="Node Type: EXPRESSION 23 + +EXPRESSION: +k ++ + +IRs: +TMP_13(uint256) := k(uint256) +k(uint256) = k (c)+ 1"]; +23->18; +24[label="Node Type: EXPRESSION 24 + +EXPRESSION: +j ++ + +IRs: +TMP_14(uint256) := j(uint256) +j(uint256) = j (c)+ 1"]; +24->14; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..93150e3fe6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,16 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | +| j | ['j'] | +| k | ['k'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..b6f93f4e7b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/break-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/break-all.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/break-all.sol#2-20 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..6455ea7a7c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,109 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.EQUAL": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.MODULO": [ + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..3064b6f8c2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 6 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..c5309249b4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 28 | 7 | 41 | 9 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 16 | 69 | 48 | 276 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 16 | 4401 | 244 | 0.090 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..6ad79cb083 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 19 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..ce6cc88eb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c72_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..71aca793c0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 21 | +| sloc | 0 | 0 | 19 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 40 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..69a6340099 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,57 @@ +Contract C + Function C.f() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_0(bool) = i < 10 + CONDITION TMP_0 + Expression: i % 2 == 0 + IRs: + TMP_1(uint256) = i % 2 + TMP_2(bool) = TMP_1 == 0 + CONDITION TMP_2 + Expression: c ++ + IRs: + TMP_3(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: i ++ + IRs: + TMP_4(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Expression: j = 0 + IRs: + j(uint256) := 0(uint256) + Expression: j < 10 + IRs: + TMP_5(bool) = j < 10 + CONDITION TMP_5 + Expression: k = 0 + IRs: + k(uint256) := 0(uint256) + Expression: k < 10 + IRs: + TMP_6(bool) = k < 10 + CONDITION TMP_6 + Expression: j % 2 == 0 && k % 3 == 0 + IRs: + TMP_7(uint256) = j % 2 + TMP_8(bool) = TMP_7 == 0 + TMP_9(uint256) = k % 3 + TMP_10(bool) = TMP_9 == 0 + TMP_11(bool) = TMP_8 && TMP_10 + CONDITION TMP_11 + Expression: c ++ + IRs: + TMP_12(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: k ++ + IRs: + TMP_13(uint256) := k(uint256) + k(uint256) = k (c)+ 1 + Expression: j ++ + IRs: + TMP_14(uint256) := j(uint256) + j(uint256) = j (c)+ 1 + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_break_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..42fd56e4dc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,31 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipLog.call-graph.dot +Call Graph: tmp.zipA.call-graph.dot + +strict digraph { +subgraph cluster_27_A { +label = "A" +"27_test" [label="test"] +}subgraph cluster_13_Log { +label = "Log" +"13_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +}"27_test" -> "13_f" +} +strict digraph { +subgraph cluster_13_Log { +label = "Log" +"13_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_27_A { +label = "A" +"27_test" [label="test"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..0f0b520a3b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,27 @@ +Export tmp.zip-Log-f(bytes).dot +Export tmp.zip-Log-f(bytes4).dot +Export tmp.zip-A-test().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +l.f(TESTA) + +IRs: +HIGH_LEVEL_CALL, dest:l(Log), function:f, arguments:['TESTA'] "]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..51ae733c06 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| Log | 0 | 0 | 0 | +| A | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| Log | 0 | 2 | 0 | 0 | +| A | 0 | 0 | 1 | 0 | +| TOTAL | 0 | 2 | 1 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| Log | 2 | 0 | 0 | +| A | 1 | 0 | 0 | +| TOTAL | 3 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| Log | 2 | 2 | 2 | +| A | 0 | 0 | 0 | +| TOTAL | 2 | 2 | 2 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| Log | 0 | 2 | 0 | 0 | 1 | +| A | 1 | 1 | 0 | 0 | 1 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..cccf40f559 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,10 @@ + ++ Contract Log (Most derived contract) + - From Log + - f(bytes) (external) + - f(bytes4) (external) + ++ Contract A (Most derived contract) + - From A + - test() (internal) + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..54eff216e8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,50 @@ + +Contract Log ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(bytes) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function f(bytes4) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract Log ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(bytes) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function f(bytes4) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| l | ['l'] | ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| A.l | ['l'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..fd93ef9781 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,39 @@ + +# Contracts +# Log + - Declaration: tests/ast-parsing/bytes_call.sol#1 (10 - 14) + - Implementation(s): [] + - References: ['tests/ast-parsing/bytes_call.sol#12 (5 - 8)'] + + ## Function + - Log.f(bytes) + - Declaration: tests/ast-parsing/bytes_call.sol#3 (14 - 16) + - Implementation(s): ['tests/ast-parsing/bytes_call.sol#3-4 (5 - 6)'] + - References: ['tests/ast-parsing/bytes_call.sol#14 (9 - 21)'] + - Log.f(bytes4) + - Declaration: tests/ast-parsing/bytes_call.sol#6 (14 - 16) + - Implementation(s): ['tests/ast-parsing/bytes_call.sol#6-7 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# A + - Declaration: tests/ast-parsing/bytes_call.sol#10 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - A.test() + - Declaration: tests/ast-parsing/bytes_call.sol#13 (14 - 19) + - Implementation(s): ['tests/ast-parsing/bytes_call.sol#13-15 (5 - 6)'] + - References: [] + + ## State variables + - l + - Declaration: tests/ast-parsing/bytes_call.sol#12 (9 - 11) + - Implementation: tests/ast-parsing/bytes_call.sol#12 (5 - 10) + - References: ['tests/ast-parsing/bytes_call.sol#14 (9 - 10)'] + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..118abc6ca5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,7 @@ +Export tmp.zip-Log-f(bytes).dot +Export tmp.zip-Log-f(bytes4).dot +Export tmp.zip-A-test().dot + +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..2b2c9a4785 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,37 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "Log": [ + "f(bytes)", + "f(bytes4)" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "Log": { + "f(bytes)": { + "impacts": [], + "is_impacted_by": [] + }, + "f(bytes4)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "A": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..f4f4763beb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,15 @@ + +Log: ++-----------+------------+ +| Name | ID | ++-----------+------------+ +| f(bytes) | 0xd45754f8 | +| f(bytes4) | 0x215f04e1 | ++-----------+------------+ + +A: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..f9ced2cfd4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,32 @@ + +Contract Log +Contract vars: [] +Inheritance:: [] + ++-----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f(bytes) | external | [] | [] | [] | [] | [] | 1 | +| f(bytes4) | external | [] | [] | [] | [] | [] | 1 | ++-----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract A +Contract vars: ['l'] +Inheritance:: [] + ++----------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| test() | internal | [] | ['l'] | [] | [] | ['l.f(TESTA)'] | 1 | ++----------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..bdcef9bcbf --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| Log | 0 | 0 | 0 | 0 | +| A | 1 | 1 | 3 | 3 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| Log | 0 | 0 | 0 | 0 | +| A | 4 | 4 | 5 | 8 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| Log | 0 | 0 | 0 | 0.000 | +| A | 0 | 4 | 0 | 0.001 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..d37d6d563d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 12 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..3f09badd58 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ Log + ++ A + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ Log + ++ A + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..cc836487ba --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c13_Log[shape="box"label=<
Log
Public Functions:
f(bytes)
f(bytes4)
>]; + +c27_A[shape="box"label=<
A
Private Functions:
test()
Private Variables:
l (Log)
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..792ebf4588 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 17 | +| sloc | 0 | 0 | 12 | +| cloc | 0 | 0 | 1 | +| Total | 0 | 0 | 30 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..2a22b3e735 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| Log | 1 | 0 | 0.00 | 0.00 | +| A | 0 | 1 | 1.00 | 1.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..e077dc66c6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,14 @@ + +Contract Log ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | +| f | [] | ++----------+-----------+ +Contract A ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| test | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..5bcc9edf60 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,16 @@ +Constructor and pure/view functions are not displayed + +Log: ++-----------+-------------------+ +| Name | Use whenNotPaused | ++-----------+-------------------+ +| f(bytes) | | +| f(bytes4) | | ++-----------+-------------------+ + +A: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..ca58cd9a57 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,14 @@ + +Contract Log ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | +| f | | ++----------+-------------------+ +Contract A ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| test | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..5d81e975b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,9 @@ +Contract Log + Function Log.f(bytes) (*) + Function Log.f(bytes4) (*) +Contract A + Function A.test() (*) + Expression: l.f(TESTA) + IRs: + HIGH_LEVEL_CALL, dest:l(Log), function:f, arguments:['TESTA'] + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..cd5afffcf7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,14 @@ + +Log: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +A: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ +| A.l | Log | 0 | 0 | ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..ea0e820475 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_bytes_call_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,16 @@ + +Contract Log ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | +| f | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract A ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| test | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..223e40da00 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,25 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot +Call Graph: tmp.zipD.call-graph.dot + +strict digraph { +subgraph cluster_31_D { +label = "D" +"31_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_31_D { +label = "D" +"31_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..049357bc25 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,15 @@ +Export tmp.zip-D-f(C).dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +c.v() + +IRs: +TMP_0(uint256) = HIGH_LEVEL_CALL, dest:c(C), function:v, arguments:[] "]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..0df3b5bbe8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 1 | 0 | 0 | +| D | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| D | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| D | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| D | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 1 | +| D | 1 | 2 | 0 | 0 | 1 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..03a26bc1ce --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,7 @@ + ++ Contract C (Most derived contract) + ++ Contract D (Most derived contract) + - From D + - f(C) (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..2236fafedb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,27 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| v | [] | ++----------+--------------+ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| v | [] | ++----------+--------------+ + +Contract D ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(C) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..62aa5136e7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,31 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/call_to_variable-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/call_to_variable-all.sol#6 (16 - 17)'] + + ## Function + + ## State variables + - v + - Declaration: tests/ast-parsing/call_to_variable-all.sol#2 (17 - 19) + - Implementation: tests/ast-parsing/call_to_variable-all.sol#2 (5 - 18) + - References: ['tests/ast-parsing/call_to_variable-all.sol#7 (9 - 14)'] + + ## Structures +# D + - Declaration: tests/ast-parsing/call_to_variable-all.sol#5 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - D.f(C) + - Declaration: tests/ast-parsing/call_to_variable-all.sol#6 (14 - 16) + - Implementation(s): ['tests/ast-parsing/call_to_variable-all.sol#6-8 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..2128da7b8e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-D-f(C).dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..63ca5eecdd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,39 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "v()" + ], + "D": [ + "f(address)" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {}, + "D": { + "f(address)": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": { + "D": [ + "f(address)" + ] + }, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..9f0ca71d0a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,15 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| v() | 0x7c2efcba | ++------+------------+ + +D: ++------------+------------+ +| Name | ID | ++------------+------------+ +| f(address) | 0xfc68521a | ++------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65a05b6251 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,30 @@ + +Contract C +Contract vars: ['v'] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract D +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f(C) | public | [] | [] | [] | [] | ['c.v()'] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..bd53a0f538 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | +| D | 1 | 1 | 1 | 1 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | +| D | 2 | 2 | 0 | 2 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | +| D | 0 | 1 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..426bd9adb8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 8 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..7f829d7903 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + ++ D + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + ++ D + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..52159ddcf0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c19_C[shape="box"label=<
C
Public Variables:
v
>]; + +c31_D[shape="box"label=<
D
Public Functions:
f(C)
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..3cb5cbcc06 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 9 | +| sloc | 0 | 0 | 8 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 17 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..741e131c82 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 1 | 0 | 0.00 | 0.00 | +| D | 0 | 1 | 1.00 | 1.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..24fa350c5d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ +Contract D ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..2ff3e922fd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,15 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +D: ++------------+-------------------+ +| Name | Use whenNotPaused | ++------------+-------------------+ +| f(address) | | ++------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..00347bb425 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ +Contract D ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..3918224c90 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,7 @@ +Contract C +Contract D + Function D.f(C) (*) + Expression: c.v() + IRs: + TMP_0(uint256) = HIGH_LEVEL_CALL, dest:c(C), function:v, arguments:[] + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..0bb28a7d7e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,14 @@ + +C: ++------+---------+------+--------+ +| Name | Type | Slot | Offset | ++------+---------+------+--------+ +| C.v | uint256 | 0 | 0 | ++------+---------+------+--------+ + +D: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..d87b18a8a0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,14 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract D ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..5ebf039d9f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,25 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot +Call Graph: tmp.zipD.call-graph.dot + +strict digraph { +subgraph cluster_16_D { +label = "D" +"16_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_16_D { +label = "D" +"16_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..049357bc25 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,15 @@ +Export tmp.zip-D-f(C).dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +c.v() + +IRs: +TMP_0(uint256) = HIGH_LEVEL_CALL, dest:c(C), function:v, arguments:[] "]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..0df3b5bbe8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 1 | 0 | 0 | +| D | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| D | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| D | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| D | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 1 | +| D | 1 | 2 | 0 | 0 | 1 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..03a26bc1ce --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,7 @@ + ++ Contract C (Most derived contract) + ++ Contract D (Most derived contract) + - From D + - f(C) (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..2236fafedb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,27 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| v | [] | ++----------+--------------+ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| v | [] | ++----------+--------------+ + +Contract D ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(C) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..62aa5136e7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,31 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/call_to_variable-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/call_to_variable-all.sol#6 (16 - 17)'] + + ## Function + + ## State variables + - v + - Declaration: tests/ast-parsing/call_to_variable-all.sol#2 (17 - 19) + - Implementation: tests/ast-parsing/call_to_variable-all.sol#2 (5 - 18) + - References: ['tests/ast-parsing/call_to_variable-all.sol#7 (9 - 14)'] + + ## Structures +# D + - Declaration: tests/ast-parsing/call_to_variable-all.sol#5 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - D.f(C) + - Declaration: tests/ast-parsing/call_to_variable-all.sol#6 (14 - 16) + - Implementation(s): ['tests/ast-parsing/call_to_variable-all.sol#6-8 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..2128da7b8e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-D-f(C).dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..9422b93d63 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,39 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "v()" + ], + "D": [ + "f(address)" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {}, + "D": { + "f(address)": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": { + "D": [ + "f(address)" + ] + }, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..9f0ca71d0a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,15 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| v() | 0x7c2efcba | ++------+------------+ + +D: ++------------+------------+ +| Name | ID | ++------------+------------+ +| f(address) | 0xfc68521a | ++------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65a05b6251 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,30 @@ + +Contract C +Contract vars: ['v'] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract D +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f(C) | public | [] | [] | [] | [] | ['c.v()'] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..bd53a0f538 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | +| D | 1 | 1 | 1 | 1 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | +| D | 2 | 2 | 0 | 2 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | +| D | 0 | 1 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..426bd9adb8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 8 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..7f829d7903 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + ++ D + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + ++ D + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..7a1610c1a5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c3_C[shape="box"label=<
C
Public Variables:
v
>]; + +c16_D[shape="box"label=<
D
Public Functions:
f(C)
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..3cb5cbcc06 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 9 | +| sloc | 0 | 0 | 8 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 17 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..741e131c82 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 1 | 0 | 0.00 | 0.00 | +| D | 0 | 1 | 1.00 | 1.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..24fa350c5d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ +Contract D ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..2ff3e922fd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,15 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +D: ++------------+-------------------+ +| Name | Use whenNotPaused | ++------------+-------------------+ +| f(address) | | ++------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..00347bb425 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ +Contract D ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..3918224c90 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,7 @@ +Contract C +Contract D + Function D.f(C) (*) + Expression: c.v() + IRs: + TMP_0(uint256) = HIGH_LEVEL_CALL, dest:c(C), function:v, arguments:[] + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..0bb28a7d7e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,14 @@ + +C: ++------+---------+------+--------+ +| Name | Type | Slot | Offset | ++------+---------+------+--------+ +| C.v | uint256 | 0 | 0 | ++------+---------+------+--------+ + +D: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..d87b18a8a0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_call_to_variable_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,14 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract D ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..fd8820877a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipA.call-graph.dot + +strict digraph { +subgraph cluster_15_A { +label = "A" +"15_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_15_A { +label = "A" +"15_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..b2b825c036 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,7 @@ +Export tmp.zip-A-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..9adb989d39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| A | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| A | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| A | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| A | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| A | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..4790c021ce --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract A (Most derived contract) + - From A + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..94098899a6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..a1bdff3a01 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# A + - Declaration: tests/ast-parsing/comment-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - A.f() + - Declaration: tests/ast-parsing/comment-all.sol#6 (14 - 16) + - Implementation(s): ['tests/ast-parsing/comment-all.sol#6 (5 - 26)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..f9ce57e2a4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-A-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..8d078f7653 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,31 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "A": [ + "f()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "A": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..e4593cfaa4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +A: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..5a05844fad --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract A +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..53ee1714d3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| A | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| A | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| A | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..2bc8584124 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 4 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..f88999182f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ A + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ A + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..18fda5f206 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c15_A[shape="box"label=<
A
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7030b47532 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 7 | +| sloc | 0 | 0 | 4 | +| cloc | 0 | 0 | 2 | +| Total | 0 | 0 | 13 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..5e180d8d87 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| A | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..b28178b699 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract A ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..03f2ac9c39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +A: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..eec40e5773 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract A ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..9856ca3491 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,3 @@ +Contract A + Function A.f() (*) + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..9d4cdc4d67 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +A: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f9d7e5faa6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract A ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..885c859a0b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipA.call-graph.dot + +strict digraph { +subgraph cluster_7_A { +label = "A" +"7_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_7_A { +label = "A" +"7_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..b2b825c036 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,7 @@ +Export tmp.zip-A-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..9adb989d39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| A | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| A | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| A | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| A | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| A | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..4790c021ce --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract A (Most derived contract) + - From A + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..94098899a6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..a1bdff3a01 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# A + - Declaration: tests/ast-parsing/comment-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - A.f() + - Declaration: tests/ast-parsing/comment-all.sol#6 (14 - 16) + - Implementation(s): ['tests/ast-parsing/comment-all.sol#6 (5 - 26)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..f9ce57e2a4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-A-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..b9975285f2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,31 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "A": [ + "f()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "A": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..e4593cfaa4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +A: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..5a05844fad --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract A +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..53ee1714d3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| A | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| A | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| A | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..2bc8584124 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 4 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..f88999182f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ A + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ A + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..b7367ec8dd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c7_A[shape="box"label=<
A
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7030b47532 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 7 | +| sloc | 0 | 0 | 4 | +| cloc | 0 | 0 | 2 | +| Total | 0 | 0 | 13 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..5e180d8d87 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| A | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..b28178b699 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract A ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..03f2ac9c39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +A: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..eec40e5773 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract A ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..9856ca3491 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,3 @@ +Contract A + Function A.f() (*) + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..9d4cdc4d67 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +A: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f9d7e5faa6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_comment_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract A ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..9fa6872964 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_103_C { +label = "C" +"103_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_103_C { +label = "C" +"103_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..dfb759e01a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,156 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->6; +6[label="Node Type: IF 6 + +EXPRESSION: +false + +IRs: +CONDITION False"]; +6->7[label="True"]; +6->8[label="False"]; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +1 +"]; +7->9; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +2 +"]; +8->9; +9[label="Node Type: END_IF 9 +"]; +9->10; +10[label="Node Type: IF 10 + +EXPRESSION: +5 == 6 + +IRs: +TMP_0(bool) = 5 == 6 +CONDITION TMP_0"]; +10->11[label="True"]; +10->12[label="False"]; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +1 +"]; +11->13; +12[label="Node Type: EXPRESSION 12 + +EXPRESSION: +2 +"]; +12->13; +13[label="Node Type: END_IF 13 +"]; +13->14; +14[label="Node Type: IF 14 + +EXPRESSION: +1 + 2 == 3 + +IRs: +TMP_1(uint256) = 1 + 2 +TMP_2(bool) = TMP_1 == 3 +CONDITION TMP_2"]; +14->26[label="True"]; +14->16[label="False"]; +16[label="Node Type: EXPRESSION 16 + +EXPRESSION: +- 2 + +IRs: +TMP_3(uint256) = 0 - 2"]; +16->17; +17[label="Node Type: END_IF 17 +"]; +17->18; +18[label="Node Type: IF 18 + +EXPRESSION: +true + +IRs: +CONDITION True"]; +18->19[label="True"]; +18->20[label="False"]; +19[label="Node Type: EXPRESSION 19 + +EXPRESSION: +a +"]; +19->21; +20[label="Node Type: EXPRESSION 20 + +EXPRESSION: +b +"]; +20->21; +21[label="Node Type: END_IF 21 +"]; +21->22; +22[label="Node Type: IF 22 + +EXPRESSION: +false + +IRs: +CONDITION False"]; +22->23[label="True"]; +22->24[label="False"]; +23[label="Node Type: EXPRESSION 23 + +EXPRESSION: +(1,2) +"]; +23->25; +24[label="Node Type: EXPRESSION 24 + +EXPRESSION: +(3,4) +"]; +24->25; +25[label="Node Type: END_IF 25 +"]; +26[label="Node Type: IF 26 + +EXPRESSION: +4 + 5 == 6 + +IRs: +TMP_4(uint256) = 4 + 5 +TMP_5(bool) = TMP_4 == 6 +CONDITION TMP_5"]; +26->27[label="True"]; +26->28[label="False"]; +27[label="Node Type: EXPRESSION 27 + +EXPRESSION: +int8(0) + +IRs: +TMP_6 = CONVERT 0 to int8"]; +27->29; +28[label="Node Type: EXPRESSION 28 + +EXPRESSION: +- 1 + +IRs: +TMP_7(uint256) = 0 - 1"]; +28->29; +29[label="Node Type: END_IF 29 +"]; +29->17; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..5e49435671 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..a829e0ffde --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/conditional-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/conditional-all.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/conditional-all.sol#2-8 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..fb596f7be5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,185 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "int8" + } + ], + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "115792089237316195423570985008687907853269984665640564039457584007913129639934", + "type": "uint256" + } + ], + [ + { + "value": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ], + [ + { + "value": "4", + "type": "uint256" + } + ], + [ + { + "value": "5", + "type": "uint256" + } + ], + [ + { + "value": "6", + "type": "uint256" + } + ], + [ + { + "value": "9", + "type": "uint256" + } + ], + [ + { + "value": "False", + "type": "bool" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "4", + "type": "uint256" + } + ], + [ + { + "value": "5", + "type": "uint256" + } + ] + ], + "BinaryType.EQUAL": [ + [ + { + "value": "3", + "type": "uint256" + } + ], + [ + { + "value": "5", + "type": "uint256" + } + ], + [ + { + "value": "6", + "type": "uint256" + } + ] + ], + "BinaryType.SUBTRACTION": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..69c80ecc33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 7 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..88254fe6ea --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 14 | 7 | 16 | 7 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 14 | 30 | 39 | 114 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 8 | 914 | 51 | 0.031 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..927e842dca --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 9 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..181e394fc0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c103_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..b0d78e6106 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 9 | +| sloc | 0 | 0 | 9 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 18 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..9dcf6b5c6c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,51 @@ +Contract C + Function C.f() (*) + Expression: false + IRs: + CONDITION False + Expression: 1 + IRs: + Expression: 2 + IRs: + Expression: 5 == 6 + IRs: + TMP_0(bool) = 5 == 6 + CONDITION TMP_0 + Expression: 1 + IRs: + Expression: 2 + IRs: + Expression: 1 + 2 == 3 + IRs: + TMP_1(uint256) = 1 + 2 + TMP_2(bool) = TMP_1 == 3 + CONDITION TMP_2 + Expression: - 2 + IRs: + TMP_3(uint256) = 0 - 2 + Expression: true + IRs: + CONDITION True + Expression: a + IRs: + Expression: b + IRs: + Expression: false + IRs: + CONDITION False + Expression: (1,2) + IRs: + Expression: (3,4) + IRs: + Expression: 4 + 5 == 6 + IRs: + TMP_4(uint256) = 4 + 5 + TMP_5(bool) = TMP_4 == 6 + CONDITION TMP_5 + Expression: int8(0) + IRs: + TMP_6 = CONVERT 0 to int8 + Expression: - 1 + IRs: + TMP_7(uint256) = 0 - 1 + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..5f6f8de87d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_52_C { +label = "C" +"52_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_52_C { +label = "C" +"52_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..bbce37496f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,156 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->6; +6[label="Node Type: IF 6 + +EXPRESSION: +false + +IRs: +CONDITION False"]; +6->7[label="True"]; +6->8[label="False"]; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +1 +"]; +7->9; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +2 +"]; +8->9; +9[label="Node Type: END_IF 9 +"]; +9->10; +10[label="Node Type: IF 10 + +EXPRESSION: +5 == 6 + +IRs: +TMP_0(bool) = 5 == 6 +CONDITION TMP_0"]; +10->11[label="True"]; +10->12[label="False"]; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +1 +"]; +11->13; +12[label="Node Type: EXPRESSION 12 + +EXPRESSION: +2 +"]; +12->13; +13[label="Node Type: END_IF 13 +"]; +13->14; +14[label="Node Type: IF 14 + +EXPRESSION: +1 + 2 == 3 + +IRs: +TMP_1(uint256) = 1 (c)+ 2 +TMP_2(bool) = TMP_1 == 3 +CONDITION TMP_2"]; +14->26[label="True"]; +14->16[label="False"]; +16[label="Node Type: EXPRESSION 16 + +EXPRESSION: +- 2 + +IRs: +TMP_3(uint256) = 0 (c)- 2"]; +16->17; +17[label="Node Type: END_IF 17 +"]; +17->18; +18[label="Node Type: IF 18 + +EXPRESSION: +true + +IRs: +CONDITION True"]; +18->19[label="True"]; +18->20[label="False"]; +19[label="Node Type: EXPRESSION 19 + +EXPRESSION: +a +"]; +19->21; +20[label="Node Type: EXPRESSION 20 + +EXPRESSION: +b +"]; +20->21; +21[label="Node Type: END_IF 21 +"]; +21->22; +22[label="Node Type: IF 22 + +EXPRESSION: +false + +IRs: +CONDITION False"]; +22->23[label="True"]; +22->24[label="False"]; +23[label="Node Type: EXPRESSION 23 + +EXPRESSION: +(1,2) +"]; +23->25; +24[label="Node Type: EXPRESSION 24 + +EXPRESSION: +(3,4) +"]; +24->25; +25[label="Node Type: END_IF 25 +"]; +26[label="Node Type: IF 26 + +EXPRESSION: +4 + 5 == 6 + +IRs: +TMP_4(uint256) = 4 (c)+ 5 +TMP_5(bool) = TMP_4 == 6 +CONDITION TMP_5"]; +26->27[label="True"]; +26->28[label="False"]; +27[label="Node Type: EXPRESSION 27 + +EXPRESSION: +int8(0) + +IRs: +TMP_6 = CONVERT 0 to int8"]; +27->29; +28[label="Node Type: EXPRESSION 28 + +EXPRESSION: +- 1 + +IRs: +TMP_7(uint256) = 0 (c)- 1"]; +28->29; +29[label="Node Type: END_IF 29 +"]; +29->17; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..5e49435671 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..a829e0ffde --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/conditional-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/conditional-all.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/conditional-all.sol#2-8 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..949278e507 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,185 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "int8" + } + ], + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "115792089237316195423570985008687907853269984665640564039457584007913129639934", + "type": "uint256" + } + ], + [ + { + "value": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ], + [ + { + "value": "4", + "type": "uint256" + } + ], + [ + { + "value": "5", + "type": "uint256" + } + ], + [ + { + "value": "6", + "type": "uint256" + } + ], + [ + { + "value": "9", + "type": "uint256" + } + ], + [ + { + "value": "False", + "type": "bool" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "4", + "type": "uint256" + } + ], + [ + { + "value": "5", + "type": "uint256" + } + ] + ], + "BinaryType.EQUAL": [ + [ + { + "value": "3", + "type": "uint256" + } + ], + [ + { + "value": "5", + "type": "uint256" + } + ], + [ + { + "value": "6", + "type": "uint256" + } + ] + ], + "BinaryType.SUBTRACTION": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..69c80ecc33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 7 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..88254fe6ea --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 14 | 7 | 16 | 7 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 14 | 30 | 39 | 114 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 8 | 914 | 51 | 0.031 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..927e842dca --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 9 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..9bd215274f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c52_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..b0d78e6106 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 9 | +| sloc | 0 | 0 | 9 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 18 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..412e474f8d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,51 @@ +Contract C + Function C.f() (*) + Expression: false + IRs: + CONDITION False + Expression: 1 + IRs: + Expression: 2 + IRs: + Expression: 5 == 6 + IRs: + TMP_0(bool) = 5 == 6 + CONDITION TMP_0 + Expression: 1 + IRs: + Expression: 2 + IRs: + Expression: 1 + 2 == 3 + IRs: + TMP_1(uint256) = 1 (c)+ 2 + TMP_2(bool) = TMP_1 == 3 + CONDITION TMP_2 + Expression: - 2 + IRs: + TMP_3(uint256) = 0 (c)- 2 + Expression: true + IRs: + CONDITION True + Expression: a + IRs: + Expression: b + IRs: + Expression: false + IRs: + CONDITION False + Expression: (1,2) + IRs: + Expression: (3,4) + IRs: + Expression: 4 + 5 == 6 + IRs: + TMP_4(uint256) = 4 (c)+ 5 + TMP_5(bool) = TMP_4 == 6 + CONDITION TMP_5 + Expression: int8(0) + IRs: + TMP_6 = CONVERT 0 to int8 + Expression: - 1 + IRs: + TMP_7(uint256) = 0 (c)- 1 + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_conditional_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..3315fc9227 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_145_C { +label = "C" +"145_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_145_C { +label = "C" +"145_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..4dcd5f9872 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,164 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +3->13; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_0(bool) = i < 10 +CONDITION TMP_0"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: IF 6 + +EXPRESSION: +i % 2 == 0 + +IRs: +TMP_1(uint256) = i % 2 +TMP_2(bool) = TMP_1 == 0 +CONDITION TMP_2"]; +6->7[label="True"]; +6->8[label="False"]; +7[label="Node Type: CONTINUE 7 +"]; +7->10; +8[label="Node Type: END_IF 8 +"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +c ++ + +IRs: +TMP_3(uint256) := c(uint256) +c(uint256) = c + 1"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +i ++ + +IRs: +TMP_4(uint256) := i(uint256) +i(uint256) = i + 1"]; +10->5; +11[label="Node Type: BEGIN_LOOP 11 +"]; +11->14; +12[label="Node Type: END_LOOP 12 +"]; +13[label="Node Type: NEW VARIABLE 13 + +EXPRESSION: +j = 0 + +IRs: +j(uint256) := 0(uint256)"]; +13->11; +14[label="Node Type: IF_LOOP 14 + +EXPRESSION: +j < 10 + +IRs: +TMP_5(bool) = j < 10 +CONDITION TMP_5"]; +14->17[label="True"]; +14->12[label="False"]; +15[label="Node Type: BEGIN_LOOP 15 +"]; +15->18; +16[label="Node Type: END_LOOP 16 +"]; +16->24; +17[label="Node Type: NEW VARIABLE 17 + +EXPRESSION: +k = 0 + +IRs: +k(uint256) := 0(uint256)"]; +17->15; +18[label="Node Type: IF_LOOP 18 + +EXPRESSION: +k < 10 + +IRs: +TMP_6(bool) = k < 10 +CONDITION TMP_6"]; +18->19[label="True"]; +18->16[label="False"]; +19[label="Node Type: IF 19 + +EXPRESSION: +j % 2 == 0 && k % 3 == 0 + +IRs: +TMP_7(uint256) = j % 2 +TMP_8(bool) = TMP_7 == 0 +TMP_9(uint256) = k % 3 +TMP_10(bool) = TMP_9 == 0 +TMP_11(bool) = TMP_8 && TMP_10 +CONDITION TMP_11"]; +19->20[label="True"]; +19->21[label="False"]; +20[label="Node Type: CONTINUE 20 +"]; +20->23; +21[label="Node Type: END_IF 21 +"]; +21->22; +22[label="Node Type: EXPRESSION 22 + +EXPRESSION: +c ++ + +IRs: +TMP_12(uint256) := c(uint256) +c(uint256) = c + 1"]; +22->23; +23[label="Node Type: EXPRESSION 23 + +EXPRESSION: +k ++ + +IRs: +TMP_13(uint256) := k(uint256) +k(uint256) = k + 1"]; +23->18; +24[label="Node Type: EXPRESSION 24 + +EXPRESSION: +j ++ + +IRs: +TMP_14(uint256) := j(uint256) +j(uint256) = j + 1"]; +24->14; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..93150e3fe6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,16 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | +| j | ['j'] | +| k | ['k'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..ac7e74d910 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/continue-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/continue-all.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/continue-all.sol#2-20 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..1b79ca6989 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,109 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.EQUAL": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.MODULO": [ + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..3064b6f8c2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 6 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..c5309249b4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 28 | 7 | 41 | 9 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 16 | 69 | 48 | 276 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 16 | 4401 | 244 | 0.090 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..6ad79cb083 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 19 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..e94b823150 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c145_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..71aca793c0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 21 | +| sloc | 0 | 0 | 19 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 40 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..b98a304da8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,57 @@ +Contract C + Function C.f() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_0(bool) = i < 10 + CONDITION TMP_0 + Expression: i % 2 == 0 + IRs: + TMP_1(uint256) = i % 2 + TMP_2(bool) = TMP_1 == 0 + CONDITION TMP_2 + Expression: c ++ + IRs: + TMP_3(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: i ++ + IRs: + TMP_4(uint256) := i(uint256) + i(uint256) = i + 1 + Expression: j = 0 + IRs: + j(uint256) := 0(uint256) + Expression: j < 10 + IRs: + TMP_5(bool) = j < 10 + CONDITION TMP_5 + Expression: k = 0 + IRs: + k(uint256) := 0(uint256) + Expression: k < 10 + IRs: + TMP_6(bool) = k < 10 + CONDITION TMP_6 + Expression: j % 2 == 0 && k % 3 == 0 + IRs: + TMP_7(uint256) = j % 2 + TMP_8(bool) = TMP_7 == 0 + TMP_9(uint256) = k % 3 + TMP_10(bool) = TMP_9 == 0 + TMP_11(bool) = TMP_8 && TMP_10 + CONDITION TMP_11 + Expression: c ++ + IRs: + TMP_12(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: k ++ + IRs: + TMP_13(uint256) := k(uint256) + k(uint256) = k + 1 + Expression: j ++ + IRs: + TMP_14(uint256) := j(uint256) + j(uint256) = j + 1 + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..7ea4f440ff --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_72_C { +label = "C" +"72_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_72_C { +label = "C" +"72_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..bdfca09130 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,164 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +3->13; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_0(bool) = i < 10 +CONDITION TMP_0"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: IF 6 + +EXPRESSION: +i % 2 == 0 + +IRs: +TMP_1(uint256) = i % 2 +TMP_2(bool) = TMP_1 == 0 +CONDITION TMP_2"]; +6->7[label="True"]; +6->8[label="False"]; +7[label="Node Type: CONTINUE 7 +"]; +7->10; +8[label="Node Type: END_IF 8 +"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +c ++ + +IRs: +TMP_3(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +i ++ + +IRs: +TMP_4(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +10->5; +11[label="Node Type: BEGIN_LOOP 11 +"]; +11->14; +12[label="Node Type: END_LOOP 12 +"]; +13[label="Node Type: NEW VARIABLE 13 + +EXPRESSION: +j = 0 + +IRs: +j(uint256) := 0(uint256)"]; +13->11; +14[label="Node Type: IF_LOOP 14 + +EXPRESSION: +j < 10 + +IRs: +TMP_5(bool) = j < 10 +CONDITION TMP_5"]; +14->17[label="True"]; +14->12[label="False"]; +15[label="Node Type: BEGIN_LOOP 15 +"]; +15->18; +16[label="Node Type: END_LOOP 16 +"]; +16->24; +17[label="Node Type: NEW VARIABLE 17 + +EXPRESSION: +k = 0 + +IRs: +k(uint256) := 0(uint256)"]; +17->15; +18[label="Node Type: IF_LOOP 18 + +EXPRESSION: +k < 10 + +IRs: +TMP_6(bool) = k < 10 +CONDITION TMP_6"]; +18->19[label="True"]; +18->16[label="False"]; +19[label="Node Type: IF 19 + +EXPRESSION: +j % 2 == 0 && k % 3 == 0 + +IRs: +TMP_7(uint256) = j % 2 +TMP_8(bool) = TMP_7 == 0 +TMP_9(uint256) = k % 3 +TMP_10(bool) = TMP_9 == 0 +TMP_11(bool) = TMP_8 && TMP_10 +CONDITION TMP_11"]; +19->20[label="True"]; +19->21[label="False"]; +20[label="Node Type: CONTINUE 20 +"]; +20->23; +21[label="Node Type: END_IF 21 +"]; +21->22; +22[label="Node Type: EXPRESSION 22 + +EXPRESSION: +c ++ + +IRs: +TMP_12(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +22->23; +23[label="Node Type: EXPRESSION 23 + +EXPRESSION: +k ++ + +IRs: +TMP_13(uint256) := k(uint256) +k(uint256) = k (c)+ 1"]; +23->18; +24[label="Node Type: EXPRESSION 24 + +EXPRESSION: +j ++ + +IRs: +TMP_14(uint256) := j(uint256) +j(uint256) = j (c)+ 1"]; +24->14; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..93150e3fe6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,16 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | +| j | ['j'] | +| k | ['k'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..ac7e74d910 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/continue-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/continue-all.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/continue-all.sol#2-20 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..6455ea7a7c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,109 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.EQUAL": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "BinaryType.MODULO": [ + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..3064b6f8c2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 6 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..c5309249b4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 28 | 7 | 41 | 9 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 16 | 69 | 48 | 276 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 16 | 4401 | 244 | 0.090 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..6ad79cb083 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 19 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..ce6cc88eb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c72_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..71aca793c0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 21 | +| sloc | 0 | 0 | 19 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 40 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..69a6340099 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,57 @@ +Contract C + Function C.f() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_0(bool) = i < 10 + CONDITION TMP_0 + Expression: i % 2 == 0 + IRs: + TMP_1(uint256) = i % 2 + TMP_2(bool) = TMP_1 == 0 + CONDITION TMP_2 + Expression: c ++ + IRs: + TMP_3(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: i ++ + IRs: + TMP_4(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Expression: j = 0 + IRs: + j(uint256) := 0(uint256) + Expression: j < 10 + IRs: + TMP_5(bool) = j < 10 + CONDITION TMP_5 + Expression: k = 0 + IRs: + k(uint256) := 0(uint256) + Expression: k < 10 + IRs: + TMP_6(bool) = k < 10 + CONDITION TMP_6 + Expression: j % 2 == 0 && k % 3 == 0 + IRs: + TMP_7(uint256) = j % 2 + TMP_8(bool) = TMP_7 == 0 + TMP_9(uint256) = k % 3 + TMP_10(bool) = TMP_9 == 0 + TMP_11(bool) = TMP_8 && TMP_10 + CONDITION TMP_11 + Expression: c ++ + IRs: + TMP_12(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: k ++ + IRs: + TMP_13(uint256) := k(uint256) + k(uint256) = k (c)+ 1 + Expression: j ++ + IRs: + TMP_14(uint256) := j(uint256) + j(uint256) = j (c)+ 1 + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_continue_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..4b860b0673 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,51 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot +Call Graph: tmp.zipD.call-graph.dot +Call Graph: tmp.zipE.call-graph.dot +Call Graph: tmp.zipH.call-graph.dot + +strict digraph { +subgraph cluster_49_B { +label = "B" +"49_constructor" [label="constructor"] +}subgraph cluster_63_D { +label = "D" +"63_constructor" [label="constructor"] +"63_constructor" -> "63_constructor" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_49_B { +label = "B" +"49_constructor" [label="constructor"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_49_B { +label = "B" +"49_constructor" [label="constructor"] +}subgraph cluster_63_D { +label = "D" +"63_constructor" [label="constructor"] +"63_constructor" -> "63_constructor" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_49_B { +label = "B" +"49_constructor" [label="constructor"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..e853ef3008 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,39 @@ +Export tmp.zip-B-constructor(uint256).dot +Export tmp.zip-C-constructor(uint256).dot +Export tmp.zip-D-constructor(uint256).dot +Export tmp.zip-D-constructor().dot +Export tmp.zip-E-constructor(uint256).dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +B(2) + +IRs: +INTERNAL_CALL, B.constructor(uint256)(2)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..2a526fcfc8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,84 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| A | 0 | 0 | 0 | +| B | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| D | 0 | 0 | 0 | +| E | 0 | 0 | 0 | +| F | 0 | 0 | 0 | +| G | 0 | 0 | 0 | +| H | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| A | 0 | 0 | 0 | 0 | +| B | 0 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | +| D | 0 | 0 | 0 | 0 | +| E | 0 | 0 | 0 | 0 | +| F | 0 | 0 | 0 | 0 | +| G | 0 | 0 | 0 | 0 | +| H | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| A | 0 | 0 | 0 | +| B | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| D | 0 | 0 | 0 | +| E | 0 | 0 | 0 | +| F | 0 | 0 | 0 | +| G | 0 | 0 | 0 | +| H | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| A | 0 | 0 | 0 | +| B | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| D | 0 | 0 | 0 | +| E | 0 | 0 | 0 | +| F | 0 | 0 | 0 | +| G | 0 | 0 | 0 | +| H | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| A | 0 | 0 | 7 | 0 | 0 | +| B | 0 | 0 | 3 | 1 | 0 | +| C | 0 | 0 | 0 | 2 | 0 | +| D | 0 | 0 | 0 | 2 | 0 | +| E | 0 | 0 | 0 | 2 | 0 | +| F | 0 | 0 | 1 | 1 | 0 | +| G | 0 | 0 | 1 | 1 | 0 | +| H | 0 | 0 | 0 | 2 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..65c908cd3b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1,53 @@ + +################# +####### C ####### +################# + +## Constructor Call Sequence + - B + +## Constructor Definitions + +### B + + constructor(uint a) public { + + } + +################# +####### D ####### +################# + +## Constructor Call Sequence + - B + - D + +## Constructor Definitions + +### B + + constructor(uint a) public { + + } + +### D + + constructor() B(2) public { + + } + +################# +####### E ####### +################# + +## Constructor Call Sequence + - B + +## Constructor Definitions + +### B + + constructor(uint a) public { + + } + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..fc25093ba0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,27 @@ + ++ Contract A + ++ Contract B + - From B + - constructor(uint256) (public) + ++ Contract C (Most derived contract) + - From B + - constructor(uint256) (public) + ++ Contract D (Most derived contract) + - From B + - constructor(uint256) (public) + - From D + - constructor() (public) + ++ Contract E (Most derived contract) + - From B + - constructor(uint256) (public) + ++ Contract F + ++ Contract G + ++ Contract H (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..c96892ab3e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,284 @@ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract D ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract D ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract E ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract D ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract E ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract F ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract D ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract E ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract F ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract G ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract D ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract E ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract F ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract G ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract H ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..cdfb8a0bbf --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,91 @@ + +# Contracts +# A + - Declaration: tests/ast-parsing/contract-0.4.22.sol#3 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/contract-0.4.22.sol#8 (15 - 16)', 'tests/ast-parsing/contract-0.4.22.sol#31 (15 - 16)', 'tests/ast-parsing/contract-0.4.22.sol#32 (15 - 16)'] + + ## Function + + ## State variables + + ## Structures +# B + - Declaration: tests/ast-parsing/contract-0.4.22.sol#8 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/contract-0.4.22.sol#15 (15 - 16)', 'tests/ast-parsing/contract-0.4.22.sol#20 (15 - 16)', 'tests/ast-parsing/contract-0.4.22.sol#27 (15 - 16)', 'tests/ast-parsing/contract-0.4.22.sol#21 (19 - 20)', 'tests/ast-parsing/contract-0.4.22.sol#21 (19 - 20)'] + + ## Function + - B.constructor(uint256) + - Declaration: tests/ast-parsing/contract-0.4.22.sol#9 (5 - 17) + - Implementation(s): ['tests/ast-parsing/contract-0.4.22.sol#9-11 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# C + - Declaration: tests/ast-parsing/contract-0.4.22.sol#15 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures +# D + - Declaration: tests/ast-parsing/contract-0.4.22.sol#20 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - D.constructor() + - Declaration: tests/ast-parsing/contract-0.4.22.sol#21 (5 - 17) + - Implementation(s): ['tests/ast-parsing/contract-0.4.22.sol#21-23 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# E + - Declaration: tests/ast-parsing/contract-0.4.22.sol#27 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures +# F + - Declaration: tests/ast-parsing/contract-0.4.22.sol#31 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/contract-0.4.22.sol#33 (15 - 16)'] + + ## Function + + ## State variables + + ## Structures +# G + - Declaration: tests/ast-parsing/contract-0.4.22.sol#32 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/contract-0.4.22.sol#33 (18 - 19)'] + + ## Function + + ## State variables + + ## Structures +# H + - Declaration: tests/ast-parsing/contract-0.4.22.sol#33 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..31d5557b5e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,11 @@ +Export tmp.zip-B-constructor(uint256).dot +Export tmp.zip-C-constructor(uint256).dot +Export tmp.zip-D-constructor(uint256).dot +Export tmp.zip-D-constructor().dot +Export tmp.zip-E-constructor(uint256).dot + +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..f442bd52b2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,83 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "B": [ + "constructor(uint256)" + ], + "C": [ + "constructor(uint256)" + ], + "D": [ + "constructor(uint256)", + "constructor()" + ], + "E": [ + "constructor(uint256)" + ] + }, + "constants_used": { + "D": { + "constructor()": [ + [ + { + "value": "2", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "A": {}, + "B": { + "constructor(uint256)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C": { + "constructor(uint256)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "D": { + "constructor(uint256)": { + "impacts": [], + "is_impacted_by": [] + }, + "constructor()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "E": { + "constructor(uint256)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "F": {}, + "G": {}, + "H": {} + }, + "constructors": { + "B": "constructor(uint256)", + "C": "constructor(uint256)", + "D": "constructor()", + "E": "constructor(uint256)" + }, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..3409904859 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,29 @@ + +C: ++----------------------+------------+ +| Name | ID | ++----------------------+------------+ +| constructor(uint256) | 0x767b6190 | ++----------------------+------------+ + +D: ++----------------------+------------+ +| Name | ID | ++----------------------+------------+ +| constructor(uint256) | 0x767b6190 | +| constructor() | 0x90fa17bb | ++----------------------+------------+ + +E: ++----------------------+------------+ +| Name | ID | ++----------------------+------------+ +| constructor(uint256) | 0x767b6190 | ++----------------------+------------+ + +H: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..bd7c530e46 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,118 @@ + +Contract A +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract B +Contract vars: [] +Inheritance:: ['A'] + ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor(uint256) | public | [] | [] | [] | [] | [] | 1 | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: [] +Inheritance:: ['B', 'A'] + ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor(uint256) | public | [] | [] | [] | [] | [] | 1 | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract D +Contract vars: [] +Inheritance:: ['B', 'A'] + ++----------------------+------------+-----------+------+-------+-----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------------+------------+-----------+------+-------+-----------------+----------------+-----------------------+ +| constructor(uint256) | public | [] | [] | [] | [] | [] | 1 | +| constructor() | public | [] | [] | [] | ['constructor'] | [] | 1 | ++----------------------+------------+-----------+------+-------+-----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract E +Contract vars: [] +Inheritance:: ['B', 'A'] + ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor(uint256) | public | [] | [] | [] | [] | [] | 1 | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract F +Contract vars: [] +Inheritance:: ['A'] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract G +Contract vars: [] +Inheritance:: ['A'] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract H +Contract vars: [] +Inheritance:: ['G', 'F', 'A'] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..d92d1a8e20 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,46 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| A | 0 | 0 | 0 | 0 | +| B | 0 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | +| D | 1 | 1 | 2 | 2 | +| E | 0 | 0 | 0 | 0 | +| F | 0 | 0 | 0 | 0 | +| G | 0 | 0 | 0 | 0 | +| H | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| A | 0 | 0 | 0 | 0 | +| B | 0 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | +| D | 3 | 3 | 2 | 5 | +| E | 0 | 0 | 0 | 0 | +| F | 0 | 0 | 0 | 0 | +| G | 0 | 0 | 0 | 0 | +| H | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| A | 0 | 0 | 0 | 0.000 | +| B | 0 | 0 | 0 | 0.000 | +| C | 0 | 0 | 0 | 0.000 | +| D | 0 | 2 | 0 | 0.001 | +| E | 0 | 0 | 0 | 0.000 | +| F | 0 | 0 | 0 | 0.000 | +| G | 0 | 0 | 0 | 0.000 | +| H | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..073e4c11f1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 8 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 18 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..f2f7255ee0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,54 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ A + ++ B + -> A + ++ C + -> B +, [A] + ++ D + -> B +, [A] + ++ E + -> B +, [A] + ++ F + -> A + ++ G + -> A + ++ H + -> F, G +, [A] + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ A + -> B, F, G +, [C, D, E, H] + ++ B + -> C, D, E + ++ C + ++ D + ++ E + ++ F + -> H + ++ G + -> H + ++ H + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..a0fadbf15f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,28 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c40_A[shape="box"label=<
A
>]; + +c49_B -> c40_A; +c49_B[shape="box"label=<
B
>]; + +c53_C -> c49_B; +c53_C[shape="box"label=<
C
>]; + +c63_D -> c49_B; +c63_D[shape="box"label=<
D
>]; + +c66_E -> c49_B; +c66_E[shape="box"label=<
E
>]; + +c69_F -> c40_A; +c69_F[shape="box"label=<
F
>]; + +c72_G -> c40_A; +c72_G[shape="box"label=<
G
>]; + +c77_H -> c69_F [ label="1" ]; +c77_H -> c72_G [ label="2" ]; +c77_H[shape="box"label=<
H
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..6525b0c7f8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 35 | +| sloc | 0 | 0 | 18 | +| cloc | 0 | 0 | 6 | +| Total | 0 | 0 | 59 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..7cf9cb19f7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,21 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.12 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| A | 0 | 0 | 0.00 | 0.00 | +| B | 0 | 0 | 0.00 | 0.00 | +| C | 0 | 0 | 0.00 | 0.00 | +| D | 0 | 0 | 0.00 | 0.00 | +| E | 0 | 0 | 0.00 | 0.00 | +| F | 0 | 0 | 0.00 | 0.00 | +| G | 0 | 0 | 0.00 | 0.00 | +| H | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..e4847584d9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,25 @@ + +Contract C ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | ++-------------+-----------+ +Contract D ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | +| constructor | [] | ++-------------+-----------+ +Contract E ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | ++-------------+-----------+ +Contract H ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..7d738a9405 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,50 @@ +Constructor and pure/view functions are not displayed + +A: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +B: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +D: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +E: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +F: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +G: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +H: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..822596a74a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,25 @@ + +Contract C ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | ++-------------+-------------------+ +Contract D ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | +| constructor | | ++-------------+-------------------+ +Contract E ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | ++-------------+-------------------+ +Contract H ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..2543714686 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,17 @@ +Contract A +Contract B + Function B.constructor(uint256) (*) +Contract C + Function B.constructor(uint256) (*) +Contract D + Function B.constructor(uint256) (*) + Function D.constructor() (*) + Expression: B(2) + IRs: + INTERNAL_CALL, B.constructor(uint256)(2) +Contract E + Function B.constructor(uint256) (*) +Contract F +Contract G +Contract H + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..3398e651bd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,25 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +D: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +E: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +H: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..ccbba1d14f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_4_22_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,54 @@ + +Contract A ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract B ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract C ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract D ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | +| constructor | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract E ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract F ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract G ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract H ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..c7aee0121c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,51 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot +Call Graph: tmp.zipD.call-graph.dot +Call Graph: tmp.zipE.call-graph.dot +Call Graph: tmp.zipH.call-graph.dot + +strict digraph { +subgraph cluster_10_B { +label = "B" +"10_constructor" [label="constructor"] +}subgraph cluster_24_D { +label = "D" +"24_constructor" [label="constructor"] +"24_constructor" -> "24_constructor" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_10_B { +label = "B" +"10_constructor" [label="constructor"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_10_B { +label = "B" +"10_constructor" [label="constructor"] +}subgraph cluster_24_D { +label = "D" +"24_constructor" [label="constructor"] +"24_constructor" -> "24_constructor" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_10_B { +label = "B" +"10_constructor" [label="constructor"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..e853ef3008 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,39 @@ +Export tmp.zip-B-constructor(uint256).dot +Export tmp.zip-C-constructor(uint256).dot +Export tmp.zip-D-constructor(uint256).dot +Export tmp.zip-D-constructor().dot +Export tmp.zip-E-constructor(uint256).dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +B(2) + +IRs: +INTERNAL_CALL, B.constructor(uint256)(2)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..2a526fcfc8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,84 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| A | 0 | 0 | 0 | +| B | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| D | 0 | 0 | 0 | +| E | 0 | 0 | 0 | +| F | 0 | 0 | 0 | +| G | 0 | 0 | 0 | +| H | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| A | 0 | 0 | 0 | 0 | +| B | 0 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | +| D | 0 | 0 | 0 | 0 | +| E | 0 | 0 | 0 | 0 | +| F | 0 | 0 | 0 | 0 | +| G | 0 | 0 | 0 | 0 | +| H | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| A | 0 | 0 | 0 | +| B | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| D | 0 | 0 | 0 | +| E | 0 | 0 | 0 | +| F | 0 | 0 | 0 | +| G | 0 | 0 | 0 | +| H | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| A | 0 | 0 | 0 | +| B | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| D | 0 | 0 | 0 | +| E | 0 | 0 | 0 | +| F | 0 | 0 | 0 | +| G | 0 | 0 | 0 | +| H | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| A | 0 | 0 | 7 | 0 | 0 | +| B | 0 | 0 | 3 | 1 | 0 | +| C | 0 | 0 | 0 | 2 | 0 | +| D | 0 | 0 | 0 | 2 | 0 | +| E | 0 | 0 | 0 | 2 | 0 | +| F | 0 | 0 | 1 | 1 | 0 | +| G | 0 | 0 | 1 | 1 | 0 | +| H | 0 | 0 | 0 | 2 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..3e1b7081f5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1,53 @@ + +################# +####### C ####### +################# + +## Constructor Call Sequence + - B + +## Constructor Definitions + +### B + + constructor(uint a) public { + + } + +################# +####### D ####### +################# + +## Constructor Call Sequence + - B + - D + +## Constructor Definitions + +### B + + constructor(uint a) public { + + } + +### D + + constructor() B(2) public { + + } + +################# +####### E ####### +################# + +## Constructor Call Sequence + - B + +## Constructor Definitions + +### B + + constructor(uint a) public { + + } + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..fc25093ba0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,27 @@ + ++ Contract A + ++ Contract B + - From B + - constructor(uint256) (public) + ++ Contract C (Most derived contract) + - From B + - constructor(uint256) (public) + ++ Contract D (Most derived contract) + - From B + - constructor(uint256) (public) + - From D + - constructor() (public) + ++ Contract E (Most derived contract) + - From B + - constructor(uint256) (public) + ++ Contract F + ++ Contract G + ++ Contract H (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..c96892ab3e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,284 @@ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract D ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract D ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract E ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract D ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract E ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract F ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract D ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract E ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract F ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract G ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract D ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract E ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract F ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract G ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract H ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..7b80c61572 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,91 @@ + +# Contracts +# A + - Declaration: tests/ast-parsing/contract-0.6.0.sol#3 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/contract-0.6.0.sol#8 (15 - 16)', 'tests/ast-parsing/contract-0.6.0.sol#31 (15 - 16)', 'tests/ast-parsing/contract-0.6.0.sol#32 (15 - 16)'] + + ## Function + + ## State variables + + ## Structures +# B + - Declaration: tests/ast-parsing/contract-0.6.0.sol#8 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/contract-0.6.0.sol#15 (15 - 16)', 'tests/ast-parsing/contract-0.6.0.sol#20 (15 - 16)', 'tests/ast-parsing/contract-0.6.0.sol#27 (24 - 25)', 'tests/ast-parsing/contract-0.6.0.sol#21 (19 - 20)', 'tests/ast-parsing/contract-0.6.0.sol#21 (19 - 20)'] + + ## Function + - B.constructor(uint256) + - Declaration: tests/ast-parsing/contract-0.6.0.sol#9 (5 - 17) + - Implementation(s): ['tests/ast-parsing/contract-0.6.0.sol#9-11 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# C + - Declaration: tests/ast-parsing/contract-0.6.0.sol#15 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures +# D + - Declaration: tests/ast-parsing/contract-0.6.0.sol#20 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - D.constructor() + - Declaration: tests/ast-parsing/contract-0.6.0.sol#21 (5 - 17) + - Implementation(s): ['tests/ast-parsing/contract-0.6.0.sol#21-23 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# E + - Declaration: tests/ast-parsing/contract-0.6.0.sol#27 (19 - 21) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures +# F + - Declaration: tests/ast-parsing/contract-0.6.0.sol#31 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/contract-0.6.0.sol#33 (15 - 16)'] + + ## Function + + ## State variables + + ## Structures +# G + - Declaration: tests/ast-parsing/contract-0.6.0.sol#32 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/contract-0.6.0.sol#33 (18 - 19)'] + + ## Function + + ## State variables + + ## Structures +# H + - Declaration: tests/ast-parsing/contract-0.6.0.sol#33 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..31d5557b5e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,11 @@ +Export tmp.zip-B-constructor(uint256).dot +Export tmp.zip-C-constructor(uint256).dot +Export tmp.zip-D-constructor(uint256).dot +Export tmp.zip-D-constructor().dot +Export tmp.zip-E-constructor(uint256).dot + +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..9cfdc5376d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,83 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "B": [ + "constructor(uint256)" + ], + "C": [ + "constructor(uint256)" + ], + "D": [ + "constructor(uint256)", + "constructor()" + ], + "E": [ + "constructor(uint256)" + ] + }, + "constants_used": { + "D": { + "constructor()": [ + [ + { + "value": "2", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "A": {}, + "B": { + "constructor(uint256)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C": { + "constructor(uint256)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "D": { + "constructor(uint256)": { + "impacts": [], + "is_impacted_by": [] + }, + "constructor()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "E": { + "constructor(uint256)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "F": {}, + "G": {}, + "H": {} + }, + "constructors": { + "B": "constructor(uint256)", + "C": "constructor(uint256)", + "D": "constructor()", + "E": "constructor(uint256)" + }, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..3409904859 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,29 @@ + +C: ++----------------------+------------+ +| Name | ID | ++----------------------+------------+ +| constructor(uint256) | 0x767b6190 | ++----------------------+------------+ + +D: ++----------------------+------------+ +| Name | ID | ++----------------------+------------+ +| constructor(uint256) | 0x767b6190 | +| constructor() | 0x90fa17bb | ++----------------------+------------+ + +E: ++----------------------+------------+ +| Name | ID | ++----------------------+------------+ +| constructor(uint256) | 0x767b6190 | ++----------------------+------------+ + +H: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..bd7c530e46 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,118 @@ + +Contract A +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract B +Contract vars: [] +Inheritance:: ['A'] + ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor(uint256) | public | [] | [] | [] | [] | [] | 1 | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: [] +Inheritance:: ['B', 'A'] + ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor(uint256) | public | [] | [] | [] | [] | [] | 1 | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract D +Contract vars: [] +Inheritance:: ['B', 'A'] + ++----------------------+------------+-----------+------+-------+-----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------------+------------+-----------+------+-------+-----------------+----------------+-----------------------+ +| constructor(uint256) | public | [] | [] | [] | [] | [] | 1 | +| constructor() | public | [] | [] | [] | ['constructor'] | [] | 1 | ++----------------------+------------+-----------+------+-------+-----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract E +Contract vars: [] +Inheritance:: ['B', 'A'] + ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor(uint256) | public | [] | [] | [] | [] | [] | 1 | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract F +Contract vars: [] +Inheritance:: ['A'] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract G +Contract vars: [] +Inheritance:: ['A'] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract H +Contract vars: [] +Inheritance:: ['G', 'F', 'A'] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..d92d1a8e20 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,46 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| A | 0 | 0 | 0 | 0 | +| B | 0 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | +| D | 1 | 1 | 2 | 2 | +| E | 0 | 0 | 0 | 0 | +| F | 0 | 0 | 0 | 0 | +| G | 0 | 0 | 0 | 0 | +| H | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| A | 0 | 0 | 0 | 0 | +| B | 0 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | +| D | 3 | 3 | 2 | 5 | +| E | 0 | 0 | 0 | 0 | +| F | 0 | 0 | 0 | 0 | +| G | 0 | 0 | 0 | 0 | +| H | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| A | 0 | 0 | 0 | 0.000 | +| B | 0 | 0 | 0 | 0.000 | +| C | 0 | 0 | 0 | 0.000 | +| D | 0 | 2 | 0 | 0.001 | +| E | 0 | 0 | 0 | 0.000 | +| F | 0 | 0 | 0 | 0.000 | +| G | 0 | 0 | 0 | 0.000 | +| H | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..073e4c11f1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 8 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 18 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..f2f7255ee0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,54 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ A + ++ B + -> A + ++ C + -> B +, [A] + ++ D + -> B +, [A] + ++ E + -> B +, [A] + ++ F + -> A + ++ G + -> A + ++ H + -> F, G +, [A] + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ A + -> B, F, G +, [C, D, E, H] + ++ B + -> C, D, E + ++ C + ++ D + ++ E + ++ F + -> H + ++ G + -> H + ++ H + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..8b3a978e1a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,28 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c1_A[shape="box"label=<
A
>]; + +c10_B -> c1_A; +c10_B[shape="box"label=<
B
>]; + +c14_C -> c10_B; +c14_C[shape="box"label=<
C
>]; + +c24_D -> c10_B; +c24_D[shape="box"label=<
D
>]; + +c27_E -> c10_B; +c27_E[shape="box"label=<
E
>]; + +c30_F -> c1_A; +c30_F[shape="box"label=<
F
>]; + +c33_G -> c1_A; +c33_G[shape="box"label=<
G
>]; + +c38_H -> c30_F [ label="1" ]; +c38_H -> c33_G [ label="2" ]; +c38_H[shape="box"label=<
H
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..6525b0c7f8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 35 | +| sloc | 0 | 0 | 18 | +| cloc | 0 | 0 | 6 | +| Total | 0 | 0 | 59 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..7cf9cb19f7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,21 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.12 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| A | 0 | 0 | 0.00 | 0.00 | +| B | 0 | 0 | 0.00 | 0.00 | +| C | 0 | 0 | 0.00 | 0.00 | +| D | 0 | 0 | 0.00 | 0.00 | +| E | 0 | 0 | 0.00 | 0.00 | +| F | 0 | 0 | 0.00 | 0.00 | +| G | 0 | 0 | 0.00 | 0.00 | +| H | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..e4847584d9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,25 @@ + +Contract C ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | ++-------------+-----------+ +Contract D ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | +| constructor | [] | ++-------------+-----------+ +Contract E ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | ++-------------+-----------+ +Contract H ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..7d738a9405 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,50 @@ +Constructor and pure/view functions are not displayed + +A: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +B: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +D: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +E: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +F: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +G: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +H: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..822596a74a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,25 @@ + +Contract C ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | ++-------------+-------------------+ +Contract D ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | +| constructor | | ++-------------+-------------------+ +Contract E ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | ++-------------+-------------------+ +Contract H ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..2543714686 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,17 @@ +Contract A +Contract B + Function B.constructor(uint256) (*) +Contract C + Function B.constructor(uint256) (*) +Contract D + Function B.constructor(uint256) (*) + Function D.constructor() (*) + Expression: B(2) + IRs: + INTERNAL_CALL, B.constructor(uint256)(2) +Contract E + Function B.constructor(uint256) (*) +Contract F +Contract G +Contract H + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..3398e651bd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,25 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +D: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +E: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +H: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..ccbba1d14f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_contract_0_6_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,54 @@ + +Contract A ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract B ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract C ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract D ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | +| constructor | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract E ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract F ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract G ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract H ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..eb29b1f892 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,7 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..92f907cc2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1 @@ +No contract found diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..5007c405a6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,3 @@ + +# Contracts + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..629c987e0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,20 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": {}, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..92f907cc2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1 @@ +No contract found diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..618328d1e1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,12 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Source lines of code (SLOC) in source files: 0 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..5185118e97 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,6 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..23c2b9f30d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,4 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..174ed44267 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 1 | +| sloc | 0 | 0 | 0 | +| cloc | 0 | 0 | 1 | +| Total | 0 | 0 | 2 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..92f907cc2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1 @@ +No contract found diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..8e33777cc5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,2 @@ +Constructor and pure/view functions are not displayed + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..eb29b1f892 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,7 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..92f907cc2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1 @@ +No contract found diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..5007c405a6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,3 @@ + +# Contracts + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..2a1ca6e96e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,20 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": {}, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..92f907cc2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1 @@ +No contract found diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..618328d1e1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,12 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Source lines of code (SLOC) in source files: 0 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..5185118e97 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,6 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..23c2b9f30d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,4 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..174ed44267 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 1 | +| sloc | 0 | 0 | 0 | +| cloc | 0 | 0 | 1 | +| Total | 0 | 0 | 2 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..92f907cc2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1 @@ +No contract found diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..8e33777cc5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,2 @@ +Constructor and pure/view functions are not displayed + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_4_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..d5534c14c2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,110 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipVendingMachine.call-graph.dot +Call Graph: tmp.zipB.call-graph.dot +Call Graph: tmp.zipContractArgCustomError.call-graph.dot + +strict digraph { +subgraph cluster_145_A { +label = "A" +"145_f" [label="f"] +}subgraph cluster_165_B { +label = "B" +"165_g" [label="g"] +"165_h" [label="h"] +}subgraph cluster_200_ContractArgCustomError { +label = "ContractArgCustomError" +"200_f" [label="f"] +"200_g" [label="g"] +"200_h" [label="h"] +"200_f" -> "200_g" +"200_g" -> "200_h" +}subgraph cluster_132_VendingMachine { +label = "VendingMachine" +"132_err0" [label="err0"] +"132_err1" [label="err1"] +"132_err2" [label="err2"] +"132_err3" [label="err3"] +"132_err4" [label="err4"] +"132_err5" [label="err5"] +"132_err6" [label="err6"] +}subgraph cluster_solidity { +label = "[Solidity]" +"revert CErrorWithConst(uint256[10])" +"revert E(address)" +"revert ErrorSimple()" +"revert ErrorWithArgs(uint256,uint256)" +"revert ErrorWithConst(uint256[5])" +"revert ErrorWithEnum(I.SomeEnum)" +"revert ErrorWithStruct(St)" +"revert MyError(uint256)" +"revert(string)" +"132_err0" -> "revert ErrorSimple()" +"132_err1" -> "revert ErrorWithStruct(St)" +"132_err2" -> "revert ErrorWithArgs(uint256,uint256)" +"132_err3" -> "revert(string)" +"132_err4" -> "revert ErrorWithEnum(I.SomeEnum)" +"132_err5" -> "revert ErrorWithConst(uint256[5])" +"132_err6" -> "revert CErrorWithConst(uint256[10])" +"145_f" -> "revert MyError(uint256)" +"165_g" -> "revert MyError(uint256)" +"200_g" -> "revert E(address)" +} +} +strict digraph { +subgraph cluster_132_VendingMachine { +label = "VendingMachine" +"132_err0" [label="err0"] +"132_err1" [label="err1"] +"132_err2" [label="err2"] +"132_err3" [label="err3"] +"132_err4" [label="err4"] +"132_err5" [label="err5"] +"132_err6" [label="err6"] +"132_slitherConstructorConstantVariables" [label="slitherConstructorConstantVariables"] +}subgraph cluster_solidity { +label = "[Solidity]" +"revert CErrorWithConst(uint256[10])" +"revert ErrorSimple()" +"revert ErrorWithArgs(uint256,uint256)" +"revert ErrorWithConst(uint256[5])" +"revert ErrorWithEnum(I.SomeEnum)" +"revert ErrorWithStruct(St)" +"revert(string)" +"132_err0" -> "revert ErrorSimple()" +"132_err1" -> "revert ErrorWithStruct(St)" +"132_err2" -> "revert ErrorWithArgs(uint256,uint256)" +"132_err3" -> "revert(string)" +"132_err4" -> "revert ErrorWithEnum(I.SomeEnum)" +"132_err5" -> "revert ErrorWithConst(uint256[5])" +"132_err6" -> "revert CErrorWithConst(uint256[10])" +} +} +strict digraph { +subgraph cluster_145_A { +label = "A" +"145_f" [label="f"] +}subgraph cluster_165_B { +label = "B" +"165_g" [label="g"] +"165_h" [label="h"] +}subgraph cluster_solidity { +label = "[Solidity]" +"revert MyError(uint256)" +"145_f" -> "revert MyError(uint256)" +"165_g" -> "revert MyError(uint256)" +} +} +strict digraph { +subgraph cluster_200_ContractArgCustomError { +label = "ContractArgCustomError" +"200_f" [label="f"] +"200_g" [label="g"] +"200_h" [label="h"] +"200_f" -> "200_g" +"200_g" -> "200_h" +}subgraph cluster_solidity { +label = "[Solidity]" +"revert E(address)" +"200_g" -> "revert E(address)" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8fa86c9a27 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,247 @@ +Export tmp.zip-VendingMachine-err0().dot +Export tmp.zip-VendingMachine-err1().dot +Export tmp.zip-VendingMachine-err2().dot +Export tmp.zip-VendingMachine-err3().dot +Export tmp.zip-VendingMachine-err4().dot +Export tmp.zip-VendingMachine-err5(uint256[5]).dot +Export tmp.zip-VendingMachine-err6(uint256[10]).dot +Export tmp.zip-VendingMachine-slitherConstructorConstantVariables().dot +Export tmp.zip-A-f().dot +Export tmp.zip-B-f().dot +Export tmp.zip-B-g().dot +Export tmp.zip-B-h().dot +Export tmp.zip-ContractArgCustomError-f().dot +Export tmp.zip-ContractArgCustomError-g().dot +Export tmp.zip-ContractArgCustomError-h().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +revert ErrorSimple()() + +IRs: +TMP_0(None) = SOLIDITY_CALL revert ErrorSimple()()"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +revert ErrorWithStruct(St)(s) + +IRs: +TMP_1(None) = SOLIDITY_CALL revert ErrorWithStruct(St)(s)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +revert ErrorWithArgs(uint256,uint256)(10 + 10,10) + +IRs: +TMP_2(uint256) = 10 (c)+ 10 +TMP_3(None) = SOLIDITY_CALL revert ErrorWithArgs(uint256,uint256)(TMP_2,10)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +revert ErrorWithArgs(uint256,uint256)(uint256(SomeEnum.ONE),uint256(SomeEnum.ONE)) + +IRs: +REF_0(I.SomeEnum) -> SomeEnum.ONE +TMP_4 = CONVERT REF_0 to uint256 +REF_1(I.SomeEnum) -> SomeEnum.ONE +TMP_5 = CONVERT REF_1 to uint256 +TMP_6(None) = SOLIDITY_CALL revert ErrorWithArgs(uint256,uint256)(TMP_4,TMP_5)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +revert(string)(test) + +IRs: +TMP_7(None) = SOLIDITY_CALL revert(string)(test)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +revert ErrorWithEnum(I.SomeEnum)(SomeEnum.ONE) + +IRs: +REF_2(I.SomeEnum) -> SomeEnum.ONE +TMP_8(None) = SOLIDITY_CALL revert ErrorWithEnum(I.SomeEnum)(REF_2)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +revert ErrorWithConst(uint256[5])(a) + +IRs: +TMP_9(None) = SOLIDITY_CALL revert ErrorWithConst(uint256[5])(a)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +revert CErrorWithConst(uint256[10])(a) + +IRs: +TMP_10(None) = SOLIDITY_CALL revert CErrorWithConst(uint256[10])(a)"]; +} + +digraph{ +0[label="Node Type: OTHER_ENTRYPOINT 0 + +EXPRESSION: +CMAX = 10 + +IRs: +CMAX(uint256) := 10(uint256)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +revert MyError(uint256)(2) + +IRs: +TMP_11(None) = SOLIDITY_CALL revert MyError(uint256)(2)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +revert MyError(uint256)(2) + +IRs: +TMP_12(None) = SOLIDITY_CALL revert MyError(uint256)(2)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +revert MyError(uint256)(2) + +IRs: +TMP_13(None) = SOLIDITY_CALL revert MyError(uint256)(2)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +revert MyError(uint256).selector + +IRs: +REF_3(bytes4) (->None) := 816952677(bytes4) +RETURN REF_3"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +g() + +IRs: +INTERNAL_CALL, ContractArgCustomError.g()()"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +something = h() + +IRs: +TMP_15(bool) = INTERNAL_CALL, ContractArgCustomError.h()() +something(bool) := TMP_15(bool)"]; +1->2; +2[label="Node Type: IF 2 + +EXPRESSION: +something + +IRs: +CONDITION something"]; +2->3[label="True"]; +2->4[label="False"]; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +revert E(address)(this) + +IRs: +TMP_16(None) = SOLIDITY_CALL revert E(address)(this)"]; +3->4; +4[label="Node Type: END_IF 4 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +something + +IRs: +RETURN something"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..4bcc5a57de --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,69 @@ + + +CK complexity metrics (Variables): ++------------------------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++------------------------+-----------------+-----------+------------+ +| I | 0 | 0 | 0 | +| VendingMachine | 0 | 1 | 0 | +| A | 0 | 0 | 0 | +| B | 0 | 0 | 0 | +| ContractArgCustomError | 0 | 0 | 0 | +| TOTAL | 0 | 1 | 0 | ++------------------------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++------------------------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++------------------------+--------+----------+----------+---------+ +| I | 0 | 0 | 0 | 0 | +| VendingMachine | 7 | 0 | 1 | 0 | +| A | 1 | 0 | 0 | 0 | +| B | 3 | 0 | 0 | 0 | +| ContractArgCustomError | 0 | 1 | 0 | 2 | +| TOTAL | 11 | 1 | 1 | 2 | ++------------------------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++------------------------+----------+------+------+ +| Contract | Mutating | View | Pure | ++------------------------+----------+------+------+ +| I | 0 | 0 | 0 | +| VendingMachine | 8 | 0 | 0 | +| A | 1 | 0 | 0 | +| B | 3 | 0 | 0 | +| ContractArgCustomError | 3 | 0 | 0 | +| TOTAL | 15 | 0 | 0 | ++------------------------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++------------------------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++------------------------+-------------------+----------------------+--------------+ +| I | 0 | 0 | 0 | +| VendingMachine | 7 | 7 | 7 | +| A | 1 | 1 | 1 | +| B | 3 | 3 | 3 | +| ContractArgCustomError | 1 | 1 | 1 | +| TOTAL | 12 | 12 | 12 | ++------------------------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++------------------------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++------------------------+-----------+-----+-----+-----+-----+ +| I | 0 | 0 | 1 | 0 | 0 | +| VendingMachine | 0 | 7 | 0 | 1 | 0 | +| A | 0 | 1 | 1 | 0 | 0 | +| B | 0 | 3 | 0 | 1 | 0 | +| ContractArgCustomError | 0 | 1 | 0 | 0 | 0 | ++------------------------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..72a713f5d3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,30 @@ + ++ Contract I + ++ Contract VendingMachine (Most derived contract) + - From VendingMachine + - err0() (public) + - err1() (public) + - err2() (public) + - err3() (public) + - err4() (public) + - err5(uint256[5]) (public) + - err6(uint256[10]) (public) + ++ Contract A + - From A + - f() (public) + ++ Contract B (Most derived contract) + - From A + - f() (public) + - From B + - g() (public) + - h() (public) + ++ Contract ContractArgCustomError (Most derived contract) + - From ContractArgCustomError + - f() (external) + - g() (private) + - h() (private) + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..715f3974f7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,353 @@ + +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract VendingMachine ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| CMAX | [] | ++----------+--------------+ + +Function err0() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err1() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| s | [] | +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err2() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err3() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err4() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err5(uint256[5]) ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| a | [] | +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err6(uint256[10]) ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| a | [] | +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function slitherConstructorConstantVariables() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract VendingMachine ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| CMAX | [] | ++----------+--------------+ + +Function err0() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err1() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| s | [] | +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err2() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err3() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err4() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err5(uint256[5]) ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| a | [] | +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err6(uint256[10]) ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| a | [] | +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function slitherConstructorConstantVariables() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract VendingMachine ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| CMAX | [] | ++----------+--------------+ + +Function err0() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err1() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| s | [] | +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err2() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err3() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err4() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err5(uint256[5]) ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| a | [] | +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err6(uint256[10]) ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| a | [] | +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function slitherConstructorConstantVariables() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function g() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function h() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract VendingMachine ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| CMAX | [] | ++----------+--------------+ + +Function err0() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err1() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| s | [] | +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err2() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err3() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err4() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err5(uint256[5]) ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| a | [] | +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function err6(uint256[10]) ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| a | [] | +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Function slitherConstructorConstantVariables() ++---------------------+--------------+ +| Variable | Dependencies | ++---------------------+--------------+ +| VendingMachine.CMAX | [] | ++---------------------+--------------+ +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function g() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function h() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract ContractArgCustomError ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function g() ++-----------+---------------+ +| Variable | Dependencies | ++-----------+---------------+ +| something | ['something'] | ++-----------+---------------+ +Function h() ++-----------+--------------+ +| Variable | Dependencies | ++-----------+--------------+ +| something | [] | ++-----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..0190c439f3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,113 @@ + +# Contracts +# I + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#2 (11 - 13) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#19-49 (1 - 2)'] + - References: ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#19 (28 - 29)'] + + ## Function + + ## State variables + + ## Structures +# VendingMachine + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#19 (10 - 25) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#19-49 (1 - 2)'] + - References: [] + + ## Function + - VendingMachine.err0() + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#24 (14 - 19) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#24-26 (5 - 6)'] + - References: [] + - VendingMachine.err1() + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#27 (14 - 19) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#27-30 (5 - 6)'] + - References: [] + - VendingMachine.err2() + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#31 (14 - 19) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#31-34 (5 - 6)'] + - References: [] + - VendingMachine.err3() + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#35 (14 - 19) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#35-37 (5 - 6)'] + - References: [] + - VendingMachine.err4() + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#38 (14 - 19) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#38-40 (5 - 6)'] + - References: [] + - VendingMachine.err5(uint256[5]) + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#41 (14 - 19) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#41-43 (5 - 6)'] + - References: [] + - VendingMachine.err6(uint256[10]) + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#44 (14 - 19) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#44-46 (5 - 6)'] + - References: [] + - VendingMachine.slitherConstructorConstantVariables() + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#19-21 (1 - 5) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#19-49 (1 - 2)'] + - References: [] + + ## State variables + - CMAX + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#21 (22 - 27) + - Implementation: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#21 (5 - 31) + - References: ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#22 (35 - 39)', 'tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#44 (27 - 31)'] + + ## Structures +# A + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#51 (10 - 12) + - Implementation(s): [] + - References: ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#59 (15 - 16)'] + + ## Function + - A.f() + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#54 (14 - 16) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#54-56 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# B + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#59 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - B.g() + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#60 (14 - 16) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#60-62 (5 - 6)'] + - References: [] + - B.h() + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#64 (14 - 16) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#64-66 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# ContractArgCustomError + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#69 (10 - 33) + - Implementation(s): [] + - References: ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#70 (13 - 35)'] + + ## Function + - ContractArgCustomError.f() + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#72 (14 - 16) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#72-74 (5 - 6)'] + - References: [] + - ContractArgCustomError.g() + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#76 (14 - 16) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#76-81 (5 - 6)'] + - References: ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#73 (7 - 8)'] + - ContractArgCustomError.h() + - Declaration: tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#83 (14 - 16) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#83-84 (5 - 6)'] + - References: ['tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol#77 (24 - 25)'] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..f8c90700e8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,31 @@ +Export tmp.zip-VendingMachine-err0().dot +Export tmp.zip-VendingMachine-err1().dot +Export tmp.zip-VendingMachine-err2().dot +Export tmp.zip-VendingMachine-err3().dot +Export tmp.zip-VendingMachine-err4().dot +Export tmp.zip-VendingMachine-err5(uint256[5]).dot +Export tmp.zip-VendingMachine-err6(uint256[10]).dot +Export tmp.zip-VendingMachine-slitherConstructorConstantVariables().dot +Export tmp.zip-A-f().dot +Export tmp.zip-B-f().dot +Export tmp.zip-B-g().dot +Export tmp.zip-B-h().dot +Export tmp.zip-ContractArgCustomError-f().dot +Export tmp.zip-ContractArgCustomError-g().dot +Export tmp.zip-ContractArgCustomError-h().dot + +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..b313e48ef9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,188 @@ +{ + "payable": { + "ContractArgCustomError": [ + "f()" + ] + }, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "VendingMachine": [ + "err0()", + "err1()", + "err2()", + "err3()", + "err4()", + "err5(uint256[])", + "err6(uint256[])" + ], + "A": [ + "f()" + ], + "B": [ + "f()", + "g()", + "h()" + ] + }, + "constants_used": { + "VendingMachine": { + "err2()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ], + [ + { + "value": "20", + "type": "uint256" + } + ] + ], + "err3()": [ + [ + { + "value": "test", + "type": "string" + } + ] + ], + "err4()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + }, + "A": { + "f()": [ + [ + { + "value": "2", + "type": "uint256" + } + ] + ] + }, + "B": { + "f()": [ + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "g()": [ + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "h()": [ + [ + { + "value": "816952677", + "type": "bytes4" + } + ] + ] + } + }, + "constants_used_in_binary": { + "VendingMachine": { + "err2()": { + "BinaryType.ADDITION": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "I": {}, + "VendingMachine": { + "err0()": { + "impacts": [], + "is_impacted_by": [] + }, + "err1()": { + "impacts": [], + "is_impacted_by": [] + }, + "err2()": { + "impacts": [], + "is_impacted_by": [] + }, + "err3()": { + "impacts": [], + "is_impacted_by": [] + }, + "err4()": { + "impacts": [], + "is_impacted_by": [] + }, + "err5(uint256[])": { + "impacts": [], + "is_impacted_by": [] + }, + "err6(uint256[])": { + "impacts": [], + "is_impacted_by": [] + } + }, + "A": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "B": { + "f()": { + "impacts": [], + "is_impacted_by": [] + }, + "g()": { + "impacts": [], + "is_impacted_by": [] + }, + "h()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "ContractArgCustomError": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..7ef185a3da --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,30 @@ + +VendingMachine: ++-----------------+------------+ +| Name | ID | ++-----------------+------------+ +| err0() | 0x31b283ea | +| err1() | 0xc06495ec | +| err2() | 0x568785f0 | +| err3() | 0x77a1b5a0 | +| err4() | 0xff7515f2 | +| err5(uint256[]) | 0x28403288 | +| err6(uint256[]) | 0xc762f964 | ++-----------------+------------+ + +B: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | +| g() | 0xe2179b8e | +| h() | 0xb8c9d365 | ++------+------------+ + +ContractArgCustomError: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..4a156e3c90 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,86 @@ + +Contract I +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract VendingMachine +Contract vars: ['CMAX'] +Inheritance:: ['I'] + ++---------------------------------------+------------+-----------+------+----------+-------------------------------------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------------------------------+------------+-----------+------+----------+-------------------------------------------+----------------+-----------------------+ +| err0() | public | [] | [] | [] | ['revert ErrorSimple()'] | [] | 1 | +| err1() | public | [] | [] | [] | ['revert ErrorWithStruct(St)'] | [] | 1 | +| err2() | public | [] | [] | [] | ['revert ErrorWithArgs(uint256,uint256)'] | [] | 1 | +| err3() | public | [] | [] | [] | ['revert(string)'] | [] | 1 | +| err4() | public | [] | [] | [] | ['revert ErrorWithEnum(I.SomeEnum)'] | [] | 1 | +| err5(uint256[5]) | public | [] | [] | [] | ['revert ErrorWithConst(uint256[5])'] | [] | 1 | +| err6(uint256[10]) | public | [] | [] | [] | ['revert CErrorWithConst(uint256[10])'] | [] | 1 | +| slitherConstructorConstantVariables() | internal | [] | [] | ['CMAX'] | [] | [] | 1 | ++---------------------------------------+------------+-----------+------+----------+-------------------------------------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract A +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+-----------------------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+-----------------------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | ['revert MyError(uint256)'] | [] | 1 | ++----------+------------+-----------+------+-------+-----------------------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract B +Contract vars: [] +Inheritance:: ['A'] + ++----------+------------+-----------+------+-------+-----------------------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+-----------------------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | ['revert MyError(uint256)'] | [] | 1 | +| g() | public | [] | [] | [] | ['revert MyError(uint256)'] | [] | 1 | +| h() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+-----------------------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract ContractArgCustomError +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+----------+-------+----------------------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+----------+-------+----------------------------+----------------+-----------------------+ +| f() | external | [] | [] | [] | ['g'] | [] | 1 | +| g() | private | [] | ['this'] | [] | ['h', 'revert E(address)'] | [] | 2 | +| h() | private | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+----------+-------+----------------------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..02c20eb1af --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,37 @@ + + +Halstead complexity metrics (Core): ++------------------------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++------------------------+-----------------+------------------+----------------+-----------------+ +| I | 0 | 0 | 0 | 0 | +| VendingMachine | 15 | 11 | 21 | 11 | +| A | 1 | 1 | 1 | 1 | +| B | 4 | 3 | 5 | 3 | +| ContractArgCustomError | 6 | 6 | 5 | 4 | ++------------------------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++------------------------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++------------------------+------------+----------------+------------------+--------+ +| I | 0 | 0 | 0 | 0 | +| VendingMachine | 22 | 36 | 76 | 161 | +| A | 2 | 2 | 0 | 2 | +| B | 6 | 9 | 10 | 23 | +| ContractArgCustomError | 10 | 11 | 24 | 37 | ++------------------------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++------------------------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++------------------------+------------+--------+------+----------------+ +| I | 0 | 0 | 0 | 0.000 | +| VendingMachine | 10 | 1686 | 94 | 0.047 | +| A | 0 | 1 | 0 | 0.000 | +| B | 2 | 58 | 3 | 0.005 | +| ContractArgCustomError | 4 | 137 | 8 | 0.009 | ++------------------------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..d0aca20c5a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 5 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 68 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..e15cf91b1e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,30 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ I + ++ VendingMachine + -> I + ++ A + ++ B + -> A + ++ ContractArgCustomError + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ I + -> VendingMachine + ++ VendingMachine + ++ A + -> B + ++ B + ++ ContractArgCustomError + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..bcc26ad173 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,13 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c132_VendingMachine[shape="box"label=<
VendingMachine
Public Functions:
err0()
err1()
err2()
err3()
err4()
err5(uint256[5])
err6(uint256[10])
Private Variables:
CMAX
>]; + +c145_A[shape="box"label=<
A
Public Functions:
f()
>]; + +c165_B -> c145_A; +c165_B[shape="box"label=<
B
Public Functions:
g()
h()
>]; + +c200_ContractArgCustomError[shape="box"label=<
ContractArgCustomError
Public Functions:
f()
Private Functions:
g()
h()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..68ee408a71 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 86 | +| sloc | 0 | 0 | 68 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 154 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..df9333f2f6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,18 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++------------------------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++------------------------+------------+--------------+-------------+-----------------------------+ +| I | 0 | 0 | 0.00 | 0.00 | +| VendingMachine | 0 | 0 | 0.00 | 0.00 | +| A | 0 | 0 | 0.00 | 0.00 | +| B | 0 | 0 | 0.00 | 0.00 | +| ContractArgCustomError | 0 | 0 | 0.00 | 0.00 | ++------------------------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..c3374e0efc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,30 @@ + +Contract VendingMachine ++-------------------------------------+-----------+ +| Function | Modifiers | ++-------------------------------------+-----------+ +| err0 | [] | +| err1 | [] | +| err2 | [] | +| err3 | [] | +| err4 | [] | +| err5 | [] | +| err6 | [] | +| slitherConstructorConstantVariables | [] | ++-------------------------------------+-----------+ +Contract B ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | +| g | [] | +| h | [] | ++----------+-----------+ +Contract ContractArgCustomError ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | +| g | [] | +| h | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..27326836f4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,44 @@ +Constructor and pure/view functions are not displayed + +I: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +VendingMachine: ++-----------------+-------------------+ +| Name | Use whenNotPaused | ++-----------------+-------------------+ +| err0() | | +| err1() | | +| err2() | | +| err3() | | +| err4() | | +| err5(uint256[]) | | +| err6(uint256[]) | | ++-----------------+-------------------+ + +A: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + +B: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | +| g() | | +| h() | | ++------+-------------------+ + +ContractArgCustomError: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..1a0b0221da --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,30 @@ + +Contract VendingMachine ++-------------------------------------+-------------------+ +| Function | require or assert | ++-------------------------------------+-------------------+ +| err0 | | +| err1 | | +| err2 | | +| err3 | | +| err4 | | +| err5 | | +| err6 | | +| slitherConstructorConstantVariables | | ++-------------------------------------+-------------------+ +Contract B ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | +| g | | +| h | | ++----------+-------------------+ +Contract ContractArgCustomError ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | +| g | | +| h | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..7d5980b026 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,83 @@ +Contract I +Contract VendingMachine + Function VendingMachine.err0() (*) + Expression: revert ErrorSimple()() + IRs: + TMP_0(None) = SOLIDITY_CALL revert ErrorSimple()() + Function VendingMachine.err1() (*) + Expression: revert ErrorWithStruct(St)(s) + IRs: + TMP_1(None) = SOLIDITY_CALL revert ErrorWithStruct(St)(s) + Function VendingMachine.err2() (*) + Expression: revert ErrorWithArgs(uint256,uint256)(10 + 10,10) + IRs: + TMP_2(uint256) = 10 (c)+ 10 + TMP_3(None) = SOLIDITY_CALL revert ErrorWithArgs(uint256,uint256)(TMP_2,10) + Expression: revert ErrorWithArgs(uint256,uint256)(uint256(SomeEnum.ONE),uint256(SomeEnum.ONE)) + IRs: + REF_0(I.SomeEnum) -> SomeEnum.ONE + TMP_4 = CONVERT REF_0 to uint256 + REF_1(I.SomeEnum) -> SomeEnum.ONE + TMP_5 = CONVERT REF_1 to uint256 + TMP_6(None) = SOLIDITY_CALL revert ErrorWithArgs(uint256,uint256)(TMP_4,TMP_5) + Function VendingMachine.err3() (*) + Expression: revert(string)(test) + IRs: + TMP_7(None) = SOLIDITY_CALL revert(string)(test) + Function VendingMachine.err4() (*) + Expression: revert ErrorWithEnum(I.SomeEnum)(SomeEnum.ONE) + IRs: + REF_2(I.SomeEnum) -> SomeEnum.ONE + TMP_8(None) = SOLIDITY_CALL revert ErrorWithEnum(I.SomeEnum)(REF_2) + Function VendingMachine.err5(uint256[5]) (*) + Expression: revert ErrorWithConst(uint256[5])(a) + IRs: + TMP_9(None) = SOLIDITY_CALL revert ErrorWithConst(uint256[5])(a) + Function VendingMachine.err6(uint256[10]) (*) + Expression: revert CErrorWithConst(uint256[10])(a) + IRs: + TMP_10(None) = SOLIDITY_CALL revert CErrorWithConst(uint256[10])(a) + Function VendingMachine.slitherConstructorConstantVariables() (*) + Expression: CMAX = 10 + IRs: + CMAX(uint256) := 10(uint256) +Contract A + Function A.f() (*) + Expression: revert MyError(uint256)(2) + IRs: + TMP_11(None) = SOLIDITY_CALL revert MyError(uint256)(2) +Contract B + Function A.f() (*) + Expression: revert MyError(uint256)(2) + IRs: + TMP_12(None) = SOLIDITY_CALL revert MyError(uint256)(2) + Function B.g() (*) + Expression: revert MyError(uint256)(2) + IRs: + TMP_13(None) = SOLIDITY_CALL revert MyError(uint256)(2) + Function B.h() (*) + Expression: revert MyError(uint256).selector + IRs: + REF_3(bytes4) (->None) := 816952677(bytes4) + RETURN REF_3 +Contract ContractArgCustomError + Function ContractArgCustomError.f() (*) + Expression: g() + IRs: + INTERNAL_CALL, ContractArgCustomError.g()() + Function ContractArgCustomError.g() (*) + Expression: something = h() + IRs: + TMP_15(bool) = INTERNAL_CALL, ContractArgCustomError.h()() + something(bool) := TMP_15(bool) + Expression: something + IRs: + CONDITION something + Expression: revert E(address)(this) + IRs: + TMP_16(None) = SOLIDITY_CALL revert E(address)(this) + Function ContractArgCustomError.h() (*) + Expression: something + IRs: + RETURN something + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..2be04f812c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,19 @@ + +VendingMachine: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +B: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +ContractArgCustomError: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..c301af0eec --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_0_8_4_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,46 @@ + +Contract I ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract VendingMachine ++-------------------------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------------------------------+-------------------------+--------------------------+ +| err0 | [] | [] | +| err1 | [] | [] | +| err2 | [] | [] | +| err3 | [] | [] | +| err4 | [] | [] | +| err5 | [] | [] | +| err6 | [] | [] | +| slitherConstructorConstantVariables | ['CMAX'] | [] | ++-------------------------------------+-------------------------+--------------------------+ + +Contract A ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract B ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | +| g | [] | [] | +| h | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract ContractArgCustomError ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | +| g | [] | [] | +| h | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..6e73a63ae8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,37 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipTest.call-graph.dot +Call Graph: tmp.zipVM.call-graph.dot +Call Graph: tmp.zipA.call-graph.dot + +strict digraph { +subgraph cluster_30_A { +label = "A" +"30_b" [label="b"] +}subgraph cluster_14_VM { +label = "VM" +"14_expectRevert" [label="expectRevert"] +}subgraph cluster_solidity { +label = "[Solidity]" +}"30_b" -> "14_expectRevert" +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_14_VM { +label = "VM" +"14_expectRevert" [label="expectRevert"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_30_A { +label = "A" +"30_b" [label="b"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..1591a7080a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,25 @@ +Export tmp.zip-VM-expectRevert(bytes4).dot +Export tmp.zip-VM-expectRevert(bytes).dot +Export tmp.zip-A-b(address).dot + +digraph{ +} + +digraph{ +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +VM(c).expectRevert(Test.myError.selector) + +IRs: +TMP_0 = CONVERT c to VM +REF_1(bytes4) (->None) := 781853394(bytes4) +HIGH_LEVEL_CALL, dest:TMP_0(VM), function:expectRevert, arguments:['REF_1'] "]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..2331e14058 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,59 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| Test | 0 | 0 | 0 | +| VM | 0 | 0 | 0 | +| A | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| Test | 0 | 0 | 0 | 0 | +| VM | 0 | 2 | 0 | 0 | +| A | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 2 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| Test | 0 | 0 | 0 | +| VM | 2 | 0 | 0 | +| A | 1 | 0 | 0 | +| TOTAL | 3 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| Test | 0 | 0 | 0 | +| VM | 2 | 2 | 2 | +| A | 1 | 1 | 1 | +| TOTAL | 3 | 3 | 3 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| Test | 0 | 0 | 0 | 0 | 0 | +| VM | 0 | 2 | 0 | 0 | 1 | +| A | 1 | 2 | 0 | 0 | 1 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..c914fa18ec --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,12 @@ + ++ Contract Test (Most derived contract) + ++ Contract VM (Most derived contract) + - From VM + - expectRevert(bytes) (external) + - expectRevert(bytes4) (external) + ++ Contract A (Most derived contract) + - From A + - b(address) (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..272b990a79 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,67 @@ + +Contract Test ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract Test ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract VM ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function expectRevert(bytes4) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function expectRevert(bytes) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract Test ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract VM ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function expectRevert(bytes4) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function expectRevert(bytes) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function b(address) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..b773a89681 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,45 @@ + +# Contracts +# Test + - Declaration: tests/ast-parsing/custom-error-selector.sol#1 (11 - 16) + - Implementation(s): [] + - References: ['tests/ast-parsing/custom-error-selector.sol#11 (28 - 32)'] + + ## Function + + ## State variables + + ## Structures +# VM + - Declaration: tests/ast-parsing/custom-error-selector.sol#5 (11 - 14) + - Implementation(s): [] + - References: ['tests/ast-parsing/custom-error-selector.sol#11 (9 - 14)'] + + ## Function + - VM.expectRevert(bytes4) + - Declaration: tests/ast-parsing/custom-error-selector.sol#6 (14 - 27) + - Implementation(s): ['tests/ast-parsing/custom-error-selector.sol#6 (5 - 44)'] + - References: ['tests/ast-parsing/custom-error-selector.sol#11 (9 - 50)'] + - VM.expectRevert(bytes) + - Declaration: tests/ast-parsing/custom-error-selector.sol#7 (14 - 27) + - Implementation(s): ['tests/ast-parsing/custom-error-selector.sol#7 (5 - 52)'] + - References: [] + + ## State variables + + ## Structures +# A + - Declaration: tests/ast-parsing/custom-error-selector.sol#9 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - A.b(address) + - Declaration: tests/ast-parsing/custom-error-selector.sol#10 (14 - 16) + - Implementation(s): ['tests/ast-parsing/custom-error-selector.sol#10-12 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..9774957030 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,7 @@ +Export tmp.zip-VM-expectRevert(bytes4).dot +Export tmp.zip-VM-expectRevert(bytes).dot +Export tmp.zip-A-b(address).dot + +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..8ef5fe0075 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,53 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "A": { + "b(address)": [ + [ + { + "value": "781853394", + "type": "bytes4" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "Test": {}, + "VM": { + "expectRevert(bytes4)": { + "impacts": [], + "is_impacted_by": [] + }, + "expectRevert(bytes)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "A": { + "b(address)": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": { + "A": [ + "b(address)" + ] + }, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..871daf1e47 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,22 @@ + +Test: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +VM: ++----------------------+------------+ +| Name | ID | ++----------------------+------------+ +| expectRevert(bytes4) | 0xc31eb0e0 | +| expectRevert(bytes) | 0xf28dceb3 | ++----------------------+------------+ + +A: ++------------+------------+ +| Name | ID | ++------------+------------+ +| b(address) | 0xbda02782 | ++------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..2e2d279763 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,46 @@ + +Contract Test +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract VM +Contract vars: [] +Inheritance:: [] + ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| expectRevert(bytes4) | external | [] | [] | [] | [] | [] | 2 | +| expectRevert(bytes) | external | [] | [] | [] | [] | [] | 2 | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract A +Contract vars: [] +Inheritance:: [] + ++------------+------------+-----------+------+-------+----------------+-----------------------------------------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++------------+------------+-----------+------+-------+----------------+-----------------------------------------------+-----------------------+ +| b(address) | public | [] | [] | [] | [] | ['VM(c).expectRevert(Test.myError.selector)'] | 1 | ++------------+------------+-----------+------+-------+----------------+-----------------------------------------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..fe7429fc86 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,31 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| Test | 0 | 0 | 0 | 0 | +| VM | 0 | 0 | 0 | 0 | +| A | 3 | 3 | 5 | 4 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| Test | 0 | 0 | 0 | 0 | +| VM | 0 | 0 | 0 | 0 | +| A | 7 | 8 | 13 | 22 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| Test | 0 | 0 | 0 | 0.000 | +| VM | 0 | 0 | 0 | 0.000 | +| A | 2 | 42 | 2 | 0.004 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..0ad2077552 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 3 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 12 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..02ec4d6b1d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,18 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ Test + ++ VM + ++ A + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ Test + ++ VM + ++ A + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..d4b016fb00 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c3_Test[shape="box"label=<
Test
>]; + +c30_A[shape="box"label=<
A
Public Functions:
b(address)
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..82b84f7606 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 13 | +| sloc | 0 | 0 | 12 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 25 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..20df58c573 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,16 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.33 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| Test | 0 | 0 | 0.00 | 0.00 | +| VM | 1 | 0 | 0.00 | 0.33 | +| A | 0 | 1 | 1.00 | 0.67 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..a793014c38 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,19 @@ + +Contract Test ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ +Contract VM ++--------------+-----------+ +| Function | Modifiers | ++--------------+-----------+ +| expectRevert | [] | +| expectRevert | [] | ++--------------+-----------+ +Contract A ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| b | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..1bcc706f8e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,23 @@ +Constructor and pure/view functions are not displayed + +Test: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +VM: ++----------------------+-------------------+ +| Name | Use whenNotPaused | ++----------------------+-------------------+ +| expectRevert(bytes4) | | +| expectRevert(bytes) | | ++----------------------+-------------------+ + +A: ++------------+-------------------+ +| Name | Use whenNotPaused | ++------------+-------------------+ +| b(address) | | ++------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f7db83b59c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,19 @@ + +Contract Test ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ +Contract VM ++--------------+-------------------+ +| Function | require or assert | ++--------------+-------------------+ +| expectRevert | | +| expectRevert | | ++--------------+-------------------+ +Contract A ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| b | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..6957d79640 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,12 @@ +Contract Test +Contract VM + Function VM.expectRevert(bytes4) (*) + Function VM.expectRevert(bytes) (*) +Contract A + Function A.b(address) (*) + Expression: VM(c).expectRevert(Test.myError.selector) + IRs: + TMP_0 = CONVERT c to VM + REF_1(bytes4) (->None) := 781853394(bytes4) + HIGH_LEVEL_CALL, dest:TMP_0(VM), function:expectRevert, arguments:['REF_1'] + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..1e945501ba --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,19 @@ + +Test: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +VM: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +A: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..504e8b6519 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_selector_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,22 @@ + +Contract Test ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract VM ++--------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++--------------+-------------------------+--------------------------+ +| expectRevert | [] | [] | +| expectRevert | [] | [] | ++--------------+-------------------------+--------------------------+ + +Contract A ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| b | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..99e18dac61 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,29 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipCustomErrors.call-graph.dot +Call Graph: tmp.zipBar.call-graph.dot + +strict digraph { +subgraph cluster_33_Bar { +label = "Bar" +"33_baz" [label="baz"] +}subgraph cluster_solidity { +label = "[Solidity]" +"revert LibraryError()" +"33_baz" -> "revert LibraryError()" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_33_Bar { +label = "Bar" +"33_baz" [label="baz"] +}subgraph cluster_solidity { +label = "[Solidity]" +"revert LibraryError()" +"33_baz" -> "revert LibraryError()" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..4c71f9df63 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,15 @@ +Export tmp.zip-Bar-baz().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +CustomErrors.LibraryError() + +IRs: +TMP_0(None) = SOLIDITY_CALL revert LibraryError()()"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..4e03686501 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++--------------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++--------------+-----------------+-----------+------------+ +| CustomErrors | 0 | 0 | 0 | +| Bar | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++--------------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++--------------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++--------------+--------+----------+----------+---------+ +| CustomErrors | 0 | 0 | 0 | 0 | +| Bar | 0 | 1 | 0 | 0 | +| TOTAL | 0 | 1 | 0 | 0 | ++--------------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++--------------+----------+------+------+ +| Contract | Mutating | View | Pure | ++--------------+----------+------+------+ +| CustomErrors | 0 | 0 | 0 | +| Bar | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++--------------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++--------------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++--------------+-------------------+----------------------+--------------+ +| CustomErrors | 0 | 0 | 0 | +| Bar | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++--------------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++--------------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++--------------+-----------+-----+-----+-----+-----+ +| CustomErrors | 0 | 0 | 0 | 0 | 0 | +| Bar | 0 | 1 | 0 | 0 | 0 | ++--------------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..342de77dfe --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,7 @@ + ++ Contract CustomErrors (Most derived contract) + ++ Contract Bar (Most derived contract) + - From Bar + - baz() (external) + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..83138cfb51 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,24 @@ + +Contract CustomErrors ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract CustomErrors ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract Bar ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function baz() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..4eaf164106 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,27 @@ + +# Contracts +# CustomErrors + - Declaration: tests/ast-parsing/custom_error_with_state_variable.sol#13 (9 - 22) + - Implementation(s): [] + - References: ['tests/ast-parsing/custom_error_with_state_variable.sol#19 (20 - 32)'] + + ## Function + + ## State variables + + ## Structures +# Bar + - Declaration: tests/ast-parsing/custom_error_with_state_variable.sol#17 (10 - 14) + - Implementation(s): [] + - References: [] + + ## Function + - Bar.baz() + - Declaration: tests/ast-parsing/custom_error_with_state_variable.sol#18 (14 - 18) + - Implementation(s): ['tests/ast-parsing/custom_error_with_state_variable.sol#18-20 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..bd909b4ed0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-Bar-baz().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..676659be40 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,32 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "Bar": [ + "baz()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "CustomErrors": {}, + "Bar": { + "baz()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..c446bbde22 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,14 @@ + +CustomErrors: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +Bar: ++-------+------------+ +| Name | ID | ++-------+------------+ +| baz() | 0xa7916fac | ++-------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..b0d735d361 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,30 @@ + +Contract CustomErrors +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract Bar +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+---------------------------+---------------------------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+---------------------------+---------------------------------+-----------------------+ +| baz() | external | [] | [] | [] | ['revert LibraryError()'] | ['CustomErrors.LibraryError()'] | 1 | ++----------+------------+-----------+------+-------+---------------------------+---------------------------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..d37d6d563d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 12 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..bbd6c257d7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ CustomErrors + ++ Bar + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ CustomErrors + ++ Bar + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..e81c2e7677 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c33_Bar[shape="box"label=<
Bar
Public Functions:
baz()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..6f74175535 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 22 | +| sloc | 0 | 0 | 12 | +| cloc | 0 | 0 | 6 | +| Total | 0 | 0 | 40 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..1e4e4d4371 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++--------------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++--------------+------------+--------------+-------------+-----------------------------+ +| CustomErrors | 0 | 0 | 0.00 | 0.00 | +| Bar | 0 | 0 | 0.00 | 0.00 | ++--------------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..fa65a76fa2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,12 @@ + +Contract CustomErrors ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ +Contract Bar ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| baz | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..a1dbccb16c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,15 @@ +Constructor and pure/view functions are not displayed + +CustomErrors: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +Bar: ++-------+-------------------+ +| Name | Use whenNotPaused | ++-------+-------------------+ +| baz() | | ++-------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..de7e19fddd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,12 @@ + +Contract CustomErrors ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ +Contract Bar ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| baz | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..231228879f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,12 @@ +Contract CustomErrors +Contract Bar + Function Bar.baz() (*) + Expression: CustomErrors.LibraryError() + IRs: + TMP_0(None) = SOLIDITY_CALL revert LibraryError()() +Top level functions + Function foo() + Expression: revert ErrorWithParam(uint256)(0) + IRs: + TMP_1(None) = SOLIDITY_CALL revert ErrorWithParam(uint256)(0) + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..42ad1f2438 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,13 @@ + +CustomErrors: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +Bar: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f90fd47622 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_custom_error_with_state_variable_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,14 @@ + +Contract CustomErrors ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract Bar ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| baz | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..351ba9a906 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_53_C { +label = "C" +"53_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_53_C { +label = "C" +"53_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..2ae518d0f9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,69 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +go = true + +IRs: +go(bool) := True(bool)"]; +1->2; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->4; +3[label="Node Type: IF_LOOP 3 + +EXPRESSION: +go + +IRs: +CONDITION go"]; +3->4[label="True"]; +3->5[label="False"]; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +go = false + +IRs: +go(bool) := False(bool)"]; +4->3; +5[label="Node Type: END_LOOP 5 +"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +go = true + +IRs: +go(bool) := True(bool)"]; +6->7; +7[label="Node Type: BEGIN_LOOP 7 +"]; +7->9; +8[label="Node Type: IF_LOOP 8 + +EXPRESSION: +go + +IRs: +CONDITION go"]; +8->9[label="True"]; +8->10[label="False"]; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +go = false + +IRs: +go(bool) := False(bool)"]; +9->8; +10[label="Node Type: END_LOOP 10 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..8c1377e581 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,13 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| go | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..b763f3f093 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/dowhile-0.4.5.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/dowhile-0.4.5.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/dowhile-0.4.5.sol#2-11 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..a50f23c780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,48 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "False", + "type": "bool" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..4d7b7ca36e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 3 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..a32adce360 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 6 | 2 | 10 | 3 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 5 | 16 | 7 | 37 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 3 | 124 | 7 | 0.008 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..c85fb3bd05 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 11 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..e9395c94e6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c53_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..af5e076251 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 12 | +| sloc | 0 | 0 | 11 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 23 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..826a2ac156 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,21 @@ +Contract C + Function C.f() (*) + Expression: go = true + IRs: + go(bool) := True(bool) + Expression: go + IRs: + CONDITION go + Expression: go = false + IRs: + go(bool) := False(bool) + Expression: go = true + IRs: + go(bool) := True(bool) + Expression: go + IRs: + CONDITION go + Expression: go = false + IRs: + go(bool) := False(bool) + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..3c958edb1b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_26_C { +label = "C" +"26_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_26_C { +label = "C" +"26_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..2ae518d0f9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,69 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +go = true + +IRs: +go(bool) := True(bool)"]; +1->2; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->4; +3[label="Node Type: IF_LOOP 3 + +EXPRESSION: +go + +IRs: +CONDITION go"]; +3->4[label="True"]; +3->5[label="False"]; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +go = false + +IRs: +go(bool) := False(bool)"]; +4->3; +5[label="Node Type: END_LOOP 5 +"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +go = true + +IRs: +go(bool) := True(bool)"]; +6->7; +7[label="Node Type: BEGIN_LOOP 7 +"]; +7->9; +8[label="Node Type: IF_LOOP 8 + +EXPRESSION: +go + +IRs: +CONDITION go"]; +8->9[label="True"]; +8->10[label="False"]; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +go = false + +IRs: +go(bool) := False(bool)"]; +9->8; +10[label="Node Type: END_LOOP 10 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..8c1377e581 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,13 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| go | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..b763f3f093 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/dowhile-0.4.5.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/dowhile-0.4.5.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/dowhile-0.4.5.sol#2-11 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..acd650cdce --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,48 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "False", + "type": "bool" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..4d7b7ca36e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 3 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..a32adce360 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 6 | 2 | 10 | 3 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 5 | 16 | 7 | 37 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 3 | 124 | 7 | 0.008 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..c85fb3bd05 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 11 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..9a547498e7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c26_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..af5e076251 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 12 | +| sloc | 0 | 0 | 11 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 23 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..826a2ac156 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,21 @@ +Contract C + Function C.f() (*) + Expression: go = true + IRs: + go(bool) := True(bool) + Expression: go + IRs: + CONDITION go + Expression: go = false + IRs: + go(bool) := False(bool) + Expression: go = true + IRs: + go(bool) := True(bool) + Expression: go + IRs: + CONDITION go + Expression: go = false + IRs: + go(bool) := False(bool) + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_dowhile_0_4_5_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..2e755befef --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_39_C { +label = "C" +"39_emitWithKeyword" [label="emitWithKeyword"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_39_C { +label = "C" +"39_emitWithKeyword" [label="emitWithKeyword"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..16efd51ff5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,23 @@ +Export tmp.zip-C-emitWithKeyword().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +E(1) + +IRs: +Emit E(1)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +C.E(1) + +IRs: +Emit E(1)"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..805904f828 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - emitWithKeyword() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..d97177cab6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function emitWithKeyword() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..3fc1bbc1c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/emit-0.5.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/emit-0.5.0.sol#6 (14 - 15)'] + + ## Function + - C.emitWithKeyword() + - Declaration: tests/ast-parsing/emit-0.5.0.sol#4 (14 - 30) + - Implementation(s): ['tests/ast-parsing/emit-0.5.0.sol#4-7 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..5d4611c7dd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-emitWithKeyword().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..8a04be6872 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,38 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "C": { + "emitWithKeyword()": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "emitWithKeyword()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..8befff3352 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++-------------------+------------+ +| Name | ID | ++-------------------+------------+ +| emitWithKeyword() | 0xa03324d8 | ++-------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..59da7722a6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++-------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| emitWithKeyword() | public | [] | [] | [] | [] | ['C.E(1)'] | 1 | ++-------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..47337cfcb4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 2 | 1 | 2 | 1 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 2 | 4 | 0 | 4 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 1 | 4 | 0 | 0.001 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..4c2f4e2dc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 7 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..7e57e68dab --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c39_C[shape="box"label=<
C
Public Functions:
emitWithKeyword()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..b278f9abad --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 8 | +| sloc | 0 | 0 | 7 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 15 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..42e965bc05 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++-----------------+-----------+ +| Function | Modifiers | ++-----------------+-----------+ +| emitWithKeyword | [] | ++-----------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..b3d1e39cb6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++-------------------+-------------------+ +| Name | Use whenNotPaused | ++-------------------+-------------------+ +| emitWithKeyword() | | ++-------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..59c10d65f0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++-----------------+-------------------+ +| Function | require or assert | ++-----------------+-------------------+ +| emitWithKeyword | | ++-----------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..7a3f4939ea --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,9 @@ +Contract C + Function C.emitWithKeyword() (*) + Expression: E(1) + IRs: + Emit E(1) + Expression: C.E(1) + IRs: + Emit E(1) + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..3fa112e8b6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++-----------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-----------------+-------------------------+--------------------------+ +| emitWithKeyword | [] | [] | ++-----------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..eaccd3077c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_19_C { +label = "C" +"19_emitWithKeyword" [label="emitWithKeyword"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_19_C { +label = "C" +"19_emitWithKeyword" [label="emitWithKeyword"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..16efd51ff5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,23 @@ +Export tmp.zip-C-emitWithKeyword().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +E(1) + +IRs: +Emit E(1)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +C.E(1) + +IRs: +Emit E(1)"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..805904f828 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - emitWithKeyword() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..d97177cab6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function emitWithKeyword() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..3fc1bbc1c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/emit-0.5.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/emit-0.5.0.sol#6 (14 - 15)'] + + ## Function + - C.emitWithKeyword() + - Declaration: tests/ast-parsing/emit-0.5.0.sol#4 (14 - 30) + - Implementation(s): ['tests/ast-parsing/emit-0.5.0.sol#4-7 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..5d4611c7dd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-emitWithKeyword().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..0246cf7055 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,38 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "C": { + "emitWithKeyword()": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "emitWithKeyword()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..8befff3352 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++-------------------+------------+ +| Name | ID | ++-------------------+------------+ +| emitWithKeyword() | 0xa03324d8 | ++-------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..59da7722a6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++-------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| emitWithKeyword() | public | [] | [] | [] | [] | ['C.E(1)'] | 1 | ++-------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..47337cfcb4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 2 | 1 | 2 | 1 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 2 | 4 | 0 | 4 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 1 | 4 | 0 | 0.001 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..4c2f4e2dc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 7 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..a1d3247a90 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c19_C[shape="box"label=<
C
Public Functions:
emitWithKeyword()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..b278f9abad --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 8 | +| sloc | 0 | 0 | 7 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 15 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..42e965bc05 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++-----------------+-----------+ +| Function | Modifiers | ++-----------------+-----------+ +| emitWithKeyword | [] | ++-----------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..b3d1e39cb6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++-------------------+-------------------+ +| Name | Use whenNotPaused | ++-------------------+-------------------+ +| emitWithKeyword() | | ++-------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..59c10d65f0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++-----------------+-------------------+ +| Function | require or assert | ++-----------------+-------------------+ +| emitWithKeyword | | ++-----------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..7a3f4939ea --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,9 @@ +Contract C + Function C.emitWithKeyword() (*) + Expression: E(1) + IRs: + Emit E(1) + Expression: C.E(1) + IRs: + Emit E(1) + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..3fa112e8b6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_emit_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++-----------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-----------------+-------------------------+--------------------------+ +| emitWithKeyword | [] | [] | ++-----------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..7e5c48f1fe --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/enum-0.4.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..dbf420a942 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 26 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..43c5b9c08f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c529_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..bc2d994611 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 29 | +| sloc | 0 | 0 | 26 | +| cloc | 0 | 0 | 2 | +| Total | 0 | 0 | 57 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..20d4d6fde0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/enum-0.8.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..2a92db940a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..4c2f4e2dc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 7 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..561cb5fc58 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c5_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..b278f9abad --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 8 | +| sloc | 0 | 0 | 7 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 15 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_enum_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..3d1cc52cbc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/event-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..b7508cda54 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 6 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..86eba8d3f4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c27_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..6bc24871a0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 6 | +| sloc | 0 | 0 | 6 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 12 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..3d1cc52cbc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/event-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..2a92db940a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..b7508cda54 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 6 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..56f619e956 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c13_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..6bc24871a0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 6 | +| sloc | 0 | 0 | 6 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 12 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_event_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1f65449da3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,39 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_463_C { +label = "C" +"463_loopNoCond" [label="loopNoCond"] +"463_loopNoCondPost" [label="loopNoCondPost"] +"463_loopNoPost" [label="loopNoPost"] +"463_loopNoPre" [label="loopNoPre"] +"463_loopNoPreCond" [label="loopNoPreCond"] +"463_loopNoPreCondPost" [label="loopNoPreCondPost"] +"463_loopNoPreCondPostBody" [label="loopNoPreCondPostBody"] +"463_loopNoPrePost" [label="loopNoPrePost"] +"463_normalLoopBlockBody" [label="normalLoopBlockBody"] +"463_normalLoopExprBody" [label="normalLoopExprBody"] +"463_normalLoopNoBody" [label="normalLoopNoBody"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_463_C { +label = "C" +"463_loopNoCond" [label="loopNoCond"] +"463_loopNoCondPost" [label="loopNoCondPost"] +"463_loopNoPost" [label="loopNoPost"] +"463_loopNoPre" [label="loopNoPre"] +"463_loopNoPreCond" [label="loopNoPreCond"] +"463_loopNoPreCondPost" [label="loopNoPreCondPost"] +"463_loopNoPreCondPostBody" [label="loopNoPreCondPostBody"] +"463_loopNoPrePost" [label="loopNoPrePost"] +"463_normalLoopBlockBody" [label="normalLoopBlockBody"] +"463_normalLoopExprBody" [label="normalLoopExprBody"] +"463_normalLoopNoBody" [label="normalLoopNoBody"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..322ab8c6b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,539 @@ +Export tmp.zip-C-normalLoopBlockBody().dot +Export tmp.zip-C-normalLoopExprBody().dot +Export tmp.zip-C-normalLoopNoBody().dot +Export tmp.zip-C-loopNoPre().dot +Export tmp.zip-C-loopNoCond().dot +Export tmp.zip-C-loopNoPost().dot +Export tmp.zip-C-loopNoPreCond().dot +Export tmp.zip-C-loopNoPrePost().dot +Export tmp.zip-C-loopNoCondPost().dot +Export tmp.zip-C-loopNoPreCondPost().dot +Export tmp.zip-C-loopNoPreCondPostBody().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_0(bool) = i < 10 +CONDITION TMP_0"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +c ++ + +IRs: +TMP_1(uint256) := c(uint256) +c(uint256) = c + 1"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +i ++ + +IRs: +TMP_2(uint256) := i(uint256) +i(uint256) = i + 1"]; +7->5; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_3(bool) = i < 10 +CONDITION TMP_3"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +c ++ + +IRs: +TMP_4(uint256) := c(uint256) +c(uint256) = c + 1"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +i ++ + +IRs: +TMP_5(uint256) := i(uint256) +i(uint256) = i + 1"]; +7->5; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_6(bool) = i < 10 +CONDITION TMP_6"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +i ++ + +IRs: +TMP_7(uint256) := i(uint256) +i(uint256) = i + 1"]; +6->5; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +2->3; +3[label="Node Type: BEGIN_LOOP 3 +"]; +3->5; +4[label="Node Type: END_LOOP 4 +"]; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_8(bool) = i < 10 +CONDITION TMP_8"]; +5->6[label="True"]; +5->4[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +c ++ + +IRs: +TMP_9(uint256) := c(uint256) +c(uint256) = c + 1"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +i ++ + +IRs: +TMP_10(uint256) := i(uint256) +i(uint256) = i + 1"]; +7->5; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF 5 + +EXPRESSION: +i >= 10 + +IRs: +TMP_11(bool) = i >= 10 +CONDITION TMP_11"]; +5->6[label="True"]; +5->7[label="False"]; +6[label="Node Type: BREAK 6 +"]; +6->3; +7[label="Node Type: END_IF 7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +c ++ + +IRs: +TMP_12(uint256) := c(uint256) +c(uint256) = c + 1"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +i ++ + +IRs: +TMP_13(uint256) := i(uint256) +i(uint256) = i + 1"]; +9->2; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_14(bool) = i < 10 +CONDITION TMP_14"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +c ++ + +IRs: +TMP_15(uint256) := c(uint256) +c(uint256) = c + 1"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +i ++ + +IRs: +TMP_16(uint256) := i(uint256) +i(uint256) = i + 1"]; +7->5; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +2->3; +3[label="Node Type: BEGIN_LOOP 3 +"]; +3->5; +4[label="Node Type: END_LOOP 4 +"]; +5[label="Node Type: IF 5 + +EXPRESSION: +i >= 10 + +IRs: +TMP_17(bool) = i >= 10 +CONDITION TMP_17"]; +5->6[label="True"]; +5->7[label="False"]; +6[label="Node Type: BREAK 6 +"]; +6->4; +7[label="Node Type: END_IF 7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +c ++ + +IRs: +TMP_18(uint256) := c(uint256) +c(uint256) = c + 1"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +i ++ + +IRs: +TMP_19(uint256) := i(uint256) +i(uint256) = i + 1"]; +9->3; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +2->3; +3[label="Node Type: BEGIN_LOOP 3 +"]; +3->5; +4[label="Node Type: END_LOOP 4 +"]; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_20(bool) = i < 10 +CONDITION TMP_20"]; +5->6[label="True"]; +5->4[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +c ++ + +IRs: +TMP_21(uint256) := c(uint256) +c(uint256) = c + 1"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +i ++ + +IRs: +TMP_22(uint256) := i(uint256) +i(uint256) = i + 1"]; +7->5; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF 5 + +EXPRESSION: +i >= 10 + +IRs: +TMP_23(bool) = i >= 10 +CONDITION TMP_23"]; +5->6[label="True"]; +5->7[label="False"]; +6[label="Node Type: BREAK 6 +"]; +6->3; +7[label="Node Type: END_IF 7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +c ++ + +IRs: +TMP_24(uint256) := c(uint256) +c(uint256) = c + 1"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +i ++ + +IRs: +TMP_25(uint256) := i(uint256) +i(uint256) = i + 1"]; +9->2; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +2->3; +3[label="Node Type: BEGIN_LOOP 3 +"]; +3->5; +4[label="Node Type: END_LOOP 4 +"]; +5[label="Node Type: IF 5 + +EXPRESSION: +i >= 10 + +IRs: +TMP_26(bool) = i >= 10 +CONDITION TMP_26"]; +5->6[label="True"]; +5->7[label="False"]; +6[label="Node Type: BREAK 6 +"]; +6->4; +7[label="Node Type: END_IF 7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +c ++ + +IRs: +TMP_27(uint256) := c(uint256) +c(uint256) = c + 1"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +i ++ + +IRs: +TMP_28(uint256) := i(uint256) +i(uint256) = i + 1"]; +9->3; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: BEGIN_LOOP 1 +"]; +1->1; +1->2; +2[label="Node Type: END_LOOP 2 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..f899089271 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 11 | 0 | 0 | 0 | +| TOTAL | 11 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 11 | 0 | 0 | +| TOTAL | 11 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 11 | 11 | 11 | +| TOTAL | 11 | 11 | 11 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 11 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..80920bd9d1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,15 @@ + ++ Contract C (Most derived contract) + - From C + - loopNoCond() (public) + - loopNoCondPost() (public) + - loopNoPost() (public) + - loopNoPre() (public) + - loopNoPreCond() (public) + - loopNoPreCondPost() (public) + - loopNoPreCondPostBody() (public) + - loopNoPrePost() (public) + - normalLoopBlockBody() (public) + - normalLoopExprBody() (public) + - normalLoopNoBody() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..797fbb13a5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,82 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function normalLoopBlockBody() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function normalLoopExprBody() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function normalLoopNoBody() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | [] | +| i | ['i'] | ++----------+--------------+ +Function loopNoPre() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoCond() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoPost() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoPreCond() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoPrePost() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoCondPost() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoPreCondPost() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoPreCondPostBody() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..53e9d75386 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,57 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/for-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.normalLoopBlockBody() + - Declaration: tests/ast-parsing/for-all.sol#2 (14 - 34) + - Implementation(s): ['tests/ast-parsing/for-all.sol#2-7 (5 - 6)'] + - References: [] + - C.normalLoopExprBody() + - Declaration: tests/ast-parsing/for-all.sol#8 (14 - 33) + - Implementation(s): ['tests/ast-parsing/for-all.sol#8-11 (5 - 6)'] + - References: [] + - C.normalLoopNoBody() + - Declaration: tests/ast-parsing/for-all.sol#12 (14 - 31) + - Implementation(s): ['tests/ast-parsing/for-all.sol#12-16 (5 - 6)'] + - References: [] + - C.loopNoPre() + - Declaration: tests/ast-parsing/for-all.sol#17 (14 - 24) + - Implementation(s): ['tests/ast-parsing/for-all.sol#17-24 (5 - 6)'] + - References: [] + - C.loopNoCond() + - Declaration: tests/ast-parsing/for-all.sol#25 (14 - 25) + - Implementation(s): ['tests/ast-parsing/for-all.sol#25-31 (5 - 6)'] + - References: [] + - C.loopNoPost() + - Declaration: tests/ast-parsing/for-all.sol#32 (14 - 25) + - Implementation(s): ['tests/ast-parsing/for-all.sol#32-38 (5 - 6)'] + - References: [] + - C.loopNoPreCond() + - Declaration: tests/ast-parsing/for-all.sol#39 (14 - 28) + - Implementation(s): ['tests/ast-parsing/for-all.sol#39-47 (5 - 6)'] + - References: [] + - C.loopNoPrePost() + - Declaration: tests/ast-parsing/for-all.sol#48 (14 - 28) + - Implementation(s): ['tests/ast-parsing/for-all.sol#48-55 (5 - 6)'] + - References: [] + - C.loopNoCondPost() + - Declaration: tests/ast-parsing/for-all.sol#56 (14 - 29) + - Implementation(s): ['tests/ast-parsing/for-all.sol#56-63 (5 - 6)'] + - References: [] + - C.loopNoPreCondPost() + - Declaration: tests/ast-parsing/for-all.sol#64 (14 - 32) + - Implementation(s): ['tests/ast-parsing/for-all.sol#64-72 (5 - 6)'] + - References: [] + - C.loopNoPreCondPostBody() + - Declaration: tests/ast-parsing/for-all.sol#73 (14 - 36) + - Implementation(s): ['tests/ast-parsing/for-all.sol#73-75 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..3e69a3505c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,23 @@ +Export tmp.zip-C-normalLoopBlockBody().dot +Export tmp.zip-C-normalLoopExprBody().dot +Export tmp.zip-C-normalLoopNoBody().dot +Export tmp.zip-C-loopNoPre().dot +Export tmp.zip-C-loopNoCond().dot +Export tmp.zip-C-loopNoPost().dot +Export tmp.zip-C-loopNoPreCond().dot +Export tmp.zip-C-loopNoPrePost().dot +Export tmp.zip-C-loopNoCondPost().dot +Export tmp.zip-C-loopNoPreCondPost().dot +Export tmp.zip-C-loopNoPreCondPostBody().dot + +None +None +None +None +None +None +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..9d6ee40b08 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,467 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "normalLoopBlockBody()", + "normalLoopExprBody()", + "normalLoopNoBody()", + "loopNoPre()", + "loopNoCond()", + "loopNoPost()", + "loopNoPreCond()", + "loopNoPrePost()", + "loopNoCondPost()", + "loopNoPreCondPost()", + "loopNoPreCondPostBody()" + ] + }, + "constants_used": { + "C": { + "normalLoopBlockBody()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "normalLoopExprBody()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "normalLoopNoBody()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoPre()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoCond()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoPost()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoPreCond()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoPrePost()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoCondPost()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoPreCondPost()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "normalLoopBlockBody()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "normalLoopExprBody()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "normalLoopNoBody()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoPre()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoCond()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.GREATER_EQUAL": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoPost()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoPreCond()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.GREATER_EQUAL": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoPrePost()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoCondPost()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.GREATER_EQUAL": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoPreCondPost()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.GREATER_EQUAL": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "normalLoopBlockBody()": { + "impacts": [], + "is_impacted_by": [] + }, + "normalLoopExprBody()": { + "impacts": [], + "is_impacted_by": [] + }, + "normalLoopNoBody()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoPre()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoCond()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoPost()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoPreCond()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoPrePost()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoCondPost()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoPreCondPost()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoPreCondPostBody()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..8c473bee8d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,18 @@ + +C: ++-------------------------+------------+ +| Name | ID | ++-------------------------+------------+ +| normalLoopBlockBody() | 0xb6c9961e | +| normalLoopExprBody() | 0x3edee383 | +| normalLoopNoBody() | 0xc1cf47d9 | +| loopNoPre() | 0x0c584421 | +| loopNoCond() | 0x48fcd3a6 | +| loopNoPost() | 0xee10bb2f | +| loopNoPreCond() | 0x7b5ab757 | +| loopNoPrePost() | 0x0101ba08 | +| loopNoCondPost() | 0x16ecda9e | +| loopNoPreCondPost() | 0x53acacb5 | +| loopNoPreCondPostBody() | 0x44614fc5 | ++-------------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..79ad8cf2cd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,26 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++-------------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-------------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| normalLoopBlockBody() | public | [] | [] | [] | [] | [] | 2 | +| normalLoopExprBody() | public | [] | [] | [] | [] | [] | 2 | +| normalLoopNoBody() | public | [] | [] | [] | [] | [] | 2 | +| loopNoPre() | public | [] | [] | [] | [] | [] | 2 | +| loopNoCond() | public | [] | [] | [] | [] | [] | 2 | +| loopNoPost() | public | [] | [] | [] | [] | [] | 2 | +| loopNoPreCond() | public | [] | [] | [] | [] | [] | 2 | +| loopNoPrePost() | public | [] | [] | [] | [] | [] | 2 | +| loopNoCondPost() | public | [] | [] | [] | [] | [] | 2 | +| loopNoPreCondPost() | public | [] | [] | [] | [] | [] | 2 | +| loopNoPreCondPostBody() | public | [] | [] | [] | [] | [] | 2 | ++-------------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..3e9ffcbb2e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 68 | 5 | 116 | 22 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 27 | 184 | 110 | 875 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 13 | 11533 | 641 | 0.170 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..e06a6b6688 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 74 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..2555adf819 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c463_C[shape="box"label=<
C
Public Functions:
normalLoopBlockBody()
normalLoopExprBody()
normalLoopNoBody()
loopNoPre()
loopNoCond()
loopNoPost()
loopNoPreCond()
loopNoPrePost()
loopNoCondPost()
loopNoPreCondPost()
loopNoPreCondPostBody()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..067ba8ee1e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 76 | +| sloc | 0 | 0 | 74 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 150 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..389f675ce6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,17 @@ + +Contract C ++-----------------------+-----------+ +| Function | Modifiers | ++-----------------------+-----------+ +| normalLoopBlockBody | [] | +| normalLoopExprBody | [] | +| normalLoopNoBody | [] | +| loopNoPre | [] | +| loopNoCond | [] | +| loopNoPost | [] | +| loopNoPreCond | [] | +| loopNoPrePost | [] | +| loopNoCondPost | [] | +| loopNoPreCondPost | [] | +| loopNoPreCondPostBody | [] | ++-----------------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..32e9921eb7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,19 @@ +Constructor and pure/view functions are not displayed + +C: ++-------------------------+-------------------+ +| Name | Use whenNotPaused | ++-------------------------+-------------------+ +| normalLoopBlockBody() | | +| normalLoopExprBody() | | +| normalLoopNoBody() | | +| loopNoPre() | | +| loopNoCond() | | +| loopNoPost() | | +| loopNoPreCond() | | +| loopNoPrePost() | | +| loopNoCondPost() | | +| loopNoPreCondPost() | | +| loopNoPreCondPostBody() | | ++-------------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..56b3f8ad61 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,17 @@ + +Contract C ++-----------------------+-------------------+ +| Function | require or assert | ++-----------------------+-------------------+ +| normalLoopBlockBody | | +| normalLoopExprBody | | +| normalLoopNoBody | | +| loopNoPre | | +| loopNoCond | | +| loopNoPost | | +| loopNoPreCond | | +| loopNoPrePost | | +| loopNoCondPost | | +| loopNoPreCondPost | | +| loopNoPreCondPostBody | | ++-----------------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..172875c149 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,159 @@ +Contract C + Function C.normalLoopBlockBody() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_0(bool) = i < 10 + CONDITION TMP_0 + Expression: c ++ + IRs: + TMP_1(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: i ++ + IRs: + TMP_2(uint256) := i(uint256) + i(uint256) = i + 1 + Function C.normalLoopExprBody() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_3(bool) = i < 10 + CONDITION TMP_3 + Expression: c ++ + IRs: + TMP_4(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: i ++ + IRs: + TMP_5(uint256) := i(uint256) + i(uint256) = i + 1 + Function C.normalLoopNoBody() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_6(bool) = i < 10 + CONDITION TMP_6 + Expression: i ++ + IRs: + TMP_7(uint256) := i(uint256) + i(uint256) = i + 1 + Function C.loopNoPre() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_8(bool) = i < 10 + CONDITION TMP_8 + Expression: c ++ + IRs: + TMP_9(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: i ++ + IRs: + TMP_10(uint256) := i(uint256) + i(uint256) = i + 1 + Function C.loopNoCond() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i >= 10 + IRs: + TMP_11(bool) = i >= 10 + CONDITION TMP_11 + Expression: c ++ + IRs: + TMP_12(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: i ++ + IRs: + TMP_13(uint256) := i(uint256) + i(uint256) = i + 1 + Function C.loopNoPost() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_14(bool) = i < 10 + CONDITION TMP_14 + Expression: c ++ + IRs: + TMP_15(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: i ++ + IRs: + TMP_16(uint256) := i(uint256) + i(uint256) = i + 1 + Function C.loopNoPreCond() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i >= 10 + IRs: + TMP_17(bool) = i >= 10 + CONDITION TMP_17 + Expression: c ++ + IRs: + TMP_18(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: i ++ + IRs: + TMP_19(uint256) := i(uint256) + i(uint256) = i + 1 + Function C.loopNoPrePost() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_20(bool) = i < 10 + CONDITION TMP_20 + Expression: c ++ + IRs: + TMP_21(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: i ++ + IRs: + TMP_22(uint256) := i(uint256) + i(uint256) = i + 1 + Function C.loopNoCondPost() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i >= 10 + IRs: + TMP_23(bool) = i >= 10 + CONDITION TMP_23 + Expression: c ++ + IRs: + TMP_24(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: i ++ + IRs: + TMP_25(uint256) := i(uint256) + i(uint256) = i + 1 + Function C.loopNoPreCondPost() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i >= 10 + IRs: + TMP_26(bool) = i >= 10 + CONDITION TMP_26 + Expression: c ++ + IRs: + TMP_27(uint256) := c(uint256) + c(uint256) = c + 1 + Expression: i ++ + IRs: + TMP_28(uint256) := i(uint256) + i(uint256) = i + 1 + Function C.loopNoPreCondPostBody() (*) + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..dc9d868c9c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,18 @@ + +Contract C ++-----------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-----------------------+-------------------------+--------------------------+ +| normalLoopBlockBody | [] | [] | +| normalLoopExprBody | [] | [] | +| normalLoopNoBody | [] | [] | +| loopNoPre | [] | [] | +| loopNoCond | [] | [] | +| loopNoPost | [] | [] | +| loopNoPreCond | [] | [] | +| loopNoPrePost | [] | [] | +| loopNoCondPost | [] | [] | +| loopNoPreCondPost | [] | [] | +| loopNoPreCondPostBody | [] | [] | ++-----------------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..7d9dcb16bd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,39 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_231_C { +label = "C" +"231_loopNoCond" [label="loopNoCond"] +"231_loopNoCondPost" [label="loopNoCondPost"] +"231_loopNoPost" [label="loopNoPost"] +"231_loopNoPre" [label="loopNoPre"] +"231_loopNoPreCond" [label="loopNoPreCond"] +"231_loopNoPreCondPost" [label="loopNoPreCondPost"] +"231_loopNoPreCondPostBody" [label="loopNoPreCondPostBody"] +"231_loopNoPrePost" [label="loopNoPrePost"] +"231_normalLoopBlockBody" [label="normalLoopBlockBody"] +"231_normalLoopExprBody" [label="normalLoopExprBody"] +"231_normalLoopNoBody" [label="normalLoopNoBody"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_231_C { +label = "C" +"231_loopNoCond" [label="loopNoCond"] +"231_loopNoCondPost" [label="loopNoCondPost"] +"231_loopNoPost" [label="loopNoPost"] +"231_loopNoPre" [label="loopNoPre"] +"231_loopNoPreCond" [label="loopNoPreCond"] +"231_loopNoPreCondPost" [label="loopNoPreCondPost"] +"231_loopNoPreCondPostBody" [label="loopNoPreCondPostBody"] +"231_loopNoPrePost" [label="loopNoPrePost"] +"231_normalLoopBlockBody" [label="normalLoopBlockBody"] +"231_normalLoopExprBody" [label="normalLoopExprBody"] +"231_normalLoopNoBody" [label="normalLoopNoBody"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..74c28005ea --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,539 @@ +Export tmp.zip-C-normalLoopBlockBody().dot +Export tmp.zip-C-normalLoopExprBody().dot +Export tmp.zip-C-normalLoopNoBody().dot +Export tmp.zip-C-loopNoPre().dot +Export tmp.zip-C-loopNoCond().dot +Export tmp.zip-C-loopNoPost().dot +Export tmp.zip-C-loopNoPreCond().dot +Export tmp.zip-C-loopNoPrePost().dot +Export tmp.zip-C-loopNoCondPost().dot +Export tmp.zip-C-loopNoPreCondPost().dot +Export tmp.zip-C-loopNoPreCondPostBody().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_0(bool) = i < 10 +CONDITION TMP_0"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +c ++ + +IRs: +TMP_1(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +i ++ + +IRs: +TMP_2(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +7->5; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_3(bool) = i < 10 +CONDITION TMP_3"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +c ++ + +IRs: +TMP_4(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +i ++ + +IRs: +TMP_5(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +7->5; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_6(bool) = i < 10 +CONDITION TMP_6"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +i ++ + +IRs: +TMP_7(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +6->5; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +2->3; +3[label="Node Type: BEGIN_LOOP 3 +"]; +3->5; +4[label="Node Type: END_LOOP 4 +"]; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_8(bool) = i < 10 +CONDITION TMP_8"]; +5->6[label="True"]; +5->4[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +c ++ + +IRs: +TMP_9(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +i ++ + +IRs: +TMP_10(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +7->5; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF 5 + +EXPRESSION: +i >= 10 + +IRs: +TMP_11(bool) = i >= 10 +CONDITION TMP_11"]; +5->6[label="True"]; +5->7[label="False"]; +6[label="Node Type: BREAK 6 +"]; +6->3; +7[label="Node Type: END_IF 7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +c ++ + +IRs: +TMP_12(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +i ++ + +IRs: +TMP_13(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +9->2; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_14(bool) = i < 10 +CONDITION TMP_14"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +c ++ + +IRs: +TMP_15(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +i ++ + +IRs: +TMP_16(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +7->5; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +2->3; +3[label="Node Type: BEGIN_LOOP 3 +"]; +3->5; +4[label="Node Type: END_LOOP 4 +"]; +5[label="Node Type: IF 5 + +EXPRESSION: +i >= 10 + +IRs: +TMP_17(bool) = i >= 10 +CONDITION TMP_17"]; +5->6[label="True"]; +5->7[label="False"]; +6[label="Node Type: BREAK 6 +"]; +6->4; +7[label="Node Type: END_IF 7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +c ++ + +IRs: +TMP_18(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +i ++ + +IRs: +TMP_19(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +9->3; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +2->3; +3[label="Node Type: BEGIN_LOOP 3 +"]; +3->5; +4[label="Node Type: END_LOOP 4 +"]; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +i < 10 + +IRs: +TMP_20(bool) = i < 10 +CONDITION TMP_20"]; +5->6[label="True"]; +5->4[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +c ++ + +IRs: +TMP_21(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +i ++ + +IRs: +TMP_22(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +7->5; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +4->2; +5[label="Node Type: IF 5 + +EXPRESSION: +i >= 10 + +IRs: +TMP_23(bool) = i >= 10 +CONDITION TMP_23"]; +5->6[label="True"]; +5->7[label="False"]; +6[label="Node Type: BREAK 6 +"]; +6->3; +7[label="Node Type: END_IF 7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +c ++ + +IRs: +TMP_24(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +i ++ + +IRs: +TMP_25(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +9->2; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +i = 0 + +IRs: +i(uint256) := 0(uint256)"]; +2->3; +3[label="Node Type: BEGIN_LOOP 3 +"]; +3->5; +4[label="Node Type: END_LOOP 4 +"]; +5[label="Node Type: IF 5 + +EXPRESSION: +i >= 10 + +IRs: +TMP_26(bool) = i >= 10 +CONDITION TMP_26"]; +5->6[label="True"]; +5->7[label="False"]; +6[label="Node Type: BREAK 6 +"]; +6->4; +7[label="Node Type: END_IF 7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +c ++ + +IRs: +TMP_27(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +i ++ + +IRs: +TMP_28(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +9->3; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: BEGIN_LOOP 1 +"]; +1->1; +1->2; +2[label="Node Type: END_LOOP 2 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..f899089271 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 11 | 0 | 0 | 0 | +| TOTAL | 11 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 11 | 0 | 0 | +| TOTAL | 11 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 11 | 11 | 11 | +| TOTAL | 11 | 11 | 11 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 11 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..80920bd9d1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,15 @@ + ++ Contract C (Most derived contract) + - From C + - loopNoCond() (public) + - loopNoCondPost() (public) + - loopNoPost() (public) + - loopNoPre() (public) + - loopNoPreCond() (public) + - loopNoPreCondPost() (public) + - loopNoPreCondPostBody() (public) + - loopNoPrePost() (public) + - normalLoopBlockBody() (public) + - normalLoopExprBody() (public) + - normalLoopNoBody() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..797fbb13a5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,82 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function normalLoopBlockBody() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function normalLoopExprBody() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function normalLoopNoBody() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | [] | +| i | ['i'] | ++----------+--------------+ +Function loopNoPre() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoCond() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoPost() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoPreCond() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoPrePost() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoCondPost() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoPreCondPost() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| c | ['c'] | +| i | ['i'] | ++----------+--------------+ +Function loopNoPreCondPostBody() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..53e9d75386 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,57 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/for-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.normalLoopBlockBody() + - Declaration: tests/ast-parsing/for-all.sol#2 (14 - 34) + - Implementation(s): ['tests/ast-parsing/for-all.sol#2-7 (5 - 6)'] + - References: [] + - C.normalLoopExprBody() + - Declaration: tests/ast-parsing/for-all.sol#8 (14 - 33) + - Implementation(s): ['tests/ast-parsing/for-all.sol#8-11 (5 - 6)'] + - References: [] + - C.normalLoopNoBody() + - Declaration: tests/ast-parsing/for-all.sol#12 (14 - 31) + - Implementation(s): ['tests/ast-parsing/for-all.sol#12-16 (5 - 6)'] + - References: [] + - C.loopNoPre() + - Declaration: tests/ast-parsing/for-all.sol#17 (14 - 24) + - Implementation(s): ['tests/ast-parsing/for-all.sol#17-24 (5 - 6)'] + - References: [] + - C.loopNoCond() + - Declaration: tests/ast-parsing/for-all.sol#25 (14 - 25) + - Implementation(s): ['tests/ast-parsing/for-all.sol#25-31 (5 - 6)'] + - References: [] + - C.loopNoPost() + - Declaration: tests/ast-parsing/for-all.sol#32 (14 - 25) + - Implementation(s): ['tests/ast-parsing/for-all.sol#32-38 (5 - 6)'] + - References: [] + - C.loopNoPreCond() + - Declaration: tests/ast-parsing/for-all.sol#39 (14 - 28) + - Implementation(s): ['tests/ast-parsing/for-all.sol#39-47 (5 - 6)'] + - References: [] + - C.loopNoPrePost() + - Declaration: tests/ast-parsing/for-all.sol#48 (14 - 28) + - Implementation(s): ['tests/ast-parsing/for-all.sol#48-55 (5 - 6)'] + - References: [] + - C.loopNoCondPost() + - Declaration: tests/ast-parsing/for-all.sol#56 (14 - 29) + - Implementation(s): ['tests/ast-parsing/for-all.sol#56-63 (5 - 6)'] + - References: [] + - C.loopNoPreCondPost() + - Declaration: tests/ast-parsing/for-all.sol#64 (14 - 32) + - Implementation(s): ['tests/ast-parsing/for-all.sol#64-72 (5 - 6)'] + - References: [] + - C.loopNoPreCondPostBody() + - Declaration: tests/ast-parsing/for-all.sol#73 (14 - 36) + - Implementation(s): ['tests/ast-parsing/for-all.sol#73-75 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..3e69a3505c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,23 @@ +Export tmp.zip-C-normalLoopBlockBody().dot +Export tmp.zip-C-normalLoopExprBody().dot +Export tmp.zip-C-normalLoopNoBody().dot +Export tmp.zip-C-loopNoPre().dot +Export tmp.zip-C-loopNoCond().dot +Export tmp.zip-C-loopNoPost().dot +Export tmp.zip-C-loopNoPreCond().dot +Export tmp.zip-C-loopNoPrePost().dot +Export tmp.zip-C-loopNoCondPost().dot +Export tmp.zip-C-loopNoPreCondPost().dot +Export tmp.zip-C-loopNoPreCondPostBody().dot + +None +None +None +None +None +None +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..8d611721ab --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,467 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "normalLoopBlockBody()", + "normalLoopExprBody()", + "normalLoopNoBody()", + "loopNoPre()", + "loopNoCond()", + "loopNoPost()", + "loopNoPreCond()", + "loopNoPrePost()", + "loopNoCondPost()", + "loopNoPreCondPost()", + "loopNoPreCondPostBody()" + ] + }, + "constants_used": { + "C": { + "normalLoopBlockBody()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "normalLoopExprBody()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "normalLoopNoBody()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoPre()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoCond()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoPost()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoPreCond()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoPrePost()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoCondPost()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "loopNoPreCondPost()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "normalLoopBlockBody()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "normalLoopExprBody()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "normalLoopNoBody()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoPre()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoCond()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.GREATER_EQUAL": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoPost()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoPreCond()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.GREATER_EQUAL": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoPrePost()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoCondPost()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.GREATER_EQUAL": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + }, + "loopNoPreCondPost()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.GREATER_EQUAL": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "normalLoopBlockBody()": { + "impacts": [], + "is_impacted_by": [] + }, + "normalLoopExprBody()": { + "impacts": [], + "is_impacted_by": [] + }, + "normalLoopNoBody()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoPre()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoCond()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoPost()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoPreCond()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoPrePost()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoCondPost()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoPreCondPost()": { + "impacts": [], + "is_impacted_by": [] + }, + "loopNoPreCondPostBody()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..8c473bee8d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,18 @@ + +C: ++-------------------------+------------+ +| Name | ID | ++-------------------------+------------+ +| normalLoopBlockBody() | 0xb6c9961e | +| normalLoopExprBody() | 0x3edee383 | +| normalLoopNoBody() | 0xc1cf47d9 | +| loopNoPre() | 0x0c584421 | +| loopNoCond() | 0x48fcd3a6 | +| loopNoPost() | 0xee10bb2f | +| loopNoPreCond() | 0x7b5ab757 | +| loopNoPrePost() | 0x0101ba08 | +| loopNoCondPost() | 0x16ecda9e | +| loopNoPreCondPost() | 0x53acacb5 | +| loopNoPreCondPostBody() | 0x44614fc5 | ++-------------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..79ad8cf2cd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,26 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++-------------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-------------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| normalLoopBlockBody() | public | [] | [] | [] | [] | [] | 2 | +| normalLoopExprBody() | public | [] | [] | [] | [] | [] | 2 | +| normalLoopNoBody() | public | [] | [] | [] | [] | [] | 2 | +| loopNoPre() | public | [] | [] | [] | [] | [] | 2 | +| loopNoCond() | public | [] | [] | [] | [] | [] | 2 | +| loopNoPost() | public | [] | [] | [] | [] | [] | 2 | +| loopNoPreCond() | public | [] | [] | [] | [] | [] | 2 | +| loopNoPrePost() | public | [] | [] | [] | [] | [] | 2 | +| loopNoCondPost() | public | [] | [] | [] | [] | [] | 2 | +| loopNoPreCondPost() | public | [] | [] | [] | [] | [] | 2 | +| loopNoPreCondPostBody() | public | [] | [] | [] | [] | [] | 2 | ++-------------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..3e9ffcbb2e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 68 | 5 | 116 | 22 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 27 | 184 | 110 | 875 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 13 | 11533 | 641 | 0.170 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..e06a6b6688 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 74 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..20040b6f2e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c231_C[shape="box"label=<
C
Public Functions:
normalLoopBlockBody()
normalLoopExprBody()
normalLoopNoBody()
loopNoPre()
loopNoCond()
loopNoPost()
loopNoPreCond()
loopNoPrePost()
loopNoCondPost()
loopNoPreCondPost()
loopNoPreCondPostBody()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..067ba8ee1e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 76 | +| sloc | 0 | 0 | 74 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 150 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..389f675ce6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,17 @@ + +Contract C ++-----------------------+-----------+ +| Function | Modifiers | ++-----------------------+-----------+ +| normalLoopBlockBody | [] | +| normalLoopExprBody | [] | +| normalLoopNoBody | [] | +| loopNoPre | [] | +| loopNoCond | [] | +| loopNoPost | [] | +| loopNoPreCond | [] | +| loopNoPrePost | [] | +| loopNoCondPost | [] | +| loopNoPreCondPost | [] | +| loopNoPreCondPostBody | [] | ++-----------------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..32e9921eb7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,19 @@ +Constructor and pure/view functions are not displayed + +C: ++-------------------------+-------------------+ +| Name | Use whenNotPaused | ++-------------------------+-------------------+ +| normalLoopBlockBody() | | +| normalLoopExprBody() | | +| normalLoopNoBody() | | +| loopNoPre() | | +| loopNoCond() | | +| loopNoPost() | | +| loopNoPreCond() | | +| loopNoPrePost() | | +| loopNoCondPost() | | +| loopNoPreCondPost() | | +| loopNoPreCondPostBody() | | ++-------------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..56b3f8ad61 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,17 @@ + +Contract C ++-----------------------+-------------------+ +| Function | require or assert | ++-----------------------+-------------------+ +| normalLoopBlockBody | | +| normalLoopExprBody | | +| normalLoopNoBody | | +| loopNoPre | | +| loopNoCond | | +| loopNoPost | | +| loopNoPreCond | | +| loopNoPrePost | | +| loopNoCondPost | | +| loopNoPreCondPost | | +| loopNoPreCondPostBody | | ++-----------------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..7be66a819f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,159 @@ +Contract C + Function C.normalLoopBlockBody() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_0(bool) = i < 10 + CONDITION TMP_0 + Expression: c ++ + IRs: + TMP_1(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: i ++ + IRs: + TMP_2(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Function C.normalLoopExprBody() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_3(bool) = i < 10 + CONDITION TMP_3 + Expression: c ++ + IRs: + TMP_4(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: i ++ + IRs: + TMP_5(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Function C.normalLoopNoBody() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_6(bool) = i < 10 + CONDITION TMP_6 + Expression: i ++ + IRs: + TMP_7(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Function C.loopNoPre() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_8(bool) = i < 10 + CONDITION TMP_8 + Expression: c ++ + IRs: + TMP_9(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: i ++ + IRs: + TMP_10(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Function C.loopNoCond() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i >= 10 + IRs: + TMP_11(bool) = i >= 10 + CONDITION TMP_11 + Expression: c ++ + IRs: + TMP_12(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: i ++ + IRs: + TMP_13(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Function C.loopNoPost() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_14(bool) = i < 10 + CONDITION TMP_14 + Expression: c ++ + IRs: + TMP_15(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: i ++ + IRs: + TMP_16(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Function C.loopNoPreCond() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i >= 10 + IRs: + TMP_17(bool) = i >= 10 + CONDITION TMP_17 + Expression: c ++ + IRs: + TMP_18(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: i ++ + IRs: + TMP_19(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Function C.loopNoPrePost() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < 10 + IRs: + TMP_20(bool) = i < 10 + CONDITION TMP_20 + Expression: c ++ + IRs: + TMP_21(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: i ++ + IRs: + TMP_22(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Function C.loopNoCondPost() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i >= 10 + IRs: + TMP_23(bool) = i >= 10 + CONDITION TMP_23 + Expression: c ++ + IRs: + TMP_24(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: i ++ + IRs: + TMP_25(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Function C.loopNoPreCondPost() (*) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i >= 10 + IRs: + TMP_26(bool) = i >= 10 + CONDITION TMP_26 + Expression: c ++ + IRs: + TMP_27(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: i ++ + IRs: + TMP_28(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Function C.loopNoPreCondPostBody() (*) + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..dc9d868c9c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_for_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,18 @@ + +Contract C ++-----------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-----------------------+-------------------------+--------------------------+ +| normalLoopBlockBody | [] | [] | +| normalLoopExprBody | [] | [] | +| normalLoopNoBody | [] | [] | +| loopNoPre | [] | [] | +| loopNoCond | [] | [] | +| loopNoPost | [] | [] | +| loopNoPreCond | [] | [] | +| loopNoPrePost | [] | [] | +| loopNoCondPost | [] | [] | +| loopNoPreCondPost | [] | [] | +| loopNoPreCondPostBody | [] | [] | ++-----------------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..cb6fffef89 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,95 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC1.call-graph.dot +Call Graph: tmp.zipC2.call-graph.dot +Call Graph: tmp.zipC3.call-graph.dot +Call Graph: tmp.zipC4.call-graph.dot +Call Graph: tmp.zipC5.call-graph.dot + +strict digraph { +subgraph cluster_110_C1 { +label = "C1" +"110_constructor" [label="constructor"] +"110_fallback" [label="fallback"] +}subgraph cluster_119_C2 { +label = "C2" +"119_constructor" [label="constructor"] +"119_fallback" [label="fallback"] +}subgraph cluster_144_C3 { +label = "C3" +"144_constructor" [label="constructor"] +"144_f" [label="f"] +"144_f" -> "144_modifierNoArgs" +"144_f" -> "144_modifierWithArgs" +}subgraph cluster_169_C4 { +label = "C4" +"169_hasArgs" [label="hasArgs"] +"169_hasArgsAndReturns" [label="hasArgsAndReturns"] +"169_hasReturns" [label="hasReturns"] +}subgraph cluster_201_C5 { +label = "C5" +"201_abstractFunc" [label="abstractFunc"] +"201_externalFunc" [label="externalFunc"] +"201_internalFunc" [label="internalFunc"] +"201_payableFunc" [label="payableFunc"] +"201_privateFunc" [label="privateFunc"] +"201_publicFunc" [label="publicFunc"] +"201_pureFunc" [label="pureFunc"] +"201_viewFunc" [label="viewFunc"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_110_C1 { +label = "C1" +"110_constructor" [label="constructor"] +"110_fallback" [label="fallback"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_119_C2 { +label = "C2" +"119_constructor" [label="constructor"] +"119_fallback" [label="fallback"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_144_C3 { +label = "C3" +"144_constructor" [label="constructor"] +"144_f" [label="f"] +"144_f" -> "144_modifierNoArgs" +"144_f" -> "144_modifierWithArgs" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_169_C4 { +label = "C4" +"169_hasArgs" [label="hasArgs"] +"169_hasArgsAndReturns" [label="hasArgsAndReturns"] +"169_hasReturns" [label="hasReturns"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_201_C5 { +label = "C5" +"201_abstractFunc" [label="abstractFunc"] +"201_externalFunc" [label="externalFunc"] +"201_internalFunc" [label="internalFunc"] +"201_payableFunc" [label="payableFunc"] +"201_privateFunc" [label="privateFunc"] +"201_publicFunc" [label="publicFunc"] +"201_pureFunc" [label="pureFunc"] +"201_viewFunc" [label="viewFunc"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..754e71a804 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,143 @@ +Export tmp.zip-C1-constructor().dot +Export tmp.zip-C1-fallback().dot +Export tmp.zip-C2-constructor().dot +Export tmp.zip-C2-fallback().dot +Export tmp.zip-C3-constructor().dot +Export tmp.zip-C3-f().dot +Export tmp.zip-C3-modifierNoArgs().dot +Export tmp.zip-C3-modifierWithArgs(uint256).dot +Export tmp.zip-C4-hasArgs(uint256,uint256).dot +Export tmp.zip-C4-hasReturns().dot +Export tmp.zip-C4-hasArgsAndReturns(uint256,uint256).dot +Export tmp.zip-C5-payableFunc().dot +Export tmp.zip-C5-externalFunc().dot +Export tmp.zip-C5-publicFunc().dot +Export tmp.zip-C5-internalFunc().dot +Export tmp.zip-C5-privateFunc().dot +Export tmp.zip-C5-pureFunc().dot +Export tmp.zip-C5-viewFunc().dot +Export tmp.zip-C5-abstractFunc().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +modifierNoArgs() + +IRs: +MODIFIER_CALL, C3.modifierNoArgs()()"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +modifierWithArgs(block.timestamp) + +IRs: +MODIFIER_CALL, C3.modifierWithArgs(uint256)(block.timestamp)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +c + +IRs: +RETURN c"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..75f37f36fc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,69 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C1 | 0 | 0 | 0 | +| C2 | 0 | 0 | 0 | +| C3 | 0 | 0 | 0 | +| C4 | 0 | 0 | 0 | +| C5 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C1 | 0 | 1 | 0 | 0 | +| C2 | 0 | 1 | 0 | 0 | +| C3 | 1 | 0 | 0 | 0 | +| C4 | 3 | 0 | 0 | 0 | +| C5 | 5 | 1 | 1 | 1 | +| TOTAL | 9 | 3 | 1 | 1 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C1 | 1 | 0 | 0 | +| C2 | 1 | 0 | 0 | +| C3 | 1 | 0 | 0 | +| C4 | 3 | 0 | 0 | +| C5 | 6 | 1 | 1 | +| TOTAL | 12 | 1 | 1 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C1 | 1 | 1 | 1 | +| C2 | 1 | 1 | 1 | +| C3 | 1 | 1 | 0 | +| C4 | 3 | 3 | 3 | +| C5 | 4 | 4 | 4 | +| TOTAL | 10 | 10 | 9 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C1 | 0 | 1 | 0 | 0 | 0 | +| C2 | 0 | 1 | 0 | 0 | 0 | +| C3 | 0 | 1 | 0 | 0 | 0 | +| C4 | 0 | 3 | 0 | 0 | 0 | +| C5 | 0 | 6 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..9f9259217d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1,40 @@ + +################## +####### C1 ####### +################## + +## Constructor Call Sequence + - C1 + +## Constructor Definitions + +### C1 + + constructor() public {} + +################## +####### C2 ####### +################## + +## Constructor Call Sequence + - C2 + +## Constructor Definitions + +### C2 + + constructor() public payable {} + +################## +####### C3 ####### +################## + +## Constructor Call Sequence + - C3 + +## Constructor Definitions + +### C3 + + constructor() internal {} + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..23fced6ce9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,33 @@ + ++ Contract C1 (Most derived contract) + - From C1 + - constructor() (public) + - fallback() (external) + ++ Contract C2 (Most derived contract) + - From C2 + - constructor() (public) + - fallback() (external) + ++ Contract C3 (Most derived contract) + - From C3 + - constructor() (internal) + - f() (public) + ++ Contract C4 (Most derived contract) + - From C4 + - hasArgs(uint256,uint256) (public) + - hasArgsAndReturns(uint256,uint256) (public) + - hasReturns() (public) + ++ Contract C5 (Most derived contract) + - From C5 + - abstractFunc() (public) + - externalFunc() (external) + - internalFunc() (internal) + - payableFunc() (public) + - privateFunc() (private) + - publicFunc() (public) + - pureFunc() (public) + - viewFunc() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..1a3b205586 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,324 @@ + +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C3 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierNoArgs() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierWithArgs(uint256) ++----------+---------------------+ +| Variable | Dependencies | ++----------+---------------------+ +| a | ['block.timestamp'] | ++----------+---------------------+ +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C3 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierNoArgs() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierWithArgs(uint256) ++----------+---------------------+ +| Variable | Dependencies | ++----------+---------------------+ +| a | ['block.timestamp'] | ++----------+---------------------+ +Contract C4 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function hasArgs(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasReturns() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasArgsAndReturns(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | +| c | [] | ++----------+--------------+ +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C3 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierNoArgs() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierWithArgs(uint256) ++----------+---------------------+ +| Variable | Dependencies | ++----------+---------------------+ +| a | ['block.timestamp'] | ++----------+---------------------+ +Contract C4 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function hasArgs(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasReturns() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasArgsAndReturns(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | +| c | [] | ++----------+--------------+ +Contract C5 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function payableFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function externalFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function publicFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function internalFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function privateFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function pureFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function viewFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function abstractFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..a65d272f67 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,121 @@ + +# Contracts +# C1 + - Declaration: tests/ast-parsing/function-0.5.0.sol#1 (10 - 13) + - Implementation(s): [] + - References: [] + + ## Function + - C1.constructor() + - Declaration: tests/ast-parsing/function-0.5.0.sol#3 (5 - 17) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#3 (5 - 28)'] + - References: [] + - C1.fallback() + - Declaration: tests/ast-parsing/function-0.5.0.sol#6 (5 - 14) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#6 (5 - 27)'] + - References: [] + + ## State variables + + ## Structures +# C2 + - Declaration: tests/ast-parsing/function-0.5.0.sol#9 (10 - 13) + - Implementation(s): [] + - References: [] + + ## Function + - C2.constructor() + - Declaration: tests/ast-parsing/function-0.5.0.sol#11 (5 - 17) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#11 (5 - 36)'] + - References: [] + - C2.fallback() + - Declaration: tests/ast-parsing/function-0.5.0.sol#14 (5 - 14) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#14 (5 - 35)'] + - References: [] + + ## State variables + + ## Structures +# C3 + - Declaration: tests/ast-parsing/function-0.5.0.sol#17 (10 - 13) + - Implementation(s): [] + - References: [] + + ## Function + - C3.constructor() + - Declaration: tests/ast-parsing/function-0.5.0.sol#19 (5 - 17) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#19 (5 - 30)'] + - References: [] + - C3.f() + - Declaration: tests/ast-parsing/function-0.5.0.sol#24 (14 - 16) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#24 (5 - 76)'] + - References: [] + + ## State variables + + ## Structures +# C4 + - Declaration: tests/ast-parsing/function-0.5.0.sol#27 (10 - 13) + - Implementation(s): [] + - References: [] + + ## Function + - C4.hasArgs(uint256,uint256) + - Declaration: tests/ast-parsing/function-0.5.0.sol#28 (14 - 22) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#28 (5 - 43)'] + - References: [] + - C4.hasReturns() + - Declaration: tests/ast-parsing/function-0.5.0.sol#29 (14 - 25) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#29 (5 - 51)'] + - References: [] + - C4.hasArgsAndReturns(uint256,uint256) + - Declaration: tests/ast-parsing/function-0.5.0.sol#30 (14 - 32) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#30 (5 - 74)'] + - References: [] + + ## State variables + + ## Structures +# C5 + - Declaration: tests/ast-parsing/function-0.5.0.sol#33 (10 - 13) + - Implementation(s): [] + - References: [] + + ## Function + - C5.payableFunc() + - Declaration: tests/ast-parsing/function-0.5.0.sol#34 (14 - 26) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#34 (5 - 45)'] + - References: [] + - C5.externalFunc() + - Declaration: tests/ast-parsing/function-0.5.0.sol#35 (14 - 27) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#35 (5 - 40)'] + - References: [] + - C5.publicFunc() + - Declaration: tests/ast-parsing/function-0.5.0.sol#36 (14 - 25) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#36 (5 - 36)'] + - References: [] + - C5.internalFunc() + - Declaration: tests/ast-parsing/function-0.5.0.sol#37 (14 - 27) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#37 (5 - 40)'] + - References: [] + - C5.privateFunc() + - Declaration: tests/ast-parsing/function-0.5.0.sol#38 (14 - 26) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#38 (5 - 38)'] + - References: [] + - C5.pureFunc() + - Declaration: tests/ast-parsing/function-0.5.0.sol#39 (14 - 23) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#39 (5 - 39)'] + - References: [] + - C5.viewFunc() + - Declaration: tests/ast-parsing/function-0.5.0.sol#40 (14 - 23) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#40 (5 - 39)'] + - References: [] + - C5.abstractFunc() + - Declaration: tests/ast-parsing/function-0.5.0.sol#41 (14 - 27) + - Implementation(s): ['tests/ast-parsing/function-0.5.0.sol#41 (5 - 36)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..53462ea433 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,39 @@ +Export tmp.zip-C1-constructor().dot +Export tmp.zip-C1-fallback().dot +Export tmp.zip-C2-constructor().dot +Export tmp.zip-C2-fallback().dot +Export tmp.zip-C3-constructor().dot +Export tmp.zip-C3-f().dot +Export tmp.zip-C3-modifierNoArgs().dot +Export tmp.zip-C3-modifierWithArgs(uint256).dot +Export tmp.zip-C4-hasArgs(uint256,uint256).dot +Export tmp.zip-C4-hasReturns().dot +Export tmp.zip-C4-hasArgsAndReturns(uint256,uint256).dot +Export tmp.zip-C5-payableFunc().dot +Export tmp.zip-C5-externalFunc().dot +Export tmp.zip-C5-publicFunc().dot +Export tmp.zip-C5-internalFunc().dot +Export tmp.zip-C5-privateFunc().dot +Export tmp.zip-C5-pureFunc().dot +Export tmp.zip-C5-viewFunc().dot +Export tmp.zip-C5-abstractFunc().dot + +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..c71e5a0202 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,125 @@ +{ + "payable": { + "C2": [ + "constructor()", + "()" + ], + "C5": [ + "payableFunc()" + ] + }, + "timestamp": { + "C3": [ + "f()" + ] + }, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C1": [ + "constructor()", + "()" + ], + "C3": [ + "f()" + ], + "C4": [ + "hasArgs(uint256,uint256)", + "hasReturns()", + "hasArgsAndReturns(uint256,uint256)" + ], + "C5": [ + "externalFunc()", + "publicFunc()", + "pureFunc()", + "viewFunc()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C1": { + "constructor()": { + "impacts": [], + "is_impacted_by": [] + }, + "()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C2": { + "constructor()": { + "impacts": [], + "is_impacted_by": [] + }, + "()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C3": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C4": { + "hasArgs(uint256,uint256)": { + "impacts": [], + "is_impacted_by": [] + }, + "hasReturns()": { + "impacts": [], + "is_impacted_by": [] + }, + "hasArgsAndReturns(uint256,uint256)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C5": { + "payableFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "externalFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "publicFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "pureFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "viewFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "abstractFunc()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": { + "C1": "constructor()", + "C2": "constructor()", + "C3": "constructor()" + }, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [ + "C1", + "C2" + ], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..a36667d188 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,45 @@ + +C1: ++---------------+------------+ +| Name | ID | ++---------------+------------+ +| constructor() | 0x90fa17bb | +| fallback() | 0x552079dc | ++---------------+------------+ + +C2: ++---------------+------------+ +| Name | ID | ++---------------+------------+ +| constructor() | 0x90fa17bb | +| fallback() | 0x552079dc | ++---------------+------------+ + +C3: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + +C4: ++------------------------------------+------------+ +| Name | ID | ++------------------------------------+------------+ +| hasArgs(uint256,uint256) | 0x23cf4bfd | +| hasReturns() | 0x614bce06 | +| hasArgsAndReturns(uint256,uint256) | 0x4f2750ef | ++------------------------------------+------------+ + +C5: ++----------------+------------+ +| Name | ID | ++----------------+------------+ +| payableFunc() | 0x289ec69b | +| externalFunc() | 0x42b148aa | +| publicFunc() | 0x4b73383f | +| pureFunc() | 0x231e18a9 | +| viewFunc() | 0x7f2857b6 | +| abstractFunc() | 0x3a9407ec | ++----------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..6e9fe13e3b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,90 @@ + +Contract C1 +Contract vars: [] +Inheritance:: [] + ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor() | public | [] | [] | [] | [] | [] | 1 | +| fallback() | external | [] | [] | [] | [] | [] | 1 | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C2 +Contract vars: [] +Inheritance:: [] + ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor() | public | [] | [] | [] | [] | [] | 1 | +| fallback() | external | [] | [] | [] | [] | [] | 1 | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C3 +Contract vars: [] +Inheritance:: [] + ++---------------+------------+----------------------------------------+---------------------+-------+----------------------------------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------+------------+----------------------------------------+---------------------+-------+----------------------------------------+----------------+-----------------------+ +| constructor() | internal | [] | [] | [] | [] | [] | 1 | +| f() | public | ['modifierNoArgs', 'modifierWithArgs'] | ['block.timestamp'] | [] | ['modifierNoArgs', 'modifierWithArgs'] | [] | 1 | ++---------------+------------+----------------------------------------+---------------------+-------+----------------------------------------+----------------+-----------------------+ + ++---------------------------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------------------+------------+------+-------+----------------+----------------+-----------------------+ +| modifierNoArgs() | internal | [] | [] | [] | [] | 1 | +| modifierWithArgs(uint256) | internal | [] | [] | [] | [] | 1 | ++---------------------------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C4 +Contract vars: [] +Inheritance:: [] + ++------------------------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++------------------------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| hasArgs(uint256,uint256) | public | [] | [] | [] | [] | [] | 1 | +| hasReturns() | public | [] | [] | [] | [] | [] | 1 | +| hasArgsAndReturns(uint256,uint256) | public | [] | [] | [] | [] | [] | 1 | ++------------------------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C5 +Contract vars: [] +Inheritance:: [] + ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| payableFunc() | public | [] | [] | [] | [] | [] | 1 | +| externalFunc() | external | [] | [] | [] | [] | [] | 1 | +| publicFunc() | public | [] | [] | [] | [] | [] | 1 | +| internalFunc() | internal | [] | [] | [] | [] | [] | 1 | +| privateFunc() | private | [] | [] | [] | [] | [] | 1 | +| pureFunc() | public | [] | [] | [] | [] | [] | 1 | +| viewFunc() | public | [] | [] | [] | [] | [] | 1 | +| abstractFunc() | public | [] | [] | [] | [] | [] | 2 | ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..49efbf2512 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,37 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C1 | 0 | 0 | 0 | 0 | +| C2 | 0 | 0 | 0 | 0 | +| C3 | 2 | 1 | 3 | 2 | +| C4 | 1 | 1 | 1 | 1 | +| C5 | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C1 | 0 | 0 | 0 | 0 | +| C2 | 0 | 0 | 0 | 0 | +| C3 | 3 | 5 | 2 | 8 | +| C4 | 2 | 2 | 0 | 2 | +| C5 | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C1 | 0 | 0 | 0 | 0.000 | +| C2 | 0 | 0 | 0 | 0.000 | +| C3 | 1 | 6 | 0 | 0.001 | +| C4 | 0 | 1 | 0 | 0.000 | +| C5 | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..56bd40bda3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 5 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 29 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..5739676849 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,26 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C1 + ++ C2 + ++ C3 + ++ C4 + ++ C5 + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C1 + ++ C2 + ++ C3 + ++ C4 + ++ C5 + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..0f2091632a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,14 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c110_C1[shape="box"label=<
C1
Public Functions:
fallback()
>]; + +c119_C2[shape="box"label=<
C2
Public Functions:
fallback()
>]; + +c144_C3[shape="box"label=<
C3
Public Functions:
f()
Modifiers:
modifierNoArgs()
modifierWithArgs(uint256)
>]; + +c169_C4[shape="box"label=<
C4
Public Functions:
hasArgs(uint256,uint256)
hasReturns()
hasArgsAndReturns(uint256,uint256)
>]; + +c201_C5[shape="box"label=<
C5
Public Functions:
payableFunc()
externalFunc()
publicFunc()
pureFunc()
viewFunc()
abstractFunc()
Private Functions:
internalFunc()
privateFunc()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..a1e4cec91a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 42 | +| sloc | 0 | 0 | 29 | +| cloc | 0 | 0 | 5 | +| Total | 0 | 0 | 76 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..5aaf0cacf5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,18 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.2 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C1 | 0 | 0 | 0.00 | 0.00 | +| C2 | 0 | 0 | 0.00 | 0.00 | +| C3 | 0 | 0 | 0.00 | 0.00 | +| C4 | 0 | 0 | 0.00 | 0.00 | +| C5 | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..fa03a4b40d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,43 @@ + +Contract C1 ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | +| fallback | [] | ++-------------+-----------+ +Contract C2 ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | +| fallback | [] | ++-------------+-----------+ +Contract C3 ++-------------+----------------------------------------+ +| Function | Modifiers | ++-------------+----------------------------------------+ +| constructor | [] | +| f | ['modifierNoArgs', 'modifierWithArgs'] | ++-------------+----------------------------------------+ +Contract C4 ++-------------------+-----------+ +| Function | Modifiers | ++-------------------+-----------+ +| hasArgs | [] | +| hasReturns | [] | +| hasArgsAndReturns | [] | ++-------------------+-----------+ +Contract C5 ++--------------+-----------+ +| Function | Modifiers | ++--------------+-----------+ +| payableFunc | [] | +| externalFunc | [] | +| publicFunc | [] | +| internalFunc | [] | +| privateFunc | [] | +| pureFunc | [] | +| viewFunc | [] | +| abstractFunc | [] | ++--------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..47e81ef4d8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,42 @@ +Constructor and pure/view functions are not displayed + +C1: ++------------+-------------------+ +| Name | Use whenNotPaused | ++------------+-------------------+ +| fallback() | | ++------------+-------------------+ + +C2: ++------------+-------------------+ +| Name | Use whenNotPaused | ++------------+-------------------+ +| fallback() | | ++------------+-------------------+ + +C3: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + +C4: ++------------------------------------+-------------------+ +| Name | Use whenNotPaused | ++------------------------------------+-------------------+ +| hasArgs(uint256,uint256) | | +| hasReturns() | | +| hasArgsAndReturns(uint256,uint256) | | ++------------------------------------+-------------------+ + +C5: ++----------------+-------------------+ +| Name | Use whenNotPaused | ++----------------+-------------------+ +| payableFunc() | | +| externalFunc() | | +| publicFunc() | | +| abstractFunc() | | ++----------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..8079c27308 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,43 @@ + +Contract C1 ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | +| fallback | | ++-------------+-------------------+ +Contract C2 ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | +| fallback | | ++-------------+-------------------+ +Contract C3 ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | +| f | | ++-------------+-------------------+ +Contract C4 ++-------------------+-------------------+ +| Function | require or assert | ++-------------------+-------------------+ +| hasArgs | | +| hasReturns | | +| hasArgsAndReturns | | ++-------------------+-------------------+ +Contract C5 ++--------------+-------------------+ +| Function | require or assert | ++--------------+-------------------+ +| payableFunc | | +| externalFunc | | +| publicFunc | | +| internalFunc | | +| privateFunc | | +| pureFunc | | +| viewFunc | | +| abstractFunc | | ++--------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..7bba54027d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,34 @@ +Contract C1 + Function C1.constructor() (*) + Function C1.fallback() (*) +Contract C2 + Function C2.constructor() (*) + Function C2.fallback() (*) +Contract C3 + Function C3.constructor() (*) + Function C3.f() (*) + Expression: modifierNoArgs() + IRs: + MODIFIER_CALL, C3.modifierNoArgs()() + Expression: modifierWithArgs(block.timestamp) + IRs: + MODIFIER_CALL, C3.modifierWithArgs(uint256)(block.timestamp) + Modifier C3.modifierNoArgs() + Modifier C3.modifierWithArgs(uint256) +Contract C4 + Function C4.hasArgs(uint256,uint256) (*) + Function C4.hasReturns() (*) + Function C4.hasArgsAndReturns(uint256,uint256) (*) + Expression: c + IRs: + RETURN c +Contract C5 + Function C5.payableFunc() (*) + Function C5.externalFunc() (*) + Function C5.publicFunc() (*) + Function C5.internalFunc() (*) + Function C5.privateFunc() (*) + Function C5.pureFunc() (*) + Function C5.viewFunc() (*) + Function C5.abstractFunc() (*) + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..3bf463aae0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,31 @@ + +C1: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C2: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C3: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C4: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C5: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..d9158317c2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,48 @@ + +Contract C1 ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | +| fallback | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract C2 ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | +| fallback | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract C3 ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | +| f | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract C4 ++-------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------------+-------------------------+--------------------------+ +| hasArgs | [] | [] | +| hasReturns | [] | [] | +| hasArgsAndReturns | [] | [] | ++-------------------+-------------------------+--------------------------+ + +Contract C5 ++--------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++--------------+-------------------------+--------------------------+ +| payableFunc | [] | [] | +| externalFunc | [] | [] | +| publicFunc | [] | [] | +| internalFunc | [] | [] | +| privateFunc | [] | [] | +| pureFunc | [] | [] | +| viewFunc | [] | [] | +| abstractFunc | [] | [] | ++--------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..938b9fc107 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,123 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC1.call-graph.dot +Call Graph: tmp.zipC2.call-graph.dot +Call Graph: tmp.zipC3.call-graph.dot +Call Graph: tmp.zipC4.call-graph.dot +Call Graph: tmp.zipC8.call-graph.dot + +strict digraph { +subgraph cluster_13_C1 { +label = "C1" +"13_constructor" [label="constructor"] +"13_fallback" [label="fallback"] +"13_receive" [label="receive"] +}subgraph cluster_26_C2 { +label = "C2" +"26_constructor" [label="constructor"] +"26_fallback" [label="fallback"] +"26_receive" [label="receive"] +}subgraph cluster_51_C3 { +label = "C3" +"51_constructor" [label="constructor"] +"51_f" [label="f"] +"51_f" -> "51_modifierNoArgs" +"51_f" -> "51_modifierWithArgs" +}subgraph cluster_76_C4 { +label = "C4" +"76_hasArgs" [label="hasArgs"] +"76_hasArgsAndReturns" [label="hasArgsAndReturns"] +"76_hasReturns" [label="hasReturns"] +}subgraph cluster_108_C5 { +label = "C5" +"108_abstractFunc" [label="abstractFunc"] +"108_externalFunc" [label="externalFunc"] +"108_internalFunc" [label="internalFunc"] +"108_payableFunc" [label="payableFunc"] +"108_privateFunc" [label="privateFunc"] +"108_publicFunc" [label="publicFunc"] +"108_pureFunc" [label="pureFunc"] +"108_viewFunc" [label="viewFunc"] +}subgraph cluster_115_C6 { +label = "C6" +"115_abstractFunc" [label="abstractFunc"] +"115_abstractFunc2" [label="abstractFunc2"] +}subgraph cluster_119_C7 { +label = "C7" +"119_abstractFunc3" [label="abstractFunc3"] +}subgraph cluster_144_C8 { +label = "C8" +"144_abstractFunc" [label="abstractFunc"] +"144_abstractFunc2" [label="abstractFunc2"] +"144_abstractFunc3" [label="abstractFunc3"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_13_C1 { +label = "C1" +"13_constructor" [label="constructor"] +"13_fallback" [label="fallback"] +"13_receive" [label="receive"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_26_C2 { +label = "C2" +"26_constructor" [label="constructor"] +"26_fallback" [label="fallback"] +"26_receive" [label="receive"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_51_C3 { +label = "C3" +"51_constructor" [label="constructor"] +"51_f" [label="f"] +"51_f" -> "51_modifierNoArgs" +"51_f" -> "51_modifierWithArgs" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_76_C4 { +label = "C4" +"76_hasArgs" [label="hasArgs"] +"76_hasArgsAndReturns" [label="hasArgsAndReturns"] +"76_hasReturns" [label="hasReturns"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_108_C5 { +label = "C5" +"108_abstractFunc" [label="abstractFunc"] +"108_externalFunc" [label="externalFunc"] +"108_internalFunc" [label="internalFunc"] +"108_payableFunc" [label="payableFunc"] +"108_privateFunc" [label="privateFunc"] +"108_publicFunc" [label="publicFunc"] +"108_pureFunc" [label="pureFunc"] +"108_viewFunc" [label="viewFunc"] +}subgraph cluster_115_C6 { +label = "C6" +"115_abstractFunc" [label="abstractFunc"] +"115_abstractFunc2" [label="abstractFunc2"] +}subgraph cluster_119_C7 { +label = "C7" +"119_abstractFunc3" [label="abstractFunc3"] +}subgraph cluster_144_C8 { +label = "C8" +"144_abstractFunc" [label="abstractFunc"] +"144_abstractFunc2" [label="abstractFunc2"] +"144_abstractFunc3" [label="abstractFunc3"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..d32a8cc468 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,243 @@ +Export tmp.zip-C1-constructor().dot +Export tmp.zip-C1-fallback().dot +Export tmp.zip-C1-receive().dot +Export tmp.zip-C2-constructor().dot +Export tmp.zip-C2-fallback().dot +Export tmp.zip-C2-receive().dot +Export tmp.zip-C3-constructor().dot +Export tmp.zip-C3-f().dot +Export tmp.zip-C3-modifierNoArgs().dot +Export tmp.zip-C3-modifierWithArgs(uint256).dot +Export tmp.zip-C4-hasArgs(uint256,uint256).dot +Export tmp.zip-C4-hasReturns().dot +Export tmp.zip-C4-hasArgsAndReturns(uint256,uint256).dot +Export tmp.zip-C5-payableFunc().dot +Export tmp.zip-C5-externalFunc().dot +Export tmp.zip-C5-publicFunc().dot +Export tmp.zip-C5-internalFunc().dot +Export tmp.zip-C5-privateFunc().dot +Export tmp.zip-C5-pureFunc().dot +Export tmp.zip-C5-viewFunc().dot +Export tmp.zip-C5-abstractFunc().dot +Export tmp.zip-C6-abstractFunc().dot +Export tmp.zip-C6-abstractFunc2().dot +Export tmp.zip-C7-abstractFunc3().dot +Export tmp.zip-C8-abstractFunc3().dot +Export tmp.zip-C8-abstractFunc().dot +Export tmp.zip-C8-abstractFunc2().dot +Export tmp.zip-C8-payableFunc().dot +Export tmp.zip-C8-externalFunc().dot +Export tmp.zip-C8-publicFunc().dot +Export tmp.zip-C8-internalFunc().dot +Export tmp.zip-C8-privateFunc().dot +Export tmp.zip-C8-pureFunc().dot +Export tmp.zip-C8-viewFunc().dot +Export tmp.zip-C8-abstractFunc().dot +Export tmp.zip-C8-abstractFunc().dot +Export tmp.zip-C8-abstractFunc2().dot +Export tmp.zip-C8-abstractFunc3().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +modifierNoArgs() + +IRs: +MODIFIER_CALL, C3.modifierNoArgs()()"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +modifierWithArgs(block.timestamp) + +IRs: +MODIFIER_CALL, C3.modifierWithArgs(uint256)(block.timestamp)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +c + +IRs: +RETURN c"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +} + +digraph{ +} + +digraph{ +} + +digraph{ +} + +digraph{ +} + +digraph{ +} + +digraph{ +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..32ef401f69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,84 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C1 | 0 | 0 | 0 | +| C2 | 0 | 0 | 0 | +| C3 | 0 | 0 | 0 | +| C4 | 0 | 0 | 0 | +| C5 | 0 | 0 | 0 | +| C6 | 0 | 0 | 0 | +| C7 | 0 | 0 | 0 | +| C8 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C1 | 0 | 2 | 0 | 0 | +| C2 | 0 | 2 | 0 | 0 | +| C3 | 1 | 0 | 0 | 0 | +| C4 | 3 | 0 | 0 | 0 | +| C5 | 5 | 1 | 1 | 1 | +| C6 | 2 | 0 | 0 | 0 | +| C7 | 1 | 0 | 0 | 0 | +| C8 | 11 | 1 | 1 | 1 | +| TOTAL | 23 | 6 | 2 | 2 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C1 | 2 | 0 | 0 | +| C2 | 2 | 0 | 0 | +| C3 | 1 | 0 | 0 | +| C4 | 3 | 0 | 0 | +| C5 | 6 | 1 | 1 | +| C6 | 2 | 0 | 0 | +| C7 | 1 | 0 | 0 | +| C8 | 12 | 1 | 1 | +| TOTAL | 29 | 2 | 2 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C1 | 2 | 2 | 2 | +| C2 | 2 | 2 | 2 | +| C3 | 1 | 1 | 0 | +| C4 | 3 | 3 | 3 | +| C5 | 4 | 4 | 4 | +| C6 | 2 | 2 | 2 | +| C7 | 1 | 1 | 1 | +| C8 | 10 | 10 | 10 | +| TOTAL | 25 | 25 | 24 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C1 | 0 | 2 | 0 | 0 | 0 | +| C2 | 0 | 2 | 0 | 0 | 0 | +| C3 | 0 | 1 | 0 | 0 | 0 | +| C4 | 0 | 3 | 0 | 0 | 0 | +| C5 | 0 | 6 | 1 | 0 | 0 | +| C6 | 0 | 2 | 1 | 0 | 0 | +| C7 | 0 | 1 | 1 | 0 | 0 | +| C8 | 0 | 12 | 0 | 1 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..a9ac29f340 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1,40 @@ + +################## +####### C1 ####### +################## + +## Constructor Call Sequence + - C1 + +## Constructor Definitions + +### C1 + + constructor() {} + +################## +####### C2 ####### +################## + +## Constructor Call Sequence + - C2 + +## Constructor Definitions + +### C2 + + constructor() payable {} + +################## +####### C3 ####### +################## + +## Constructor Call Sequence + - C3 + +## Constructor Definitions + +### C3 + + constructor() internal {} + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..73fd5f5d00 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,58 @@ + ++ Contract C1 (Most derived contract) + - From C1 + - constructor() (public) + - fallback() (external) + - receive() (external) + ++ Contract C2 (Most derived contract) + - From C2 + - constructor() (public) + - fallback() (external) + - receive() (external) + ++ Contract C3 (Most derived contract) + - From C3 + - constructor() (internal) + - f() (public) + ++ Contract C4 (Most derived contract) + - From C4 + - hasArgs(uint256,uint256) (public) + - hasArgsAndReturns(uint256,uint256) (public) + - hasReturns() (public) + ++ Contract C5 + - From C5 + - abstractFunc() (public) + - externalFunc() (external) + - internalFunc() (internal) + - payableFunc() (public) + - privateFunc() (private) + - publicFunc() (public) + - pureFunc() (public) + - viewFunc() (public) + ++ Contract C6 + - From C6 + - abstractFunc() (public) + - abstractFunc2() (public) + ++ Contract C7 + - From C7 + - abstractFunc3() (public) + ++ Contract C8 (Most derived contract) + - From C5 + - externalFunc() (external) + - internalFunc() (internal) + - payableFunc() (public) + - privateFunc() (private) + - publicFunc() (public) + - pureFunc() (public) + - viewFunc() (public) + - From C8 + - abstractFunc() (public) + - abstractFunc2() (public) + - abstractFunc3() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..df369c0897 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,883 @@ + +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C3 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierNoArgs() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierWithArgs(uint256) ++----------+---------------------+ +| Variable | Dependencies | ++----------+---------------------+ +| a | ['block.timestamp'] | ++----------+---------------------+ +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C3 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierNoArgs() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierWithArgs(uint256) ++----------+---------------------+ +| Variable | Dependencies | ++----------+---------------------+ +| a | ['block.timestamp'] | ++----------+---------------------+ +Contract C4 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function hasArgs(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasReturns() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasArgsAndReturns(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | +| c | [] | ++----------+--------------+ +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C3 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierNoArgs() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierWithArgs(uint256) ++----------+---------------------+ +| Variable | Dependencies | ++----------+---------------------+ +| a | ['block.timestamp'] | ++----------+---------------------+ +Contract C4 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function hasArgs(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasReturns() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasArgsAndReturns(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | +| c | [] | ++----------+--------------+ +Contract C5 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function payableFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function externalFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function publicFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function internalFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function privateFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function pureFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function viewFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function abstractFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C3 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierNoArgs() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierWithArgs(uint256) ++----------+---------------------+ +| Variable | Dependencies | ++----------+---------------------+ +| a | ['block.timestamp'] | ++----------+---------------------+ +Contract C4 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function hasArgs(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasReturns() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasArgsAndReturns(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | +| c | [] | ++----------+--------------+ +Contract C5 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function payableFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function externalFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function publicFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function internalFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function privateFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function pureFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function viewFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function abstractFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C6 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function abstractFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function abstractFunc2() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C3 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierNoArgs() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierWithArgs(uint256) ++----------+---------------------+ +| Variable | Dependencies | ++----------+---------------------+ +| a | ['block.timestamp'] | ++----------+---------------------+ +Contract C4 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function hasArgs(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasReturns() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasArgsAndReturns(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | +| c | [] | ++----------+--------------+ +Contract C5 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function payableFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function externalFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function publicFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function internalFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function privateFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function pureFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function viewFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function abstractFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C6 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function abstractFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function abstractFunc2() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C7 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function abstractFunc3() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function fallback() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function receive() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C3 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierNoArgs() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function modifierWithArgs(uint256) ++----------+---------------------+ +| Variable | Dependencies | ++----------+---------------------+ +| a | ['block.timestamp'] | ++----------+---------------------+ +Contract C4 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function hasArgs(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasReturns() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function hasArgsAndReturns(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | +| c | [] | ++----------+--------------+ +Contract C5 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function payableFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function externalFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function publicFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function internalFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function privateFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function pureFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function viewFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function abstractFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C6 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function abstractFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function abstractFunc2() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C7 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function abstractFunc3() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C8 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function abstractFunc() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function abstractFunc2() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function abstractFunc3() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..72b30b907a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,183 @@ + +# Contracts +# C1 + - Declaration: tests/ast-parsing/function-0.7.1.sol#1 (10 - 13) + - Implementation(s): [] + - References: [] + + ## Function + - C1.constructor() + - Declaration: tests/ast-parsing/function-0.7.1.sol#3 (5 - 17) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#3 (5 - 21)'] + - References: [] + - C1.fallback() + - Declaration: tests/ast-parsing/function-0.7.1.sol#5 (5 - 14) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#5 (5 - 27)'] + - References: [] + - C1.receive() + - Declaration: tests/ast-parsing/function-0.7.1.sol#7 (5 - 13) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#7 (5 - 34)'] + - References: [] + + ## State variables + + ## Structures +# C2 + - Declaration: tests/ast-parsing/function-0.7.1.sol#10 (10 - 13) + - Implementation(s): [] + - References: [] + + ## Function + - C2.constructor() + - Declaration: tests/ast-parsing/function-0.7.1.sol#12 (5 - 17) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#12 (5 - 29)'] + - References: [] + - C2.fallback() + - Declaration: tests/ast-parsing/function-0.7.1.sol#14 (5 - 14) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#14 (5 - 27)'] + - References: [] + - C2.receive() + - Declaration: tests/ast-parsing/function-0.7.1.sol#16 (5 - 13) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#16 (5 - 34)'] + - References: [] + + ## State variables + + ## Structures +# C3 + - Declaration: tests/ast-parsing/function-0.7.1.sol#19 (19 - 22) + - Implementation(s): [] + - References: [] + + ## Function + - C3.constructor() + - Declaration: tests/ast-parsing/function-0.7.1.sol#21 (5 - 17) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#21 (5 - 30)'] + - References: [] + - C3.f() + - Declaration: tests/ast-parsing/function-0.7.1.sol#26 (14 - 16) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#26 (5 - 76)'] + - References: [] + + ## State variables + + ## Structures +# C4 + - Declaration: tests/ast-parsing/function-0.7.1.sol#29 (10 - 13) + - Implementation(s): [] + - References: [] + + ## Function + - C4.hasArgs(uint256,uint256) + - Declaration: tests/ast-parsing/function-0.7.1.sol#30 (14 - 22) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#30 (5 - 43)'] + - References: [] + - C4.hasReturns() + - Declaration: tests/ast-parsing/function-0.7.1.sol#31 (14 - 25) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#31 (5 - 51)'] + - References: [] + - C4.hasArgsAndReturns(uint256,uint256) + - Declaration: tests/ast-parsing/function-0.7.1.sol#32 (14 - 32) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#32 (5 - 74)'] + - References: [] + + ## State variables + + ## Structures +# C5 + - Declaration: tests/ast-parsing/function-0.7.1.sol#35 (19 - 22) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#55-59 (1 - 2)'] + - References: ['tests/ast-parsing/function-0.7.1.sol#55 (16 - 18)', 'tests/ast-parsing/function-0.7.1.sol#56 (53 - 55)'] + + ## Function + - C5.payableFunc() + - Declaration: tests/ast-parsing/function-0.7.1.sol#36 (14 - 26) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#36 (5 - 45)'] + - References: [] + - C5.externalFunc() + - Declaration: tests/ast-parsing/function-0.7.1.sol#37 (14 - 27) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#37 (5 - 40)'] + - References: [] + - C5.publicFunc() + - Declaration: tests/ast-parsing/function-0.7.1.sol#38 (14 - 25) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#38 (5 - 36)'] + - References: [] + - C5.internalFunc() + - Declaration: tests/ast-parsing/function-0.7.1.sol#39 (14 - 27) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#39 (5 - 40)'] + - References: [] + - C5.privateFunc() + - Declaration: tests/ast-parsing/function-0.7.1.sol#40 (14 - 26) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#40 (5 - 38)'] + - References: [] + - C5.pureFunc() + - Declaration: tests/ast-parsing/function-0.7.1.sol#41 (14 - 23) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#41 (5 - 39)'] + - References: [] + - C5.viewFunc() + - Declaration: tests/ast-parsing/function-0.7.1.sol#42 (14 - 23) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#42 (5 - 39)'] + - References: [] + - C5.abstractFunc() + - Declaration: tests/ast-parsing/function-0.7.1.sol#43 (14 - 27) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#56 (5 - 63)'] + - References: [] + + ## State variables + + ## Structures +# C6 + - Declaration: tests/ast-parsing/function-0.7.1.sol#46 (19 - 22) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#55-59 (1 - 2)'] + - References: ['tests/ast-parsing/function-0.7.1.sol#55 (20 - 22)', 'tests/ast-parsing/function-0.7.1.sol#56 (57 - 59)', 'tests/ast-parsing/function-0.7.1.sol#57 (54 - 56)'] + + ## Function + - C6.abstractFunc() + - Declaration: tests/ast-parsing/function-0.7.1.sol#47 (14 - 27) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#56 (5 - 63)'] + - References: [] + - C6.abstractFunc2() + - Declaration: tests/ast-parsing/function-0.7.1.sol#48 (14 - 28) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#57 (5 - 60)'] + - References: [] + + ## State variables + + ## Structures +# C7 + - Declaration: tests/ast-parsing/function-0.7.1.sol#51 (19 - 22) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#55-59 (1 - 2)'] + - References: ['tests/ast-parsing/function-0.7.1.sol#55 (24 - 26)'] + + ## Function + - C7.abstractFunc3() + - Declaration: tests/ast-parsing/function-0.7.1.sol#52 (14 - 28) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#58 (5 - 56)'] + - References: [] + + ## State variables + + ## Structures +# C8 + - Declaration: tests/ast-parsing/function-0.7.1.sol#55 (10 - 13) + - Implementation(s): [] + - References: [] + + ## Function + - C8.abstractFunc() + - Declaration: tests/ast-parsing/function-0.7.1.sol#56 (14 - 27) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#56 (5 - 63)'] + - References: [] + - C8.abstractFunc2() + - Declaration: tests/ast-parsing/function-0.7.1.sol#57 (14 - 28) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#57 (5 - 60)'] + - References: [] + - C8.abstractFunc3() + - Declaration: tests/ast-parsing/function-0.7.1.sol#58 (14 - 28) + - Implementation(s): ['tests/ast-parsing/function-0.7.1.sol#58 (5 - 56)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..c03ebac8ce --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,77 @@ +Export tmp.zip-C1-constructor().dot +Export tmp.zip-C1-fallback().dot +Export tmp.zip-C1-receive().dot +Export tmp.zip-C2-constructor().dot +Export tmp.zip-C2-fallback().dot +Export tmp.zip-C2-receive().dot +Export tmp.zip-C3-constructor().dot +Export tmp.zip-C3-f().dot +Export tmp.zip-C3-modifierNoArgs().dot +Export tmp.zip-C3-modifierWithArgs(uint256).dot +Export tmp.zip-C4-hasArgs(uint256,uint256).dot +Export tmp.zip-C4-hasReturns().dot +Export tmp.zip-C4-hasArgsAndReturns(uint256,uint256).dot +Export tmp.zip-C5-payableFunc().dot +Export tmp.zip-C5-externalFunc().dot +Export tmp.zip-C5-publicFunc().dot +Export tmp.zip-C5-internalFunc().dot +Export tmp.zip-C5-privateFunc().dot +Export tmp.zip-C5-pureFunc().dot +Export tmp.zip-C5-viewFunc().dot +Export tmp.zip-C5-abstractFunc().dot +Export tmp.zip-C6-abstractFunc().dot +Export tmp.zip-C6-abstractFunc2().dot +Export tmp.zip-C7-abstractFunc3().dot +Export tmp.zip-C8-abstractFunc3().dot +Export tmp.zip-C8-abstractFunc().dot +Export tmp.zip-C8-abstractFunc2().dot +Export tmp.zip-C8-payableFunc().dot +Export tmp.zip-C8-externalFunc().dot +Export tmp.zip-C8-publicFunc().dot +Export tmp.zip-C8-internalFunc().dot +Export tmp.zip-C8-privateFunc().dot +Export tmp.zip-C8-pureFunc().dot +Export tmp.zip-C8-viewFunc().dot +Export tmp.zip-C8-abstractFunc().dot +Export tmp.zip-C8-abstractFunc().dot +Export tmp.zip-C8-abstractFunc2().dot +Export tmp.zip-C8-abstractFunc3().dot + +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..317d1d02c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,196 @@ +{ + "payable": { + "C1": [ + "()" + ], + "C2": [ + "constructor()", + "()" + ], + "C5": [ + "payableFunc()" + ], + "C8": [ + "payableFunc()" + ] + }, + "timestamp": { + "C3": [ + "f()" + ] + }, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C1": [ + "constructor()", + "()" + ], + "C2": [ + "()" + ], + "C3": [ + "f()" + ], + "C4": [ + "hasArgs(uint256,uint256)", + "hasReturns()", + "hasArgsAndReturns(uint256,uint256)" + ], + "C5": [ + "externalFunc()", + "publicFunc()", + "pureFunc()", + "viewFunc()" + ], + "C8": [ + "externalFunc()", + "publicFunc()", + "pureFunc()", + "viewFunc()", + "abstractFunc()", + "abstractFunc2()", + "abstractFunc3()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C1": { + "constructor()": { + "impacts": [], + "is_impacted_by": [] + }, + "()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C2": { + "constructor()": { + "impacts": [], + "is_impacted_by": [] + }, + "()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C3": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C4": { + "hasArgs(uint256,uint256)": { + "impacts": [], + "is_impacted_by": [] + }, + "hasReturns()": { + "impacts": [], + "is_impacted_by": [] + }, + "hasArgsAndReturns(uint256,uint256)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C5": { + "payableFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "externalFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "publicFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "pureFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "viewFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "abstractFunc()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C6": { + "abstractFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "abstractFunc2()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C7": { + "abstractFunc3()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C8": { + "payableFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "externalFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "publicFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "pureFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "viewFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "abstractFunc()": { + "impacts": [], + "is_impacted_by": [] + }, + "abstractFunc2()": { + "impacts": [], + "is_impacted_by": [] + }, + "abstractFunc3()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": { + "C1": "constructor()", + "C2": "constructor()", + "C3": "constructor()" + }, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [ + "C1", + "C2" + ], + "with_receive": [ + "C1", + "C2" + ] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..1b06306de3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,49 @@ + +C1: ++---------------+------------+ +| Name | ID | ++---------------+------------+ +| constructor() | 0x90fa17bb | +| fallback() | 0x552079dc | +| receive() | 0xa3e76c0f | ++---------------+------------+ + +C2: ++---------------+------------+ +| Name | ID | ++---------------+------------+ +| constructor() | 0x90fa17bb | +| fallback() | 0x552079dc | +| receive() | 0xa3e76c0f | ++---------------+------------+ + +C3: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + +C4: ++------------------------------------+------------+ +| Name | ID | ++------------------------------------+------------+ +| hasArgs(uint256,uint256) | 0x23cf4bfd | +| hasReturns() | 0x614bce06 | +| hasArgsAndReturns(uint256,uint256) | 0x4f2750ef | ++------------------------------------+------------+ + +C8: ++-----------------+------------+ +| Name | ID | ++-----------------+------------+ +| payableFunc() | 0x289ec69b | +| externalFunc() | 0x42b148aa | +| publicFunc() | 0x4b73383f | +| pureFunc() | 0x231e18a9 | +| viewFunc() | 0x7f2857b6 | +| abstractFunc() | 0x3a9407ec | +| abstractFunc2() | 0xe4da4753 | +| abstractFunc3() | 0xa1a4d851 | ++-----------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..49e90407a5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,151 @@ + +Contract C1 +Contract vars: [] +Inheritance:: [] + ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor() | public | [] | [] | [] | [] | [] | 1 | +| fallback() | external | [] | [] | [] | [] | [] | 1 | +| receive() | external | [] | [] | [] | [] | [] | 1 | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C2 +Contract vars: [] +Inheritance:: [] + ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor() | public | [] | [] | [] | [] | [] | 1 | +| fallback() | external | [] | [] | [] | [] | [] | 1 | +| receive() | external | [] | [] | [] | [] | [] | 1 | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C3 +Contract vars: [] +Inheritance:: [] + ++---------------+------------+----------------------------------------+---------------------+-------+----------------------------------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------+------------+----------------------------------------+---------------------+-------+----------------------------------------+----------------+-----------------------+ +| constructor() | internal | [] | [] | [] | [] | [] | 1 | +| f() | public | ['modifierNoArgs', 'modifierWithArgs'] | ['block.timestamp'] | [] | ['modifierNoArgs', 'modifierWithArgs'] | [] | 1 | ++---------------+------------+----------------------------------------+---------------------+-------+----------------------------------------+----------------+-----------------------+ + ++---------------------------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------------------+------------+------+-------+----------------+----------------+-----------------------+ +| modifierNoArgs() | internal | [] | [] | [] | [] | 1 | +| modifierWithArgs(uint256) | internal | [] | [] | [] | [] | 1 | ++---------------------------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C4 +Contract vars: [] +Inheritance:: [] + ++------------------------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++------------------------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| hasArgs(uint256,uint256) | public | [] | [] | [] | [] | [] | 1 | +| hasReturns() | public | [] | [] | [] | [] | [] | 1 | +| hasArgsAndReturns(uint256,uint256) | public | [] | [] | [] | [] | [] | 1 | ++------------------------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C5 +Contract vars: [] +Inheritance:: [] + ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| payableFunc() | public | [] | [] | [] | [] | [] | 1 | +| externalFunc() | external | [] | [] | [] | [] | [] | 1 | +| publicFunc() | public | [] | [] | [] | [] | [] | 1 | +| internalFunc() | internal | [] | [] | [] | [] | [] | 1 | +| privateFunc() | private | [] | [] | [] | [] | [] | 1 | +| pureFunc() | public | [] | [] | [] | [] | [] | 1 | +| viewFunc() | public | [] | [] | [] | [] | [] | 1 | +| abstractFunc() | public | [] | [] | [] | [] | [] | 2 | ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C6 +Contract vars: [] +Inheritance:: [] + ++-----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| abstractFunc() | public | [] | [] | [] | [] | [] | 2 | +| abstractFunc2() | public | [] | [] | [] | [] | [] | 2 | ++-----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C7 +Contract vars: [] +Inheritance:: [] + ++-----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| abstractFunc3() | public | [] | [] | [] | [] | [] | 2 | ++-----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C8 +Contract vars: [] +Inheritance:: ['C7', 'C6', 'C5'] + ++-----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| abstractFunc3() | public | [] | [] | [] | [] | [] | 2 | +| abstractFunc() | public | [] | [] | [] | [] | [] | 2 | +| abstractFunc2() | public | [] | [] | [] | [] | [] | 2 | +| payableFunc() | public | [] | [] | [] | [] | [] | 1 | +| externalFunc() | external | [] | [] | [] | [] | [] | 1 | +| publicFunc() | public | [] | [] | [] | [] | [] | 1 | +| internalFunc() | internal | [] | [] | [] | [] | [] | 1 | +| privateFunc() | private | [] | [] | [] | [] | [] | 1 | +| pureFunc() | public | [] | [] | [] | [] | [] | 1 | +| viewFunc() | public | [] | [] | [] | [] | [] | 1 | +| abstractFunc() | public | [] | [] | [] | [] | [] | 2 | +| abstractFunc() | public | [] | [] | [] | [] | [] | 1 | +| abstractFunc2() | public | [] | [] | [] | [] | [] | 1 | +| abstractFunc3() | public | [] | [] | [] | [] | [] | 1 | ++-----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..1365d438cc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,46 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C1 | 0 | 0 | 0 | 0 | +| C2 | 0 | 0 | 0 | 0 | +| C3 | 2 | 1 | 3 | 2 | +| C4 | 1 | 1 | 1 | 1 | +| C5 | 0 | 0 | 0 | 0 | +| C6 | 0 | 0 | 0 | 0 | +| C7 | 0 | 0 | 0 | 0 | +| C8 | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C1 | 0 | 0 | 0 | 0 | +| C2 | 0 | 0 | 0 | 0 | +| C3 | 3 | 5 | 2 | 8 | +| C4 | 2 | 2 | 0 | 2 | +| C5 | 0 | 0 | 0 | 0 | +| C6 | 0 | 0 | 0 | 0 | +| C7 | 0 | 0 | 0 | 0 | +| C8 | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C1 | 0 | 0 | 0 | 0.000 | +| C2 | 0 | 0 | 0 | 0.000 | +| C3 | 1 | 6 | 0 | 0.001 | +| C4 | 0 | 1 | 0 | 0.000 | +| C5 | 0 | 0 | 0 | 0.000 | +| C6 | 0 | 0 | 0 | 0.000 | +| C7 | 0 | 0 | 0 | 0.000 | +| C8 | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..ac2b3b9b5a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 8 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 44 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..0d7fafd078 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,42 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C1 + ++ C2 + ++ C3 + ++ C4 + ++ C5 + ++ C6 + ++ C7 + ++ C8 + -> C5, C6, C7 + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C1 + ++ C2 + ++ C3 + ++ C4 + ++ C5 + -> C8 + ++ C6 + -> C8 + ++ C7 + -> C8 + ++ C8 + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..c4c204da88 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,23 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c13_C1[shape="box"label=<
C1
Public Functions:
fallback()
receive()
>]; + +c26_C2[shape="box"label=<
C2
Public Functions:
fallback()
receive()
>]; + +c51_C3[shape="box"label=<
C3
Public Functions:
f()
Modifiers:
modifierNoArgs()
modifierWithArgs(uint256)
>]; + +c76_C4[shape="box"label=<
C4
Public Functions:
hasArgs(uint256,uint256)
hasReturns()
hasArgsAndReturns(uint256,uint256)
>]; + +c108_C5[shape="box"label=<
C5
Public Functions:
payableFunc()
externalFunc()
publicFunc()
pureFunc()
viewFunc()
Private Functions:
internalFunc()
privateFunc()
>]; + +c115_C6[shape="box"label=<
C6
>]; + +c119_C7[shape="box"label=<
C7
>]; + +c144_C8 -> c108_C5 [ label="1" ]; +c144_C8 -> c115_C6 [ label="2" ]; +c144_C8 -> c119_C7 [ label="3" ]; +c144_C8[shape="box"label=<
C8
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..b530c59ec1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 61 | +| sloc | 0 | 0 | 44 | +| cloc | 0 | 0 | 3 | +| Total | 0 | 0 | 108 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..82fea856b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,21 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.38 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C1 | 0 | 0 | 0.00 | 0.00 | +| C2 | 0 | 0 | 0.00 | 0.00 | +| C3 | 0 | 0 | 0.00 | 0.00 | +| C4 | 0 | 0 | 0.00 | 0.00 | +| C5 | 0 | 0 | 0.00 | 0.00 | +| C6 | 0 | 0 | 0.00 | 0.00 | +| C7 | 0 | 0 | 0.00 | 0.00 | +| C8 | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..8934f14f36 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,51 @@ + +Contract C1 ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | +| fallback | [] | +| receive | [] | ++-------------+-----------+ +Contract C2 ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | +| fallback | [] | +| receive | [] | ++-------------+-----------+ +Contract C3 ++-------------+----------------------------------------+ +| Function | Modifiers | ++-------------+----------------------------------------+ +| constructor | [] | +| f | ['modifierNoArgs', 'modifierWithArgs'] | ++-------------+----------------------------------------+ +Contract C4 ++-------------------+-----------+ +| Function | Modifiers | ++-------------------+-----------+ +| hasArgs | [] | +| hasReturns | [] | +| hasArgsAndReturns | [] | ++-------------------+-----------+ +Contract C8 ++---------------+-----------+ +| Function | Modifiers | ++---------------+-----------+ +| abstractFunc3 | [] | +| abstractFunc | [] | +| abstractFunc2 | [] | +| payableFunc | [] | +| externalFunc | [] | +| publicFunc | [] | +| internalFunc | [] | +| privateFunc | [] | +| pureFunc | [] | +| viewFunc | [] | +| abstractFunc | [] | +| abstractFunc | [] | +| abstractFunc2 | [] | +| abstractFunc3 | [] | ++---------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f9cf2d8c03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,71 @@ +Constructor and pure/view functions are not displayed + +C1: ++------------+-------------------+ +| Name | Use whenNotPaused | ++------------+-------------------+ +| fallback() | | +| receive() | | ++------------+-------------------+ + +C2: ++------------+-------------------+ +| Name | Use whenNotPaused | ++------------+-------------------+ +| fallback() | | +| receive() | | ++------------+-------------------+ + +C3: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + +C4: ++------------------------------------+-------------------+ +| Name | Use whenNotPaused | ++------------------------------------+-------------------+ +| hasArgs(uint256,uint256) | | +| hasReturns() | | +| hasArgsAndReturns(uint256,uint256) | | ++------------------------------------+-------------------+ + +C5: ++----------------+-------------------+ +| Name | Use whenNotPaused | ++----------------+-------------------+ +| payableFunc() | | +| externalFunc() | | +| publicFunc() | | +| abstractFunc() | | ++----------------+-------------------+ + +C6: ++-----------------+-------------------+ +| Name | Use whenNotPaused | ++-----------------+-------------------+ +| abstractFunc() | | +| abstractFunc2() | | ++-----------------+-------------------+ + +C7: ++-----------------+-------------------+ +| Name | Use whenNotPaused | ++-----------------+-------------------+ +| abstractFunc3() | | ++-----------------+-------------------+ + +C8: ++-----------------+-------------------+ +| Name | Use whenNotPaused | ++-----------------+-------------------+ +| payableFunc() | | +| externalFunc() | | +| publicFunc() | | +| abstractFunc() | | +| abstractFunc2() | | +| abstractFunc3() | | ++-----------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..9bbde969e4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,51 @@ + +Contract C1 ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | +| fallback | | +| receive | | ++-------------+-------------------+ +Contract C2 ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | +| fallback | | +| receive | | ++-------------+-------------------+ +Contract C3 ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | +| f | | ++-------------+-------------------+ +Contract C4 ++-------------------+-------------------+ +| Function | require or assert | ++-------------------+-------------------+ +| hasArgs | | +| hasReturns | | +| hasArgsAndReturns | | ++-------------------+-------------------+ +Contract C8 ++---------------+-------------------+ +| Function | require or assert | ++---------------+-------------------+ +| abstractFunc3 | | +| abstractFunc | | +| abstractFunc2 | | +| payableFunc | | +| externalFunc | | +| publicFunc | | +| internalFunc | | +| privateFunc | | +| pureFunc | | +| viewFunc | | +| abstractFunc | | +| abstractFunc | | +| abstractFunc2 | | +| abstractFunc3 | | ++---------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..5b16bd2829 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,58 @@ +Contract C1 + Function C1.constructor() (*) + Function C1.fallback() (*) + Function C1.receive() (*) +Contract C2 + Function C2.constructor() (*) + Function C2.fallback() (*) + Function C2.receive() (*) +Contract C3 + Function C3.constructor() (*) + Function C3.f() (*) + Expression: modifierNoArgs() + IRs: + MODIFIER_CALL, C3.modifierNoArgs()() + Expression: modifierWithArgs(block.timestamp) + IRs: + MODIFIER_CALL, C3.modifierWithArgs(uint256)(block.timestamp) + Modifier C3.modifierNoArgs() + Modifier C3.modifierWithArgs(uint256) +Contract C4 + Function C4.hasArgs(uint256,uint256) (*) + Function C4.hasReturns() (*) + Function C4.hasArgsAndReturns(uint256,uint256) (*) + Expression: c + IRs: + RETURN c +Contract C5 + Function C5.payableFunc() (*) + Function C5.externalFunc() (*) + Function C5.publicFunc() (*) + Function C5.internalFunc() (*) + Function C5.privateFunc() (*) + Function C5.pureFunc() (*) + Function C5.viewFunc() (*) + Function C5.abstractFunc() (*) +Contract C6 + Function C6.abstractFunc() (*) + Function C6.abstractFunc2() (*) +Contract C7 + Function C7.abstractFunc3() (*) +Contract C8 + Function C7.abstractFunc3() + Function C6.abstractFunc() + Function C6.abstractFunc2() + Function C5.payableFunc() (*) + Function C5.externalFunc() (*) + Function C5.publicFunc() (*) + Function C5.internalFunc() (*) + Function C5.privateFunc() (*) + Function C5.pureFunc() (*) + Function C5.viewFunc() (*) + Function C5.abstractFunc() + Function C8.abstractFunc() (*) + Function C8.abstractFunc2() (*) + Function C8.abstractFunc3() (*) +Top level functions + Function freeFunc() + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..692724fe84 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,31 @@ + +C1: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C2: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C3: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C4: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C8: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..d08834bdb9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_function_0_7_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,85 @@ + +Contract C1 ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | +| fallback | [] | [] | +| receive | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract C2 ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | +| fallback | [] | [] | +| receive | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract C3 ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | +| f | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract C4 ++-------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------------+-------------------------+--------------------------+ +| hasArgs | [] | [] | +| hasReturns | [] | [] | +| hasArgsAndReturns | [] | [] | ++-------------------+-------------------------+--------------------------+ + +Contract C5 ++--------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++--------------+-------------------------+--------------------------+ +| payableFunc | [] | [] | +| externalFunc | [] | [] | +| publicFunc | [] | [] | +| internalFunc | [] | [] | +| privateFunc | [] | [] | +| pureFunc | [] | [] | +| viewFunc | [] | [] | +| abstractFunc | [] | [] | ++--------------+-------------------------+--------------------------+ + +Contract C6 ++---------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++---------------+-------------------------+--------------------------+ +| abstractFunc | [] | [] | +| abstractFunc2 | [] | [] | ++---------------+-------------------------+--------------------------+ + +Contract C7 ++---------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++---------------+-------------------------+--------------------------+ +| abstractFunc3 | [] | [] | ++---------------+-------------------------+--------------------------+ + +Contract C8 ++---------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++---------------+-------------------------+--------------------------+ +| abstractFunc3 | [] | [] | +| abstractFunc | [] | [] | +| abstractFunc2 | [] | [] | +| payableFunc | [] | [] | +| externalFunc | [] | [] | +| publicFunc | [] | [] | +| internalFunc | [] | [] | +| privateFunc | [] | [] | +| pureFunc | [] | [] | +| viewFunc | [] | [] | +| abstractFunc | [] | [] | +| abstractFunc | [] | [] | +| abstractFunc2 | [] | [] | +| abstractFunc3 | [] | [] | ++---------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..5168c8322b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,51 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipI.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_347_C { +label = "C" +"347_f" [label="f"] +"347_internalTarget" [label="internalTarget"] +"347_publicTarget" [label="publicTarget"] +"347_f" -> "347_internalTarget" +"347_f" -> "347_publicTarget" +}subgraph cluster_179_I { +label = "I" +"179_constructor" [label="constructor"] +}subgraph cluster_solidity { +label = "[Solidity]" +"abi.decode()" +"abi.encode()" +"type(address)" +"347_f" -> "abi.decode()" +"347_f" -> "abi.encode()" +"347_f" -> "type(address)" +}"347_f" -> "347_publicTarget" +} +strict digraph { +subgraph cluster_179_I { +label = "I" +"179_constructor" [label="constructor"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_347_C { +label = "C" +"347_f" [label="f"] +"347_internalTarget" [label="internalTarget"] +"347_publicTarget" [label="publicTarget"] +"347_f" -> "347_internalTarget" +"347_f" -> "347_publicTarget" +}subgraph cluster_solidity { +label = "[Solidity]" +"abi.decode()" +"abi.encode()" +"type(address)" +"347_f" -> "abi.decode()" +"347_f" -> "abi.encode()" +"347_f" -> "type(address)" +}"347_f" -> "347_publicTarget" +} diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..c09a227e0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,167 @@ +Export tmp.zip-I-constructor().dot +Export tmp.zip-C-f().dot +Export tmp.zip-C-publicTarget().dot +Export tmp.zip-C-internalTarget(uint256,uint256).dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +publicTarget() + +IRs: +INTERNAL_CALL, C.publicTarget()()"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +this.publicTarget() + +IRs: +HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] "]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +this.publicTarget.value(1000000000000000000)() + +IRs: +HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] value:1000000000000000000 "]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +this.publicTarget.value(1000000000000000000) + +IRs: +REF_3(function()) -> this.publicTarget +REF_4(None) -> REF_3.value"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +this.publicTarget.gas(10000)() + +IRs: +HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] gas:10000"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +this.publicTarget.gas(10000).value(2000000000000000000)() + +IRs: +HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] value:2000000000000000000 gas:10000"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +this.publicTarget.gas(10000).gas(20000).value(2000000000000000000).gas(0)() + +IRs: +HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] value:2000000000000000000 gas:0"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +internalTarget(1,2) + +IRs: +INTERNAL_CALL, C.internalTarget(uint256,uint256)(1,2)"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +S({a:5,b:6}) + +IRs: +TMP_16(C.S) = new S(5,6)"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +T({s1:S({a:1,b:2}),s2:S({a:3,b:4})}) + +IRs: +TMP_17(C.S) = new S(1,2) +TMP_18(C.S) = new S(3,4) +TMP_19(C.T) = new T(TMP_17,TMP_18)"]; +10->11; +11[label="Node Type: NEW VARIABLE 11 +"]; +11->12; +12[label="Node Type: EXPRESSION 12 + +EXPRESSION: +ptr.value(10000000000000000000)(1) + +IRs: +INTERNAL_DYNAMIC_CALL ptr(1) value:10000000000000000000 "]; +12->13; +13[label="Node Type: EXPRESSION 13 + +EXPRESSION: +I(msg.sender) + +IRs: +TMP_22 = CONVERT msg.sender to I"]; +13->14; +14[label="Node Type: EXPRESSION 14 + +EXPRESSION: +new I() + +IRs: +TMP_24(I) = new I() "]; +14->15; +15[label="Node Type: EXPRESSION 15 + +EXPRESSION: +(new I).value(1000000000000000000)() + +IRs: +TMP_27(I) = new I() value:1000000000000000000 "]; +15->16; +16[label="Node Type: EXPRESSION 16 + +EXPRESSION: +type(address)(I) + +IRs: +TMP_28(type(I)) = SOLIDITY_CALL type(address)(I)"]; +16->17; +17[label="Node Type: EXPRESSION 17 + +EXPRESSION: +abi.encode(1,2,3) + +IRs: +TMP_29(bytes) = SOLIDITY_CALL abi.encode()(1,2,3)"]; +17->18; +18[label="Node Type: EXPRESSION 18 + +EXPRESSION: +abi.decode(msg.data,(uint256,uint256[],I)) + +IRs: +TUPLE_0(uint256,uint256[],I) = SOLIDITY_CALL abi.decode()(msg.data(uint256,uint256[],I))"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..17ee1530ba --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| I | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| I | 0 | 0 | 0 | 0 | +| C | 3 | 0 | 0 | 0 | +| TOTAL | 3 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| I | 0 | 0 | 0 | +| C | 3 | 0 | 0 | +| TOTAL | 3 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| I | 0 | 0 | 0 | +| C | 3 | 3 | 3 | +| TOTAL | 3 | 3 | 3 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| I | 0 | 0 | 0 | 0 | 0 | +| C | 5 | 4 | 0 | 0 | 1 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..e714d84da1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1,14 @@ + +################# +####### I ####### +################# + +## Constructor Call Sequence + - I + +## Constructor Definitions + +### I + + constructor() public payable {} + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..ec01fd736c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,11 @@ + ++ Contract I (Most derived contract) + - From I + - constructor() (public) + ++ Contract C (Most derived contract) + - From C + - f() (public) + - internalTarget(uint256,uint256) (public) + - publicTarget() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..6179b4d1ab --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,47 @@ + +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| ptr | [] | ++----------+--------------+ +Function publicTarget() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function internalTarget(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..75f0b30d93 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,53 @@ + +# Contracts +# I + - Declaration: tests/ast-parsing/functioncall-0.5.3.sol#1 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/functioncall-0.5.3.sol#34 (9 - 22)', 'tests/ast-parsing/functioncall-0.5.3.sol#36 (13 - 14)', 'tests/ast-parsing/functioncall-0.5.3.sol#37 (14 - 15)', 'tests/ast-parsing/functioncall-0.5.3.sol#39 (14 - 15)', 'tests/ast-parsing/functioncall-0.5.3.sol#42 (45 - 46)', 'tests/ast-parsing/functioncall-0.5.3.sol#36 (9 - 16)', 'tests/ast-parsing/functioncall-0.5.3.sol#37 (9 - 33)'] + + ## Function + - I.constructor() + - Declaration: tests/ast-parsing/functioncall-0.5.3.sol#2 (5 - 17) + - Implementation(s): ['tests/ast-parsing/functioncall-0.5.3.sol#2 (5 - 36)'] + - References: [] + + ## State variables + + ## Structures +# C + - Declaration: tests/ast-parsing/functioncall-0.5.3.sol#5 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/functioncall-0.5.3.sol#16 (14 - 16) + - Implementation(s): ['tests/ast-parsing/functioncall-0.5.3.sol#16-43 (5 - 6)'] + - References: [] + - C.publicTarget() + - Declaration: tests/ast-parsing/functioncall-0.5.3.sol#45 (14 - 27) + - Implementation(s): ['tests/ast-parsing/functioncall-0.5.3.sol#45-47 (5 - 6)'] + - References: ['tests/ast-parsing/functioncall-0.5.3.sol#17 (9 - 21)', 'tests/ast-parsing/functioncall-0.5.3.sol#19 (9 - 28)', 'tests/ast-parsing/functioncall-0.5.3.sol#20 (9 - 43)', 'tests/ast-parsing/functioncall-0.5.3.sol#22 (9 - 39)', 'tests/ast-parsing/functioncall-0.5.3.sol#23 (9 - 54)', 'tests/ast-parsing/functioncall-0.5.3.sol#24 (9 - 72)'] + - C.internalTarget(uint256,uint256) + - Declaration: tests/ast-parsing/functioncall-0.5.3.sol#49 (14 - 29) + - Implementation(s): ['tests/ast-parsing/functioncall-0.5.3.sol#49-51 (5 - 6)'] + - References: ['tests/ast-parsing/functioncall-0.5.3.sol#26 (9 - 23)'] + + ## State variables + + ## Structures + - S + - Declaration: struct S { + uint a; + uint b; + } + - Implementation: tests/ast-parsing/functioncall-0.5.3.sol#6-9 (5 - 6) + - References: ['tests/ast-parsing/functioncall-0.5.3.sol#12 (9 - 10)', 'tests/ast-parsing/functioncall-0.5.3.sol#13 (9 - 10)', 'tests/ast-parsing/functioncall-0.5.3.sol#28 (9 - 10)', 'tests/ast-parsing/functioncall-0.5.3.sol#29 (16 - 17)', 'tests/ast-parsing/functioncall-0.5.3.sol#29 (37 - 38)'] + - T + - Declaration: struct T { + S s1; + S s2; + } + - Implementation: tests/ast-parsing/functioncall-0.5.3.sol#11-14 (5 - 6) + - References: ['tests/ast-parsing/functioncall-0.5.3.sol#29 (9 - 10)'] + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..76f90f4eb6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,9 @@ +Export tmp.zip-I-constructor().dot +Export tmp.zip-C-f().dot +Export tmp.zip-C-publicTarget().dot +Export tmp.zip-C-internalTarget(uint256,uint256).dot + +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..f88d57ca67 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,128 @@ +{ + "payable": { + "I": [ + "constructor()" + ], + "C": [ + "f()", + "publicTarget()" + ] + }, + "timestamp": {}, + "block_number": {}, + "msg_sender": { + "C": [ + "f()" + ] + }, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "internalTarget(uint256,uint256)" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10000", + "type": "uint256" + } + ], + [ + { + "value": "1000000000000000000", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "2000000000000000000", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ], + [ + { + "value": "4", + "type": "uint256" + } + ], + [ + { + "value": "5", + "type": "uint256" + } + ], + [ + { + "value": "6", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "I": { + "constructor()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + }, + "publicTarget()": { + "impacts": [], + "is_impacted_by": [] + }, + "internalTarget(uint256,uint256)": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": { + "I": "constructor()" + }, + "have_external_calls": { + "C": [ + "f()" + ] + }, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..0597ec5494 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,17 @@ + +I: ++---------------+------------+ +| Name | ID | ++---------------+------------+ +| constructor() | 0x90fa17bb | ++---------------+------------+ + +C: ++---------------------------------+------------+ +| Name | ID | ++---------------------------------+------------+ +| f() | 0x26121ff0 | +| publicTarget() | 0x9e9eef8f | +| internalTarget(uint256,uint256) | 0x7091991d | ++---------------------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..dabdad716f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,43 @@ + +Contract I +Contract vars: [] +Inheritance:: [] + ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor() | public | [] | [] | [] | [] | [] | 1 | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: [] +Inheritance:: [] + ++---------------------------------+------------+-----------+----------------------------+-------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------------------------+------------+-----------+----------------------------+-------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------+ +| f() | public | [] | ['msg.data', 'msg.sender'] | [] | ['abi.decode()', 'abi.encode()'] | ['(new I).value(1000000000000000000)', '(new I).value(1000000000000000000)()'] | 1 | +| | | | ['this'] | | ['internalTarget', 'publicTarget'] | ['abi.decode(msg.data,(uint256,uint256[],I))', 'abi.encode(1,2,3)'] | | +| | | | | | ['type(address)'] | ['new I()', 'ptr.value(10000000000000000000)'] | | +| | | | | | | ['ptr.value(10000000000000000000)(1)', 'this.publicTarget()'] | | +| | | | | | | ['this.publicTarget.gas(10000)', 'this.publicTarget.gas(10000)'] | | +| | | | | | | ['this.publicTarget.gas(10000)', 'this.publicTarget.gas(10000)()'] | | +| | | | | | | ['this.publicTarget.gas(10000).gas(20000)', 'this.publicTarget.gas(10000).gas(20000).value(2000000000000000000)'] | | +| | | | | | | ['this.publicTarget.gas(10000).gas(20000).value(2000000000000000000).gas(0)', 'this.publicTarget.gas(10000).gas(20000).value(2000000000000000000).gas(0)()'] | | +| | | | | | | ['this.publicTarget.gas(10000).value(2000000000000000000)', 'this.publicTarget.gas(10000).value(2000000000000000000)()'] | | +| | | | | | | ['this.publicTarget.value(1000000000000000000)', 'this.publicTarget.value(1000000000000000000)'] | | +| | | | | | | ['this.publicTarget.value(1000000000000000000)()'] | | +| publicTarget() | public | [] | [] | [] | [] | [] | 1 | +| internalTarget(uint256,uint256) | public | [] | [] | [] | [] | [] | 1 | ++---------------------------------+------------+-----------+----------------------------+-------+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..cb86f2ef43 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| I | 0 | 0 | 0 | 0 | +| C | 20 | 10 | 46 | 23 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| I | 0 | 0 | 0 | 0 | +| C | 33 | 66 | 137 | 333 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| I | 0 | 0 | 0 | 0.000 | +| C | 10 | 3329 | 185 | 0.074 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..e66d0b2390 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 37 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..98e0a0a538 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ I + ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ I + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..dec2396be4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c179_I[shape="box"label=<
I
>]; + +c347_C[shape="box"label=<
C
Public Functions:
f()
publicTarget()
internalTarget(uint256,uint256)
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..07ae4a58da --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 52 | +| sloc | 0 | 0 | 37 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 89 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..e998b9bee0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| I | 0 | 0 | 0.00 | 0.00 | +| C | 0 | 1 | 1.00 | 1.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..8e5c61ad38 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,15 @@ + +Contract I ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | ++-------------+-----------+ +Contract C ++----------------+-----------+ +| Function | Modifiers | ++----------------+-----------+ +| f | [] | +| publicTarget | [] | +| internalTarget | [] | ++----------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..0691cdec33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,17 @@ +Constructor and pure/view functions are not displayed + +I: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +C: ++---------------------------------+-------------------+ +| Name | Use whenNotPaused | ++---------------------------------+-------------------+ +| f() | | +| publicTarget() | | +| internalTarget(uint256,uint256) | | ++---------------------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..bd00119abc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,15 @@ + +Contract I ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | ++-------------+-------------------+ +Contract C ++----------------+-------------------+ +| Function | require or assert | ++----------------+-------------------+ +| f | | +| publicTarget | | +| internalTarget | | ++----------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..3249ca6f11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,61 @@ +Contract I + Function I.constructor() (*) +Contract C + Function C.f() (*) + Expression: publicTarget() + IRs: + INTERNAL_CALL, C.publicTarget()() + Expression: this.publicTarget() + IRs: + HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] + Expression: this.publicTarget.value(1000000000000000000)() + IRs: + HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] value:1000000000000000000 + Expression: this.publicTarget.value(1000000000000000000) + IRs: + REF_3(function()) -> this.publicTarget + REF_4(None) -> REF_3.value + Expression: this.publicTarget.gas(10000)() + IRs: + HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] gas:10000 + Expression: this.publicTarget.gas(10000).value(2000000000000000000)() + IRs: + HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] value:2000000000000000000 gas:10000 + Expression: this.publicTarget.gas(10000).gas(20000).value(2000000000000000000).gas(0)() + IRs: + HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] value:2000000000000000000 gas:0 + Expression: internalTarget(1,2) + IRs: + INTERNAL_CALL, C.internalTarget(uint256,uint256)(1,2) + Expression: S({a:5,b:6}) + IRs: + TMP_16(C.S) = new S(5,6) + Expression: T({s1:S({a:1,b:2}),s2:S({a:3,b:4})}) + IRs: + TMP_17(C.S) = new S(1,2) + TMP_18(C.S) = new S(3,4) + TMP_19(C.T) = new T(TMP_17,TMP_18) + Expression: ptr.value(10000000000000000000)(1) + IRs: + INTERNAL_DYNAMIC_CALL ptr(1) value:10000000000000000000 + Expression: I(msg.sender) + IRs: + TMP_22 = CONVERT msg.sender to I + Expression: new I() + IRs: + TMP_24(I) = new I() + Expression: (new I).value(1000000000000000000)() + IRs: + TMP_27(I) = new I() value:1000000000000000000 + Expression: type(address)(I) + IRs: + TMP_28(type(I)) = SOLIDITY_CALL type(address)(I) + Expression: abi.encode(1,2,3) + IRs: + TMP_29(bytes) = SOLIDITY_CALL abi.encode()(1,2,3) + Expression: abi.decode(msg.data,(uint256,uint256[],I)) + IRs: + TUPLE_0(uint256,uint256[],I) = SOLIDITY_CALL abi.decode()(msg.data(uint256,uint256[],I)) + Function C.publicTarget() (*) + Function C.internalTarget(uint256,uint256) (*) + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..99d6a62a51 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,13 @@ + +I: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..bd85339dcb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_5_3_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,17 @@ + +Contract I ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract C ++----------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------------+-------------------------+--------------------------+ +| f | [] | [] | +| publicTarget | [] | [] | +| internalTarget | [] | [] | ++----------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..db264118d0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,51 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipI.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_170_C { +label = "C" +"170_f" [label="f"] +"170_internalTarget" [label="internalTarget"] +"170_publicTarget" [label="publicTarget"] +"170_f" -> "170_internalTarget" +"170_f" -> "170_publicTarget" +}subgraph cluster_5_I { +label = "I" +"5_constructor" [label="constructor"] +}subgraph cluster_solidity { +label = "[Solidity]" +"abi.decode()" +"abi.encode()" +"type()" +"170_f" -> "abi.decode()" +"170_f" -> "abi.encode()" +"170_f" -> "type()" +}"170_f" -> "170_publicTarget" +} +strict digraph { +subgraph cluster_5_I { +label = "I" +"5_constructor" [label="constructor"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_170_C { +label = "C" +"170_f" [label="f"] +"170_internalTarget" [label="internalTarget"] +"170_publicTarget" [label="publicTarget"] +"170_f" -> "170_internalTarget" +"170_f" -> "170_publicTarget" +}subgraph cluster_solidity { +label = "[Solidity]" +"abi.decode()" +"abi.encode()" +"type()" +"170_f" -> "abi.decode()" +"170_f" -> "abi.encode()" +"170_f" -> "type()" +}"170_f" -> "170_publicTarget" +} diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8c3780d0cf --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,183 @@ +Export tmp.zip-I-constructor().dot +Export tmp.zip-C-f().dot +Export tmp.zip-C-publicTarget().dot +Export tmp.zip-C-internalTarget(uint256,uint256).dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +publicTarget() + +IRs: +INTERNAL_CALL, C.publicTarget()()"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +this.publicTarget() + +IRs: +HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] "]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +this.publicTarget{value: 1000000000000000000}() + +IRs: +HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] value:1000000000000000000 "]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +this.publicTarget + +IRs: +REF_2(function()) -> this.publicTarget"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +this.publicTarget{gas: 10000}() + +IRs: +HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] gas:10000"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +this.publicTarget{gas: 20000,value: 2000000000000000000}() + +IRs: +HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] value:2000000000000000000 gas:20000"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +internalTarget(1,2) + +IRs: +INTERNAL_CALL, C.internalTarget(uint256,uint256)(1,2)"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +S({a:5,b:6}) + +IRs: +TMP_6(C.S) = new S(5,6)"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +T({s1:S({a:1,b:2}),s2:S({a:3,b:4})}) + +IRs: +TMP_7(C.S) = new S(1,2) +TMP_8(C.S) = new S(3,4) +TMP_9(C.T) = new T(TMP_7,TMP_8)"]; +9->10; +10[label="Node Type: NEW VARIABLE 10 +"]; +10->11; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +ptr{value: 10000000000000000000}(1) + +IRs: +INTERNAL_DYNAMIC_CALL ptr(1) "]; +11->12; +12[label="Node Type: EXPRESSION 12 + +EXPRESSION: +I(msg.sender) + +IRs: +TMP_11 = CONVERT msg.sender to I"]; +12->13; +13[label="Node Type: EXPRESSION 13 + +EXPRESSION: +new I() + +IRs: +TMP_13(I) = new I() "]; +13->14; +14[label="Node Type: EXPRESSION 14 + +EXPRESSION: +(new I){value: 1000000000000000000}() + +IRs: +TMP_15(I) = new I() value:1000000000000000000 "]; +14->15; +15[label="Node Type: EXPRESSION 15 + +EXPRESSION: +(new I){value: 1000000000000000000,salt: +}() + +IRs: +TMP_17(I) = new I() value:1000000000000000000 salt: + "]; +15->16; +16[label="Node Type: EXPRESSION 16 + +EXPRESSION: +type()(I) + +IRs: +TMP_18(type(I)) = SOLIDITY_CALL type()(I)"]; +16->17; +17[label="Node Type: EXPRESSION 17 + +EXPRESSION: +type()(int256) +"]; +17->18; +18[label="Node Type: EXPRESSION 18 + +EXPRESSION: +abi.encode(1,2,3) + +IRs: +TMP_20(bytes) = SOLIDITY_CALL abi.encode()(1,2,3)"]; +18->19; +19[label="Node Type: EXPRESSION 19 + +EXPRESSION: +abi.decode(msg.data,(uint256,uint256[],I)) + +IRs: +TUPLE_0(uint256,uint256[],I) = SOLIDITY_CALL abi.decode()(msg.data(uint256,uint256[],I))"]; +19->20; +20[label="Node Type: EXPRESSION 20 + +EXPRESSION: +address(address(1)) + +IRs: +TMP_21 = CONVERT 1 to address +TMP_22 = CONVERT TMP_21 to address"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..a10560702d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| I | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| I | 0 | 0 | 0 | 0 | +| C | 3 | 0 | 0 | 0 | +| TOTAL | 3 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| I | 0 | 0 | 0 | +| C | 3 | 0 | 0 | +| TOTAL | 3 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| I | 0 | 0 | 0 | +| C | 3 | 3 | 3 | +| TOTAL | 3 | 3 | 3 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| I | 0 | 0 | 0 | 0 | 0 | +| C | 4 | 4 | 0 | 0 | 1 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..e714d84da1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1,14 @@ + +################# +####### I ####### +################# + +## Constructor Call Sequence + - I + +## Constructor Definitions + +### I + + constructor() public payable {} + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..ec01fd736c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,11 @@ + ++ Contract I (Most derived contract) + - From I + - constructor() (public) + ++ Contract C (Most derived contract) + - From C + - f() (public) + - internalTarget(uint256,uint256) (public) + - publicTarget() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..6179b4d1ab --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,47 @@ + +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| ptr | [] | ++----------+--------------+ +Function publicTarget() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function internalTarget(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..300b3f681e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,53 @@ + +# Contracts +# I + - Declaration: tests/ast-parsing/functioncall-0.8.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/functioncall-0.8.0.sol#33 (9 - 22)', 'tests/ast-parsing/functioncall-0.8.0.sol#35 (13 - 14)', 'tests/ast-parsing/functioncall-0.8.0.sol#36 (14 - 15)', 'tests/ast-parsing/functioncall-0.8.0.sol#37 (14 - 15)', 'tests/ast-parsing/functioncall-0.8.0.sol#39 (14 - 15)', 'tests/ast-parsing/functioncall-0.8.0.sol#43 (45 - 46)', 'tests/ast-parsing/functioncall-0.8.0.sol#35 (9 - 16)', 'tests/ast-parsing/functioncall-0.8.0.sol#36 (9 - 34)', 'tests/ast-parsing/functioncall-0.8.0.sol#37 (9 - 49)'] + + ## Function + - I.constructor() + - Declaration: tests/ast-parsing/functioncall-0.8.0.sol#2 (5 - 17) + - Implementation(s): ['tests/ast-parsing/functioncall-0.8.0.sol#2 (5 - 36)'] + - References: [] + + ## State variables + + ## Structures +# C + - Declaration: tests/ast-parsing/functioncall-0.8.0.sol#5 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/functioncall-0.8.0.sol#16 (14 - 16) + - Implementation(s): ['tests/ast-parsing/functioncall-0.8.0.sol#16-46 (5 - 6)'] + - References: [] + - C.publicTarget() + - Declaration: tests/ast-parsing/functioncall-0.8.0.sol#48 (14 - 27) + - Implementation(s): ['tests/ast-parsing/functioncall-0.8.0.sol#48-50 (5 - 6)'] + - References: ['tests/ast-parsing/functioncall-0.8.0.sol#17 (9 - 21)', 'tests/ast-parsing/functioncall-0.8.0.sol#19 (9 - 28)', 'tests/ast-parsing/functioncall-0.8.0.sol#20 (9 - 44)', 'tests/ast-parsing/functioncall-0.8.0.sol#22 (9 - 40)', 'tests/ast-parsing/functioncall-0.8.0.sol#23 (9 - 56)'] + - C.internalTarget(uint256,uint256) + - Declaration: tests/ast-parsing/functioncall-0.8.0.sol#52 (14 - 29) + - Implementation(s): ['tests/ast-parsing/functioncall-0.8.0.sol#52-54 (5 - 6)'] + - References: ['tests/ast-parsing/functioncall-0.8.0.sol#25 (9 - 23)'] + + ## State variables + + ## Structures + - S + - Declaration: struct S { + uint a; + uint b; + } + - Implementation: tests/ast-parsing/functioncall-0.8.0.sol#6-9 (5 - 6) + - References: ['tests/ast-parsing/functioncall-0.8.0.sol#12 (9 - 10)', 'tests/ast-parsing/functioncall-0.8.0.sol#13 (9 - 10)', 'tests/ast-parsing/functioncall-0.8.0.sol#27 (9 - 10)', 'tests/ast-parsing/functioncall-0.8.0.sol#28 (16 - 17)', 'tests/ast-parsing/functioncall-0.8.0.sol#28 (37 - 38)'] + - T + - Declaration: struct T { + S s1; + S s2; + } + - Implementation: tests/ast-parsing/functioncall-0.8.0.sol#11-14 (5 - 6) + - References: ['tests/ast-parsing/functioncall-0.8.0.sol#28 (9 - 10)'] + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..76f90f4eb6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,9 @@ +Export tmp.zip-I-constructor().dot +Export tmp.zip-C-f().dot +Export tmp.zip-C-publicTarget().dot +Export tmp.zip-C-internalTarget(uint256,uint256).dot + +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..ff9493068f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,140 @@ +{ + "payable": { + "I": [ + "constructor()" + ], + "C": [ + "f()", + "publicTarget()" + ] + }, + "timestamp": {}, + "block_number": {}, + "msg_sender": { + "C": [ + "f()" + ] + }, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "internalTarget(uint256,uint256)" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "\n", + "type": "string" + } + ], + [ + { + "value": "1", + "type": "address" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10000", + "type": "uint256" + } + ], + [ + { + "value": "1000000000000000000", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "20000", + "type": "uint256" + } + ], + [ + { + "value": "2000000000000000000", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ], + [ + { + "value": "4", + "type": "uint256" + } + ], + [ + { + "value": "5", + "type": "uint256" + } + ], + [ + { + "value": "6", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "I": { + "constructor()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + }, + "publicTarget()": { + "impacts": [], + "is_impacted_by": [] + }, + "internalTarget(uint256,uint256)": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": { + "I": "constructor()" + }, + "have_external_calls": { + "C": [ + "f()" + ] + }, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..0597ec5494 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,17 @@ + +I: ++---------------+------------+ +| Name | ID | ++---------------+------------+ +| constructor() | 0x90fa17bb | ++---------------+------------+ + +C: ++---------------------------------+------------+ +| Name | ID | ++---------------------------------+------------+ +| f() | 0x26121ff0 | +| publicTarget() | 0x9e9eef8f | +| internalTarget(uint256,uint256) | 0x7091991d | ++---------------------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..91b7e9ed9c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,37 @@ + +Contract I +Contract vars: [] +Inheritance:: [] + ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor() | public | [] | [] | [] | [] | [] | 1 | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: [] +Inheritance:: [] + ++---------------------------------+------------+-----------+----------------------------+-------+------------------------------------+---------------------------------------------------------------------------------------------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------------------------+------------+-----------+----------------------------+-------+------------------------------------+---------------------------------------------------------------------------------------------------+-----------------------+ +| f() | public | [] | ['msg.data', 'msg.sender'] | [] | ['abi.decode()', 'abi.encode()'] | ['(new I){value: 1000000000000000000,salt: \n}()', '(new I){value: 1000000000000000000}()'] | 1 | +| | | | ['this'] | | ['internalTarget', 'publicTarget'] | ['abi.decode(msg.data,(uint256,uint256[],I))', 'abi.encode(1,2,3)'] | | +| | | | | | ['type()'] | ['new I()', 'this.publicTarget()'] | | +| | | | | | | ['this.publicTarget{gas: 10000}()', 'this.publicTarget{gas: 20000,value: 2000000000000000000}()'] | | +| | | | | | | ['this.publicTarget{value: 1000000000000000000}()'] | | +| publicTarget() | public | [] | [] | [] | [] | [] | 1 | +| internalTarget(uint256,uint256) | public | [] | [] | [] | [] | [] | 1 | ++---------------------------------+------------+-----------+----------------------------+-------+------------------------------------+---------------------------------------------------------------------------------------------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..6a006bd029 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| I | 0 | 0 | 0 | 0 | +| C | 21 | 11 | 42 | 22 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| I | 0 | 0 | 0 | 0 | +| C | 33 | 63 | 136 | 318 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| I | 0 | 0 | 0 | 0.000 | +| C | 10 | 3337 | 185 | 0.074 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..9a78f7adfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 39 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..98e0a0a538 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ I + ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ I + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..dc6fc01912 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c5_I[shape="box"label=<
I
>]; + +c170_C[shape="box"label=<
C
Public Functions:
f()
publicTarget()
internalTarget(uint256,uint256)
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..8408155cdb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 55 | +| sloc | 0 | 0 | 39 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 94 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..e998b9bee0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| I | 0 | 0 | 0.00 | 0.00 | +| C | 0 | 1 | 1.00 | 1.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..8e5c61ad38 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,15 @@ + +Contract I ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | ++-------------+-----------+ +Contract C ++----------------+-----------+ +| Function | Modifiers | ++----------------+-----------+ +| f | [] | +| publicTarget | [] | +| internalTarget | [] | ++----------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..0691cdec33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,17 @@ +Constructor and pure/view functions are not displayed + +I: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +C: ++---------------------------------+-------------------+ +| Name | Use whenNotPaused | ++---------------------------------+-------------------+ +| f() | | +| publicTarget() | | +| internalTarget(uint256,uint256) | | ++---------------------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..bd00119abc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,15 @@ + +Contract I ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | ++-------------+-------------------+ +Contract C ++----------------+-------------------+ +| Function | require or assert | ++----------------+-------------------+ +| f | | +| publicTarget | | +| internalTarget | | ++----------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cd3e6d48e6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,68 @@ +Contract I + Function I.constructor() (*) +Contract C + Function C.f() (*) + Expression: publicTarget() + IRs: + INTERNAL_CALL, C.publicTarget()() + Expression: this.publicTarget() + IRs: + HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] + Expression: this.publicTarget{value: 1000000000000000000}() + IRs: + HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] value:1000000000000000000 + Expression: this.publicTarget + IRs: + REF_2(function()) -> this.publicTarget + Expression: this.publicTarget{gas: 10000}() + IRs: + HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] gas:10000 + Expression: this.publicTarget{gas: 20000,value: 2000000000000000000}() + IRs: + HIGH_LEVEL_CALL, dest:this(address), function:publicTarget, arguments:[] value:2000000000000000000 gas:20000 + Expression: internalTarget(1,2) + IRs: + INTERNAL_CALL, C.internalTarget(uint256,uint256)(1,2) + Expression: S({a:5,b:6}) + IRs: + TMP_6(C.S) = new S(5,6) + Expression: T({s1:S({a:1,b:2}),s2:S({a:3,b:4})}) + IRs: + TMP_7(C.S) = new S(1,2) + TMP_8(C.S) = new S(3,4) + TMP_9(C.T) = new T(TMP_7,TMP_8) + Expression: ptr{value: 10000000000000000000}(1) + IRs: + INTERNAL_DYNAMIC_CALL ptr(1) + Expression: I(msg.sender) + IRs: + TMP_11 = CONVERT msg.sender to I + Expression: new I() + IRs: + TMP_13(I) = new I() + Expression: (new I){value: 1000000000000000000}() + IRs: + TMP_15(I) = new I() value:1000000000000000000 + Expression: (new I){value: 1000000000000000000,salt: +}() + IRs: + TMP_17(I) = new I() value:1000000000000000000 salt: + + Expression: type()(I) + IRs: + TMP_18(type(I)) = SOLIDITY_CALL type()(I) + Expression: type()(int256) + IRs: + Expression: abi.encode(1,2,3) + IRs: + TMP_20(bytes) = SOLIDITY_CALL abi.encode()(1,2,3) + Expression: abi.decode(msg.data,(uint256,uint256[],I)) + IRs: + TUPLE_0(uint256,uint256[],I) = SOLIDITY_CALL abi.decode()(msg.data(uint256,uint256[],I)) + Expression: address(address(1)) + IRs: + TMP_21 = CONVERT 1 to address + TMP_22 = CONVERT TMP_21 to address + Function C.publicTarget() (*) + Function C.internalTarget(uint256,uint256) (*) + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..99d6a62a51 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,13 @@ + +I: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..bd85339dcb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_functioncall_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,17 @@ + +Contract I ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract C ++----------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------------+-------------------------+--------------------------+ +| f | [] | [] | +| publicTarget | [] | [] | +| internalTarget | [] | [] | ++----------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..be79aa13f5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,25 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_197_C { +label = "C" +"197_ifWithElse" [label="ifWithElse"] +"197_ifWithElseIf" [label="ifWithElseIf"] +"197_ifWithElseIfElse" [label="ifWithElseIfElse"] +"197_ifWithoutElse" [label="ifWithoutElse"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_197_C { +label = "C" +"197_ifWithElse" [label="ifWithElse"] +"197_ifWithElseIf" [label="ifWithElseIf"] +"197_ifWithElseIfElse" [label="ifWithElseIfElse"] +"197_ifWithoutElse" [label="ifWithoutElse"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..14f794a4b1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,191 @@ +Export tmp.zip-C-ifWithoutElse().dot +Export tmp.zip-C-ifWithElse().dot +Export tmp.zip-C-ifWithElseIf().dot +Export tmp.zip-C-ifWithElseIfElse().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +a > 100 + +IRs: +TMP_0(bool) = a > 100 +CONDITION TMP_0"]; +1->2[label="True"]; +1->3[label="False"]; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +a = 100 + +IRs: +a(uint256) := 100(uint256)"]; +2->3; +3[label="Node Type: END_IF 3 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +a < 50 + +IRs: +TMP_1(bool) = a < 50 +CONDITION TMP_1"]; +1->2[label="True"]; +1->3[label="False"]; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +a = 50 + +IRs: +a(uint256) := 50(uint256)"]; +2->4; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +a /= 2 + +IRs: +a(uint256) = a / 2"]; +3->4; +4[label="Node Type: END_IF 4 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +a % 2 == 0 + +IRs: +TMP_2(uint256) = a % 2 +TMP_3(bool) = TMP_2 == 0 +CONDITION TMP_3"]; +1->2[label="True"]; +1->3[label="False"]; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +a += 1 + +IRs: +a(uint256) = a + 1"]; +2->9; +3[label="Node Type: IF 3 + +EXPRESSION: +a % 3 == 0 + +IRs: +TMP_4(uint256) = a % 3 +TMP_5(bool) = TMP_4 == 0 +CONDITION TMP_5"]; +3->4[label="True"]; +3->5[label="False"]; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +a /= 3 + +IRs: +a(uint256) = a / 3"]; +4->8; +5[label="Node Type: IF 5 + +EXPRESSION: +a % 4 == 0 + +IRs: +TMP_6(uint256) = a % 4 +TMP_7(bool) = TMP_6 == 0 +CONDITION TMP_7"]; +5->6[label="True"]; +5->7[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +a *= 2 + +IRs: +a(uint256) = a * 2"]; +6->7; +7[label="Node Type: END_IF 7 +"]; +7->8; +8[label="Node Type: END_IF 8 +"]; +8->9; +9[label="Node Type: END_IF 9 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +a >= 100 + +IRs: +TMP_8(bool) = a >= 100 +CONDITION TMP_8"]; +1->2[label="True"]; +1->3[label="False"]; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +a = 100 + +IRs: +a(uint256) := 100(uint256)"]; +2->7; +3[label="Node Type: IF 3 + +EXPRESSION: +a < 50 + +IRs: +TMP_9(bool) = a < 50 +CONDITION TMP_9"]; +3->4[label="True"]; +3->5[label="False"]; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +a = 80 + +IRs: +a(uint256) := 80(uint256)"]; +4->6; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +a = 75 + +IRs: +a(uint256) := 75(uint256)"]; +5->6; +6[label="Node Type: END_IF 6 +"]; +6->7; +7[label="Node Type: END_IF 7 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..5404671098 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 4 | 0 | 0 | 0 | +| TOTAL | 4 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 4 | 0 | 0 | +| TOTAL | 4 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 4 | 4 | 4 | +| TOTAL | 4 | 4 | 4 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 4 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..67c8ef847a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,8 @@ + ++ Contract C (Most derived contract) + - From C + - ifWithElse() (public) + - ifWithElseIf() (public) + - ifWithElseIfElse() (public) + - ifWithoutElse() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..86c3e5540f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,32 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | ['a'] | ++----------+--------------+ + +Function ifWithoutElse() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| C.a | ['a'] | ++----------+--------------+ +Function ifWithElse() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| C.a | ['a'] | ++----------+--------------+ +Function ifWithElseIf() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| C.a | ['a'] | ++----------+--------------+ +Function ifWithElseIfElse() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| C.a | ['a'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..0ce47d01af --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,33 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/if-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.ifWithoutElse() + - Declaration: tests/ast-parsing/if-all.sol#4 (14 - 28) + - Implementation(s): ['tests/ast-parsing/if-all.sol#4-8 (5 - 6)'] + - References: [] + - C.ifWithElse() + - Declaration: tests/ast-parsing/if-all.sol#10 (14 - 25) + - Implementation(s): ['tests/ast-parsing/if-all.sol#10-16 (5 - 6)'] + - References: [] + - C.ifWithElseIf() + - Declaration: tests/ast-parsing/if-all.sol#18 (14 - 27) + - Implementation(s): ['tests/ast-parsing/if-all.sol#18-26 (5 - 6)'] + - References: [] + - C.ifWithElseIfElse() + - Declaration: tests/ast-parsing/if-all.sol#28 (14 - 31) + - Implementation(s): ['tests/ast-parsing/if-all.sol#28-36 (5 - 6)'] + - References: [] + + ## State variables + - a + - Declaration: tests/ast-parsing/if-all.sol#2 (18 - 20) + - Implementation: tests/ast-parsing/if-all.sol#2 (5 - 19) + - References: ['tests/ast-parsing/if-all.sol#5 (13 - 14)', 'tests/ast-parsing/if-all.sol#6 (13 - 14)', 'tests/ast-parsing/if-all.sol#11 (13 - 14)', 'tests/ast-parsing/if-all.sol#12 (13 - 14)', 'tests/ast-parsing/if-all.sol#14 (13 - 14)', 'tests/ast-parsing/if-all.sol#19 (13 - 14)', 'tests/ast-parsing/if-all.sol#20 (13 - 14)', 'tests/ast-parsing/if-all.sol#21 (20 - 21)', 'tests/ast-parsing/if-all.sol#22 (13 - 14)', 'tests/ast-parsing/if-all.sol#23 (20 - 21)', 'tests/ast-parsing/if-all.sol#24 (13 - 14)', 'tests/ast-parsing/if-all.sol#29 (13 - 14)', 'tests/ast-parsing/if-all.sol#30 (13 - 14)', 'tests/ast-parsing/if-all.sol#31 (20 - 21)', 'tests/ast-parsing/if-all.sol#32 (13 - 14)', 'tests/ast-parsing/if-all.sol#34 (13 - 14)'] + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..efa343984b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,9 @@ +Export tmp.zip-C-ifWithoutElse().dot +Export tmp.zip-C-ifWithElse().dot +Export tmp.zip-C-ifWithElseIf().dot +Export tmp.zip-C-ifWithElseIfElse().dot + +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..3a8f9e7cfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,265 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "C": { + "ifWithoutElse()": [ + [ + { + "value": "100", + "type": "uint256" + } + ] + ], + "ifWithElse()": [ + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "50", + "type": "uint256" + } + ] + ], + "ifWithElseIf()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ], + [ + { + "value": "4", + "type": "uint256" + } + ] + ], + "ifWithElseIfElse()": [ + [ + { + "value": "100", + "type": "uint256" + } + ], + [ + { + "value": "50", + "type": "uint256" + } + ], + [ + { + "value": "75", + "type": "uint256" + } + ], + [ + { + "value": "80", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "ifWithoutElse()": { + "BinaryType.GREATER": [ + [ + { + "value": "100", + "type": "uint256" + } + ] + ] + }, + "ifWithElse()": { + "BinaryType.DIVISION": [ + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "50", + "type": "uint256" + } + ] + ] + }, + "ifWithElseIf()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.DIVISION": [ + [ + { + "value": "3", + "type": "uint256" + } + ] + ], + "BinaryType.EQUAL": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "BinaryType.MODULO": [ + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ], + [ + { + "value": "4", + "type": "uint256" + } + ] + ], + "BinaryType.MULTIPLICATION": [ + [ + { + "value": "2", + "type": "uint256" + } + ] + ] + }, + "ifWithElseIfElse()": { + "BinaryType.GREATER_EQUAL": [ + [ + { + "value": "100", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "50", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "ifWithoutElse()": { + "impacts": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ], + "is_impacted_by": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ] + }, + "ifWithElse()": { + "impacts": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ], + "is_impacted_by": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ] + }, + "ifWithElseIf()": { + "impacts": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ], + "is_impacted_by": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ] + }, + "ifWithElseIfElse()": { + "impacts": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ], + "is_impacted_by": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..b0ff7c4002 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,11 @@ + +C: ++--------------------+------------+ +| Name | ID | ++--------------------+------------+ +| ifWithoutElse() | 0x48403c28 | +| ifWithElse() | 0xcde7b99f | +| ifWithElseIf() | 0xa65cdd5d | +| ifWithElseIfElse() | 0x0ce142dd | ++--------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..0b2bceaa87 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,19 @@ + +Contract C +Contract vars: ['a'] +Inheritance:: [] + ++--------------------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++--------------------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| ifWithoutElse() | public | [] | ['a'] | ['a'] | [] | [] | 2 | +| ifWithElse() | public | [] | ['a'] | ['a'] | [] | [] | 2 | +| ifWithElseIf() | public | [] | ['a'] | ['a'] | [] | [] | 4 | +| ifWithElseIfElse() | public | [] | ['a'] | ['a'] | [] | [] | 3 | ++--------------------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..ac5a90139e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 26 | 10 | 39 | 10 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 20 | 65 | 66 | 281 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 20 | 5478 | 304 | 0.104 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..e7d9bb8098 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 33 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..845093ddba --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c197_C[shape="box"label=<
C
Public Functions:
ifWithoutElse()
ifWithElse()
ifWithElseIf()
ifWithElseIfElse()
Private Variables:
a
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..517bebd1d0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 37 | +| sloc | 0 | 0 | 33 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 70 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..b50b9f2728 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,10 @@ + +Contract C ++------------------+-----------+ +| Function | Modifiers | ++------------------+-----------+ +| ifWithoutElse | [] | +| ifWithElse | [] | +| ifWithElseIf | [] | +| ifWithElseIfElse | [] | ++------------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..a7903c78f4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,12 @@ +Constructor and pure/view functions are not displayed + +C: ++--------------------+-------------------+ +| Name | Use whenNotPaused | ++--------------------+-------------------+ +| ifWithoutElse() | | +| ifWithElse() | | +| ifWithElseIf() | | +| ifWithElseIfElse() | | ++--------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..87483de168 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,10 @@ + +Contract C ++------------------+-------------------+ +| Function | require or assert | ++------------------+-------------------+ +| ifWithoutElse | | +| ifWithElse | | +| ifWithElseIf | | +| ifWithElseIfElse | | ++------------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..daae69a159 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,64 @@ +Contract C + Function C.ifWithoutElse() (*) + Expression: a > 100 + IRs: + TMP_0(bool) = a > 100 + CONDITION TMP_0 + Expression: a = 100 + IRs: + a(uint256) := 100(uint256) + Function C.ifWithElse() (*) + Expression: a < 50 + IRs: + TMP_1(bool) = a < 50 + CONDITION TMP_1 + Expression: a = 50 + IRs: + a(uint256) := 50(uint256) + Expression: a /= 2 + IRs: + a(uint256) = a / 2 + Function C.ifWithElseIf() (*) + Expression: a % 2 == 0 + IRs: + TMP_2(uint256) = a % 2 + TMP_3(bool) = TMP_2 == 0 + CONDITION TMP_3 + Expression: a += 1 + IRs: + a(uint256) = a + 1 + Expression: a % 3 == 0 + IRs: + TMP_4(uint256) = a % 3 + TMP_5(bool) = TMP_4 == 0 + CONDITION TMP_5 + Expression: a /= 3 + IRs: + a(uint256) = a / 3 + Expression: a % 4 == 0 + IRs: + TMP_6(uint256) = a % 4 + TMP_7(bool) = TMP_6 == 0 + CONDITION TMP_7 + Expression: a *= 2 + IRs: + a(uint256) = a * 2 + Function C.ifWithElseIfElse() (*) + Expression: a >= 100 + IRs: + TMP_8(bool) = a >= 100 + CONDITION TMP_8 + Expression: a = 100 + IRs: + a(uint256) := 100(uint256) + Expression: a < 50 + IRs: + TMP_9(bool) = a < 50 + CONDITION TMP_9 + Expression: a = 80 + IRs: + a(uint256) := 80(uint256) + Expression: a = 75 + IRs: + a(uint256) := 75(uint256) + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..a30bd1ace0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,8 @@ + +C: ++------+---------+------+--------+ +| Name | Type | Slot | Offset | ++------+---------+------+--------+ +| C.a | uint256 | 0 | 0 | ++------+---------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..1bfd1978c7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,11 @@ + +Contract C ++------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++------------------+-------------------------+--------------------------+ +| ifWithoutElse | ['a'] | [] | +| ifWithElse | ['a'] | [] | +| ifWithElseIf | ['a'] | [] | +| ifWithElseIfElse | ['a'] | [] | ++------------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..b9e98bc90b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,25 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_98_C { +label = "C" +"98_ifWithElse" [label="ifWithElse"] +"98_ifWithElseIf" [label="ifWithElseIf"] +"98_ifWithElseIfElse" [label="ifWithElseIfElse"] +"98_ifWithoutElse" [label="ifWithoutElse"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_98_C { +label = "C" +"98_ifWithElse" [label="ifWithElse"] +"98_ifWithElseIf" [label="ifWithElseIf"] +"98_ifWithElseIfElse" [label="ifWithElseIfElse"] +"98_ifWithoutElse" [label="ifWithoutElse"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..52b7212a8c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,191 @@ +Export tmp.zip-C-ifWithoutElse().dot +Export tmp.zip-C-ifWithElse().dot +Export tmp.zip-C-ifWithElseIf().dot +Export tmp.zip-C-ifWithElseIfElse().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +a > 100 + +IRs: +TMP_0(bool) = a > 100 +CONDITION TMP_0"]; +1->2[label="True"]; +1->3[label="False"]; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +a = 100 + +IRs: +a(uint256) := 100(uint256)"]; +2->3; +3[label="Node Type: END_IF 3 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +a < 50 + +IRs: +TMP_1(bool) = a < 50 +CONDITION TMP_1"]; +1->2[label="True"]; +1->3[label="False"]; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +a = 50 + +IRs: +a(uint256) := 50(uint256)"]; +2->4; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +a /= 2 + +IRs: +a(uint256) = a (c)/ 2"]; +3->4; +4[label="Node Type: END_IF 4 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +a % 2 == 0 + +IRs: +TMP_2(uint256) = a % 2 +TMP_3(bool) = TMP_2 == 0 +CONDITION TMP_3"]; +1->2[label="True"]; +1->3[label="False"]; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +a += 1 + +IRs: +a(uint256) = a (c)+ 1"]; +2->9; +3[label="Node Type: IF 3 + +EXPRESSION: +a % 3 == 0 + +IRs: +TMP_4(uint256) = a % 3 +TMP_5(bool) = TMP_4 == 0 +CONDITION TMP_5"]; +3->4[label="True"]; +3->5[label="False"]; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +a /= 3 + +IRs: +a(uint256) = a (c)/ 3"]; +4->8; +5[label="Node Type: IF 5 + +EXPRESSION: +a % 4 == 0 + +IRs: +TMP_6(uint256) = a % 4 +TMP_7(bool) = TMP_6 == 0 +CONDITION TMP_7"]; +5->6[label="True"]; +5->7[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +a *= 2 + +IRs: +a(uint256) = a (c)* 2"]; +6->7; +7[label="Node Type: END_IF 7 +"]; +7->8; +8[label="Node Type: END_IF 8 +"]; +8->9; +9[label="Node Type: END_IF 9 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +a >= 100 + +IRs: +TMP_8(bool) = a >= 100 +CONDITION TMP_8"]; +1->2[label="True"]; +1->3[label="False"]; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +a = 100 + +IRs: +a(uint256) := 100(uint256)"]; +2->7; +3[label="Node Type: IF 3 + +EXPRESSION: +a < 50 + +IRs: +TMP_9(bool) = a < 50 +CONDITION TMP_9"]; +3->4[label="True"]; +3->5[label="False"]; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +a = 80 + +IRs: +a(uint256) := 80(uint256)"]; +4->6; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +a = 75 + +IRs: +a(uint256) := 75(uint256)"]; +5->6; +6[label="Node Type: END_IF 6 +"]; +6->7; +7[label="Node Type: END_IF 7 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..5404671098 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 4 | 0 | 0 | 0 | +| TOTAL | 4 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 4 | 0 | 0 | +| TOTAL | 4 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 4 | 4 | 4 | +| TOTAL | 4 | 4 | 4 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 4 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..67c8ef847a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,8 @@ + ++ Contract C (Most derived contract) + - From C + - ifWithElse() (public) + - ifWithElseIf() (public) + - ifWithElseIfElse() (public) + - ifWithoutElse() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..86c3e5540f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,32 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | ['a'] | ++----------+--------------+ + +Function ifWithoutElse() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| C.a | ['a'] | ++----------+--------------+ +Function ifWithElse() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| C.a | ['a'] | ++----------+--------------+ +Function ifWithElseIf() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| C.a | ['a'] | ++----------+--------------+ +Function ifWithElseIfElse() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| C.a | ['a'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..0ce47d01af --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,33 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/if-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.ifWithoutElse() + - Declaration: tests/ast-parsing/if-all.sol#4 (14 - 28) + - Implementation(s): ['tests/ast-parsing/if-all.sol#4-8 (5 - 6)'] + - References: [] + - C.ifWithElse() + - Declaration: tests/ast-parsing/if-all.sol#10 (14 - 25) + - Implementation(s): ['tests/ast-parsing/if-all.sol#10-16 (5 - 6)'] + - References: [] + - C.ifWithElseIf() + - Declaration: tests/ast-parsing/if-all.sol#18 (14 - 27) + - Implementation(s): ['tests/ast-parsing/if-all.sol#18-26 (5 - 6)'] + - References: [] + - C.ifWithElseIfElse() + - Declaration: tests/ast-parsing/if-all.sol#28 (14 - 31) + - Implementation(s): ['tests/ast-parsing/if-all.sol#28-36 (5 - 6)'] + - References: [] + + ## State variables + - a + - Declaration: tests/ast-parsing/if-all.sol#2 (18 - 20) + - Implementation: tests/ast-parsing/if-all.sol#2 (5 - 19) + - References: ['tests/ast-parsing/if-all.sol#5 (13 - 14)', 'tests/ast-parsing/if-all.sol#6 (13 - 14)', 'tests/ast-parsing/if-all.sol#11 (13 - 14)', 'tests/ast-parsing/if-all.sol#12 (13 - 14)', 'tests/ast-parsing/if-all.sol#14 (13 - 14)', 'tests/ast-parsing/if-all.sol#19 (13 - 14)', 'tests/ast-parsing/if-all.sol#20 (13 - 14)', 'tests/ast-parsing/if-all.sol#21 (20 - 21)', 'tests/ast-parsing/if-all.sol#22 (13 - 14)', 'tests/ast-parsing/if-all.sol#23 (20 - 21)', 'tests/ast-parsing/if-all.sol#24 (13 - 14)', 'tests/ast-parsing/if-all.sol#29 (13 - 14)', 'tests/ast-parsing/if-all.sol#30 (13 - 14)', 'tests/ast-parsing/if-all.sol#31 (20 - 21)', 'tests/ast-parsing/if-all.sol#32 (13 - 14)', 'tests/ast-parsing/if-all.sol#34 (13 - 14)'] + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..efa343984b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,9 @@ +Export tmp.zip-C-ifWithoutElse().dot +Export tmp.zip-C-ifWithElse().dot +Export tmp.zip-C-ifWithElseIf().dot +Export tmp.zip-C-ifWithElseIfElse().dot + +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..6f9a9b84b2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,265 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "C": { + "ifWithoutElse()": [ + [ + { + "value": "100", + "type": "uint256" + } + ] + ], + "ifWithElse()": [ + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "50", + "type": "uint256" + } + ] + ], + "ifWithElseIf()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ], + [ + { + "value": "4", + "type": "uint256" + } + ] + ], + "ifWithElseIfElse()": [ + [ + { + "value": "100", + "type": "uint256" + } + ], + [ + { + "value": "50", + "type": "uint256" + } + ], + [ + { + "value": "75", + "type": "uint256" + } + ], + [ + { + "value": "80", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "ifWithoutElse()": { + "BinaryType.GREATER": [ + [ + { + "value": "100", + "type": "uint256" + } + ] + ] + }, + "ifWithElse()": { + "BinaryType.DIVISION": [ + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "50", + "type": "uint256" + } + ] + ] + }, + "ifWithElseIf()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.DIVISION": [ + [ + { + "value": "3", + "type": "uint256" + } + ] + ], + "BinaryType.EQUAL": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "BinaryType.MODULO": [ + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ], + [ + { + "value": "4", + "type": "uint256" + } + ] + ], + "BinaryType.MULTIPLICATION": [ + [ + { + "value": "2", + "type": "uint256" + } + ] + ] + }, + "ifWithElseIfElse()": { + "BinaryType.GREATER_EQUAL": [ + [ + { + "value": "100", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "50", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "ifWithoutElse()": { + "impacts": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ], + "is_impacted_by": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ] + }, + "ifWithElse()": { + "impacts": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ], + "is_impacted_by": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ] + }, + "ifWithElseIf()": { + "impacts": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ], + "is_impacted_by": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ] + }, + "ifWithElseIfElse()": { + "impacts": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ], + "is_impacted_by": [ + "ifWithoutElse()", + "ifWithElse()", + "ifWithElseIf()", + "ifWithElseIfElse()" + ] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..b0ff7c4002 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,11 @@ + +C: ++--------------------+------------+ +| Name | ID | ++--------------------+------------+ +| ifWithoutElse() | 0x48403c28 | +| ifWithElse() | 0xcde7b99f | +| ifWithElseIf() | 0xa65cdd5d | +| ifWithElseIfElse() | 0x0ce142dd | ++--------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..0b2bceaa87 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,19 @@ + +Contract C +Contract vars: ['a'] +Inheritance:: [] + ++--------------------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++--------------------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| ifWithoutElse() | public | [] | ['a'] | ['a'] | [] | [] | 2 | +| ifWithElse() | public | [] | ['a'] | ['a'] | [] | [] | 2 | +| ifWithElseIf() | public | [] | ['a'] | ['a'] | [] | [] | 4 | +| ifWithElseIfElse() | public | [] | ['a'] | ['a'] | [] | [] | 3 | ++--------------------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..ac5a90139e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 26 | 10 | 39 | 10 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 20 | 65 | 66 | 281 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 20 | 5478 | 304 | 0.104 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..e7d9bb8098 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 33 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..45e90675a5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c98_C[shape="box"label=<
C
Public Functions:
ifWithoutElse()
ifWithElse()
ifWithElseIf()
ifWithElseIfElse()
Private Variables:
a
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..517bebd1d0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 37 | +| sloc | 0 | 0 | 33 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 70 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..b50b9f2728 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,10 @@ + +Contract C ++------------------+-----------+ +| Function | Modifiers | ++------------------+-----------+ +| ifWithoutElse | [] | +| ifWithElse | [] | +| ifWithElseIf | [] | +| ifWithElseIfElse | [] | ++------------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..a7903c78f4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,12 @@ +Constructor and pure/view functions are not displayed + +C: ++--------------------+-------------------+ +| Name | Use whenNotPaused | ++--------------------+-------------------+ +| ifWithoutElse() | | +| ifWithElse() | | +| ifWithElseIf() | | +| ifWithElseIfElse() | | ++--------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..87483de168 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,10 @@ + +Contract C ++------------------+-------------------+ +| Function | require or assert | ++------------------+-------------------+ +| ifWithoutElse | | +| ifWithElse | | +| ifWithElseIf | | +| ifWithElseIfElse | | ++------------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..07fe3d2fc5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,64 @@ +Contract C + Function C.ifWithoutElse() (*) + Expression: a > 100 + IRs: + TMP_0(bool) = a > 100 + CONDITION TMP_0 + Expression: a = 100 + IRs: + a(uint256) := 100(uint256) + Function C.ifWithElse() (*) + Expression: a < 50 + IRs: + TMP_1(bool) = a < 50 + CONDITION TMP_1 + Expression: a = 50 + IRs: + a(uint256) := 50(uint256) + Expression: a /= 2 + IRs: + a(uint256) = a (c)/ 2 + Function C.ifWithElseIf() (*) + Expression: a % 2 == 0 + IRs: + TMP_2(uint256) = a % 2 + TMP_3(bool) = TMP_2 == 0 + CONDITION TMP_3 + Expression: a += 1 + IRs: + a(uint256) = a (c)+ 1 + Expression: a % 3 == 0 + IRs: + TMP_4(uint256) = a % 3 + TMP_5(bool) = TMP_4 == 0 + CONDITION TMP_5 + Expression: a /= 3 + IRs: + a(uint256) = a (c)/ 3 + Expression: a % 4 == 0 + IRs: + TMP_6(uint256) = a % 4 + TMP_7(bool) = TMP_6 == 0 + CONDITION TMP_7 + Expression: a *= 2 + IRs: + a(uint256) = a (c)* 2 + Function C.ifWithElseIfElse() (*) + Expression: a >= 100 + IRs: + TMP_8(bool) = a >= 100 + CONDITION TMP_8 + Expression: a = 100 + IRs: + a(uint256) := 100(uint256) + Expression: a < 50 + IRs: + TMP_9(bool) = a < 50 + CONDITION TMP_9 + Expression: a = 80 + IRs: + a(uint256) := 80(uint256) + Expression: a = 75 + IRs: + a(uint256) := 75(uint256) + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..a30bd1ace0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,8 @@ + +C: ++------+---------+------+--------+ +| Name | Type | Slot | Offset | ++------+---------+------+--------+ +| C.a | uint256 | 0 | 0 | ++------+---------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..1bfd1978c7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_if_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,11 @@ + +Contract C ++------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++------------------+-------------------------+--------------------------+ +| ifWithoutElse | ['a'] | [] | +| ifWithElse | ['a'] | [] | +| ifWithElseIf | ['a'] | [] | +| ifWithElseIfElse | ['a'] | [] | ++------------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..eb29b1f892 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,7 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..92f907cc2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1 @@ +No contract found diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..5007c405a6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,3 @@ + +# Contracts + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..629c987e0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,20 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": {}, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..92f907cc2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1 @@ +No contract found diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..618328d1e1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,12 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Source lines of code (SLOC) in source files: 0 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..5185118e97 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,6 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..23c2b9f30d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,4 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +} diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..174ed44267 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 1 | +| sloc | 0 | 0 | 0 | +| cloc | 0 | 0 | 1 | +| Total | 0 | 0 | 2 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..92f907cc2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1 @@ +No contract found diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..8e33777cc5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,2 @@ +Constructor and pure/view functions are not displayed + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..5c0d6b6794 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipI.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..3e177d15f1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| I | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| I | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| I | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| I | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| I | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..80d212fdc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract I (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..00a30c251d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..cd4f1ddd47 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,19 @@ + +# Contracts +# I + - Declaration: tests/ast-parsing/helper/interface_with_struct.sol#2 (11 - 13) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + - St + - Declaration: struct St{ + uint a; + } + - Implementation: tests/ast-parsing/helper/interface_with_struct.sol#3-5 (5 - 6) + - References: ['tests/ast-parsing/import_interface_with_struct_from_top_level-0.7.6.sol#4 (5 - 9)'] + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..006ce3960a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "I": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..0e2decc398 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +I: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..62f4e1b26d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract I +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..be2e2a1b8a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| I | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| I | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| I | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..927e842dca --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 9 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..4c7ddc972e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ I + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ I + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..23c2b9f30d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,4 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +} diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..2b6a88e56d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 11 | +| sloc | 0 | 0 | 9 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 20 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..4ea89f9522 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| I | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..134d6450c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract I ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..bbf7c78147 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +I: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..52fd42a083 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract I ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..09516d9660 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract I + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..9f090c25dc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +I: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..d20115b29c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_import_interface_with_struct_from_top_level_0_7_6_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract I ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..6be491e071 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_29_C { +label = "C" +"29_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_29_C { +label = "C" +"29_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..f20e40bb05 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,18 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +x[0] + +IRs: +REF_0(uint256) -> x[0]"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..e92f2c4138 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,13 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| x | ['x'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..f838b472ed --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/indexaccess-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/indexaccess-all.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/indexaccess-all.sol#2-6 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..2265857b0a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,42 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..69f52dafb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..9ced1398fb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 1 | 1 | 3 | 3 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 4 | 4 | 5 | 8 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 4 | 0 | 0.001 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..b7508cda54 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 6 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..3541433b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c29_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7732f9d567 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 7 | +| sloc | 0 | 0 | 6 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 13 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..793e6d3214 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,6 @@ +Contract C + Function C.f() (*) + Expression: x[0] + IRs: + REF_0(uint256) -> x[0] + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..917195b87e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_15_C { +label = "C" +"15_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_15_C { +label = "C" +"15_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..f20e40bb05 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,18 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +x[0] + +IRs: +REF_0(uint256) -> x[0]"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..e92f2c4138 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,13 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| x | ['x'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..f838b472ed --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/indexaccess-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/indexaccess-all.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/indexaccess-all.sol#2-6 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..53d1841503 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,42 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..69f52dafb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..9ced1398fb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 1 | 1 | 3 | 3 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 4 | 4 | 5 | 8 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 4 | 0 | 0.001 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..b7508cda54 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 6 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..1b7cf7fc31 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c15_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7732f9d567 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 7 | +| sloc | 0 | 0 | 6 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 13 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..793e6d3214 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,6 @@ +Contract C + Function C.f() (*) + Expression: x[0] + IRs: + REF_0(uint256) -> x[0] + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexaccess_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..0f7ecc1b03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/indexrangeaccess-0.4.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..a0f9e91ef3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 1 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..523e148cfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c3_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7ad904ffae --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 1 | +| sloc | 0 | 0 | 1 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 2 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..3350d9ee20 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_23_C { +label = "C" +"23_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_23_C { +label = "C" +"23_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..14b228287f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,31 @@ +Export tmp.zip-C-f(bytes).dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +x +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +x +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +x +"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +x +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..01e3a7b0a5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 1 | 0 | 0 | +| TOTAL | 0 | 1 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..d72a80e2ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f(bytes) (external) + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..e4db33d394 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,13 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(bytes) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| x | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..fba647dbda --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/indexrangeaccess-0.6.1.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f(bytes) + - Declaration: tests/ast-parsing/indexrangeaccess-0.6.1.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/indexrangeaccess-0.6.1.sol#2-9 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..c830f95694 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f(bytes).dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..0a5f14515e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,31 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f(bytes)" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f(bytes)": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..98249dea1e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++----------+------------+ +| Name | ID | ++----------+------------+ +| f(bytes) | 0xd45754f8 | ++----------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..1904edb348 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f(bytes) | external | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..f94666c3f8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 8 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..259619ba21 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c23_C[shape="box"label=<
C
Public Functions:
f(bytes)
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..356cc55727 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 10 | +| sloc | 0 | 0 | 8 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 18 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..c676b3e13c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++----------+-------------------+ +| Name | Use whenNotPaused | ++----------+-------------------+ +| f(bytes) | | ++----------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..bcdbf054f8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,11 @@ +Contract C + Function C.f(bytes) (*) + Expression: x + IRs: + Expression: x + IRs: + Expression: x + IRs: + Expression: x + IRs: + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_indexrangeaccess_0_6_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..edfea5f35b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,81 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipLibByte.call-graph.dot +Call Graph: tmp.zipTestByte.call-graph.dot +Call Graph: tmp.zipLibUint.call-graph.dot +Call Graph: tmp.zipTestUint.call-graph.dot +Call Graph: tmp.zipLibInt.call-graph.dot +Call Graph: tmp.zipTestUintWithVariableiAndConversion.call-graph.dot + +strict digraph { +subgraph cluster_160_LibByte { +label = "LibByte" +"160_t" [label="t"] +}subgraph cluster_248_LibInt { +label = "LibInt" +"248_t" [label="t"] +}subgraph cluster_203_LibUint { +label = "LibUint" +"203_t" [label="t"] +}subgraph cluster_178_TestByte { +label = "TestByte" +"178_test" [label="test"] +}subgraph cluster_223_TestUint { +label = "TestUint" +"223_test" [label="test"] +}subgraph cluster_269_TestUintWithVariableiAndConversion { +label = "TestUintWithVariableiAndConversion" +"269_test" [label="test"] +}subgraph cluster_solidity { +label = "[Solidity]" +}"178_test" -> "160_t" +"223_test" -> "203_t" +"269_test" -> "248_t" +} +strict digraph { +subgraph cluster_160_LibByte { +label = "LibByte" +"160_t" [label="t"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_178_TestByte { +label = "TestByte" +"178_test" [label="test"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_203_LibUint { +label = "LibUint" +"203_t" [label="t"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_223_TestUint { +label = "TestUint" +"223_test" [label="test"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_248_LibInt { +label = "LibInt" +"248_t" [label="t"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_269_TestUintWithVariableiAndConversion { +label = "TestUintWithVariableiAndConversion" +"269_test" [label="test"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..5383ea82f6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,143 @@ +Export tmp.zip-LibByte-t(uint256,bytes1).dot +Export tmp.zip-LibByte-t(uint256,bytes32).dot +Export tmp.zip-TestByte-test().dot +Export tmp.zip-LibUint-t(uint256,uint8).dot +Export tmp.zip-LibUint-t(uint256,uint256).dot +Export tmp.zip-TestUint-test().dot +Export tmp.zip-LibInt-t(uint256,int8).dot +Export tmp.zip-LibInt-t(uint256,int256).dot +Export tmp.zip-TestUintWithVariableiAndConversion-test().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0x1 + +IRs: +RETURN 1"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0x32 + +IRs: +RETURN 50"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: RETURN 2 + +EXPRESSION: +a.t(0x10) + +IRs: +TMP_0(uint256) = LIBRARY_CALL, dest:LibByte, function:LibByte.t(uint256,bytes1), arguments:['a', '16'] +RETURN TMP_0"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0x1 + +IRs: +RETURN 1"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0x32 + +IRs: +RETURN 50"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: RETURN 2 + +EXPRESSION: +a.t(2 ** 8) + +IRs: +TMP_1(uint256) = 2 ** 8 +TMP_2(uint256) = LIBRARY_CALL, dest:LibUint, function:LibUint.t(uint256,uint256), arguments:['a', 'TMP_1'] +RETURN TMP_2"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0x1 + +IRs: +RETURN 1"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0x32 + +IRs: +RETURN 50"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: RETURN 3 + +EXPRESSION: +a.t(v) + +IRs: +TMP_3(uint256) = LIBRARY_CALL, dest:LibInt, function:LibInt.t(uint256,int256), arguments:['a', 'v'] +RETURN TMP_3"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..29a7cac415 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,74 @@ + + +CK complexity metrics (Variables): ++------------------------------------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++------------------------------------+-----------------+-----------+------------+ +| LibByte | 0 | 0 | 0 | +| TestByte | 0 | 0 | 0 | +| LibUint | 0 | 0 | 0 | +| TestUint | 0 | 0 | 0 | +| LibInt | 0 | 0 | 0 | +| TestUintWithVariableiAndConversion | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++------------------------------------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++------------------------------------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++------------------------------------+--------+----------+----------+---------+ +| LibByte | 0 | 0 | 2 | 0 | +| TestByte | 1 | 0 | 0 | 0 | +| LibUint | 0 | 0 | 2 | 0 | +| TestUint | 1 | 0 | 0 | 0 | +| LibInt | 0 | 0 | 2 | 0 | +| TestUintWithVariableiAndConversion | 1 | 0 | 0 | 0 | +| TOTAL | 3 | 0 | 6 | 0 | ++------------------------------------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++------------------------------------+----------+------+------+ +| Contract | Mutating | View | Pure | ++------------------------------------+----------+------+------+ +| LibByte | 2 | 0 | 0 | +| TestByte | 1 | 0 | 0 | +| LibUint | 2 | 0 | 0 | +| TestUint | 1 | 0 | 0 | +| LibInt | 2 | 0 | 0 | +| TestUintWithVariableiAndConversion | 1 | 0 | 0 | +| TOTAL | 9 | 0 | 0 | ++------------------------------------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++------------------------------------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++------------------------------------+-------------------+----------------------+--------------+ +| LibByte | 0 | 0 | 0 | +| TestByte | 1 | 1 | 1 | +| LibUint | 0 | 0 | 0 | +| TestUint | 1 | 1 | 1 | +| LibInt | 0 | 0 | 0 | +| TestUintWithVariableiAndConversion | 1 | 1 | 1 | +| TOTAL | 3 | 3 | 3 | ++------------------------------------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++------------------------------------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++------------------------------------+-----------+-----+-----+-----+-----+ +| LibByte | 0 | 0 | 0 | 0 | 1 | +| TestByte | 1 | 2 | 0 | 0 | 1 | +| LibUint | 0 | 0 | 0 | 0 | 1 | +| TestUint | 1 | 2 | 0 | 0 | 1 | +| LibInt | 0 | 0 | 0 | 0 | 1 | +| TestUintWithVariableiAndConversion | 1 | 2 | 0 | 0 | 1 | ++------------------------------------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..2e8abeb41a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,28 @@ + ++ Contract LibByte (Most derived contract) + - From LibByte + - t(uint256,bytes1) (internal) + - t(uint256,bytes32) (internal) + ++ Contract TestByte (Most derived contract) + - From TestByte + - test() (public) + ++ Contract LibUint (Most derived contract) + - From LibUint + - t(uint256,uint256) (internal) + - t(uint256,uint8) (internal) + ++ Contract TestUint (Most derived contract) + - From TestUint + - test() (public) + ++ Contract LibInt (Most derived contract) + - From LibInt + - t(uint256,int256) (internal) + - t(uint256,int8) (internal) + ++ Contract TestUintWithVariableiAndConversion (Most derived contract) + - From TestUintWithVariableiAndConversion + - test() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..96c13f5dfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,335 @@ + +Contract LibByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,bytes1) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract LibByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,bytes1) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,bytes1) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,uint8) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract LibByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,bytes1) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,uint8) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,bytes1) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,uint8) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibInt ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,int8) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,int256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract LibByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,bytes1) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,uint8) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibInt ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,int8) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,int256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestUintWithVariableiAndConversion ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | +| v | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..e9d1879ad3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,99 @@ + +# Contracts +# LibByte + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#1 (9 - 17) + - Implementation(s): [] + - References: ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#13 (11 - 18)'] + + ## Function + - LibByte.t(uint256,bytes1) + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#2-4 (5 - 6)'] + - References: ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#16 (16 - 25)'] + - LibByte.t(uint256,bytes32) + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#5 (14 - 16) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#5-7 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# TestByte + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#12 (10 - 19) + - Implementation(s): [] + - References: [] + + ## Function + - TestByte.test() + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#14 (14 - 19) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#14-17 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# LibUint + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#20 (9 - 17) + - Implementation(s): [] + - References: ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#32 (11 - 18)'] + + ## Function + - LibUint.t(uint256,uint8) + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#21 (14 - 16) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#21-23 (5 - 6)'] + - References: [] + - LibUint.t(uint256,uint256) + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#24 (14 - 16) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#24-26 (5 - 6)'] + - References: ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#35 (16 - 25)'] + + ## State variables + + ## Structures +# TestUint + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#30 (10 - 19) + - Implementation(s): [] + - References: [] + + ## Function + - TestUint.test() + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#33 (14 - 19) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#33-36 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# LibInt + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#39 (9 - 16) + - Implementation(s): [] + - References: ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#51 (11 - 17)'] + + ## Function + - LibInt.t(uint256,int8) + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#40 (14 - 16) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#40-42 (5 - 6)'] + - References: [] + - LibInt.t(uint256,int256) + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#43 (14 - 16) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#43-45 (5 - 6)'] + - References: ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#55 (16 - 22)'] + + ## State variables + + ## Structures +# TestUintWithVariableiAndConversion + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#49 (10 - 45) + - Implementation(s): [] + - References: [] + + ## Function + - TestUintWithVariableiAndConversion.test() + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#52 (14 - 19) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#52-56 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..05200f77c6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,19 @@ +Export tmp.zip-LibByte-t(uint256,bytes1).dot +Export tmp.zip-LibByte-t(uint256,bytes32).dot +Export tmp.zip-TestByte-test().dot +Export tmp.zip-LibUint-t(uint256,uint8).dot +Export tmp.zip-LibUint-t(uint256,uint256).dot +Export tmp.zip-TestUint-test().dot +Export tmp.zip-LibInt-t(uint256,int8).dot +Export tmp.zip-LibInt-t(uint256,int256).dot +Export tmp.zip-TestUintWithVariableiAndConversion-test().dot + +None +None +None +None +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..57166b14f6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,126 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "TestByte": { + "test()": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "16", + "type": "uint256" + } + ] + ] + }, + "TestUint": { + "test()": [ + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "256", + "type": "uint256" + } + ], + [ + { + "value": "50", + "type": "uint256" + } + ], + [ + { + "value": "8", + "type": "uint256" + } + ] + ] + }, + "TestUintWithVariableiAndConversion": { + "test()": [ + [ + { + "value": "50", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "TestUint": { + "test()": { + "BinaryType.POWER": [ + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "8", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "LibByte": {}, + "TestByte": { + "test()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "LibUint": {}, + "TestUint": { + "test()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "LibInt": {}, + "TestUintWithVariableiAndConversion": { + "test()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": { + "TestByte": [ + "test()" + ], + "TestUint": [ + "test()" + ], + "TestUintWithVariableiAndConversion": [ + "test()" + ] + }, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..610f805652 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,40 @@ + +LibByte: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +TestByte: ++--------+------------+ +| Name | ID | ++--------+------------+ +| test() | 0xf8a8fd6d | ++--------+------------+ + +LibUint: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +TestUint: ++--------+------------+ +| Name | ID | ++--------+------------+ +| test() | 0xf8a8fd6d | ++--------+------------+ + +LibInt: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +TestUintWithVariableiAndConversion: ++--------+------------+ +| Name | ID | ++--------+------------+ +| test() | 0xf8a8fd6d | ++--------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..7d0566b6f6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,94 @@ + +Contract LibByte +Contract vars: [] +Inheritance:: [] + ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| t(uint256,bytes1) | internal | [] | [] | [] | [] | [] | 1 | +| t(uint256,bytes32) | internal | [] | [] | [] | [] | [] | 1 | ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract TestByte +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| test() | public | [] | [] | [] | [] | ['a.t(0x10)'] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract LibUint +Contract vars: [] +Inheritance:: [] + ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| t(uint256,uint8) | internal | [] | [] | [] | [] | [] | 1 | +| t(uint256,uint256) | internal | [] | [] | [] | [] | [] | 1 | ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract TestUint +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+-----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+-----------------+-----------------------+ +| test() | public | [] | [] | [] | [] | ['a.t(2 ** 8)'] | 1 | ++----------+------------+-----------+------+-------+----------------+-----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract LibInt +Contract vars: [] +Inheritance:: [] + ++-------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| t(uint256,int8) | internal | [] | [] | [] | [] | [] | 1 | +| t(uint256,int256) | internal | [] | [] | [] | [] | [] | 1 | ++-------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract TestUintWithVariableiAndConversion +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| test() | public | [] | [] | [] | [] | ['a.t(v)'] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..2c89c3bd84 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,40 @@ + + +Halstead complexity metrics (Core): ++------------------------------------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++------------------------------------+-----------------+------------------+----------------+-----------------+ +| LibByte | 2 | 1 | 2 | 2 | +| TestByte | 2 | 2 | 3 | 3 | +| LibUint | 2 | 1 | 2 | 2 | +| TestUint | 3 | 3 | 4 | 4 | +| LibInt | 2 | 1 | 2 | 2 | +| TestUintWithVariableiAndConversion | 2 | 2 | 3 | 3 | ++------------------------------------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++------------------------------------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++------------------------------------+------------+----------------+------------------+--------+ +| LibByte | 3 | 4 | 2 | 6 | +| TestByte | 5 | 5 | 7 | 12 | +| LibUint | 3 | 4 | 2 | 6 | +| TestUint | 7 | 7 | 13 | 20 | +| LibInt | 3 | 4 | 2 | 6 | +| TestUintWithVariableiAndConversion | 5 | 5 | 7 | 12 | ++------------------------------------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++------------------------------------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++------------------------------------+------------+--------+------+----------------+ +| LibByte | 0 | 3 | 0 | 0.001 | +| TestByte | 1 | 12 | 1 | 0.002 | +| LibUint | 0 | 3 | 0 | 0.001 | +| TestUint | 2 | 29 | 2 | 0.003 | +| LibInt | 0 | 3 | 0 | 0.001 | +| TestUintWithVariableiAndConversion | 1 | 12 | 1 | 0.002 | ++------------------------------------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..51f52c1126 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 6 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 46 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..b8745dcaf8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,30 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ LibByte + ++ TestByte + ++ LibUint + ++ TestUint + ++ LibInt + ++ TestUintWithVariableiAndConversion + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ LibByte + ++ TestByte + ++ LibUint + ++ TestUint + ++ LibInt + ++ TestUintWithVariableiAndConversion + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..494545c5fd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,10 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c178_TestByte[shape="box"label=<
TestByte
Public Functions:
test()
>]; + +c223_TestUint[shape="box"label=<
TestUint
Public Functions:
test()
>]; + +c269_TestUintWithVariableiAndConversion[shape="box"label=<
TestUintWithVariableiAndConversion
Public Functions:
test()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..542c175b86 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 57 | +| sloc | 0 | 0 | 46 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 103 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..d12d53aab7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,19 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++------------------------------------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++------------------------------------+------------+--------------+-------------+-----------------------------+ +| LibByte | 1 | 0 | 0.00 | 0.00 | +| TestByte | 0 | 1 | 1.00 | 1.00 | +| LibUint | 1 | 0 | 0.00 | 0.00 | +| TestUint | 0 | 1 | 1.00 | 1.00 | +| LibInt | 1 | 0 | 0.00 | 0.00 | +| TestUintWithVariableiAndConversion | 0 | 1 | 1.00 | 1.00 | ++------------------------------------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..30294dfb5d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,40 @@ + +Contract LibByte ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| t | [] | +| t | [] | ++----------+-----------+ +Contract TestByte ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| test | [] | ++----------+-----------+ +Contract LibUint ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| t | [] | +| t | [] | ++----------+-----------+ +Contract TestUint ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| test | [] | ++----------+-----------+ +Contract LibInt ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| t | [] | +| t | [] | ++----------+-----------+ +Contract TestUintWithVariableiAndConversion ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| test | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..4ae17403e7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,41 @@ +Constructor and pure/view functions are not displayed + +LibByte: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +TestByte: ++--------+-------------------+ +| Name | Use whenNotPaused | ++--------+-------------------+ +| test() | | ++--------+-------------------+ + +LibUint: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +TestUint: ++--------+-------------------+ +| Name | Use whenNotPaused | ++--------+-------------------+ +| test() | | ++--------+-------------------+ + +LibInt: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +TestUintWithVariableiAndConversion: ++--------+-------------------+ +| Name | Use whenNotPaused | ++--------+-------------------+ +| test() | | ++--------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..3321d8dec4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,40 @@ + +Contract LibByte ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| t | | +| t | | ++----------+-------------------+ +Contract TestByte ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| test | | ++----------+-------------------+ +Contract LibUint ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| t | | +| t | | ++----------+-------------------+ +Contract TestUint ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| test | | ++----------+-------------------+ +Contract LibInt ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| t | | +| t | | ++----------+-------------------+ +Contract TestUintWithVariableiAndConversion ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| test | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..af11ef3fe9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,47 @@ +Contract LibByte + Function LibByte.t(uint256,bytes1) (*) + Expression: 0x1 + IRs: + RETURN 1 + Function LibByte.t(uint256,bytes32) (*) + Expression: 0x32 + IRs: + RETURN 50 +Contract TestByte + Function TestByte.test() (*) + Expression: a.t(0x10) + IRs: + TMP_0(uint256) = LIBRARY_CALL, dest:LibByte, function:LibByte.t(uint256,bytes1), arguments:['a', '16'] + RETURN TMP_0 +Contract LibUint + Function LibUint.t(uint256,uint8) (*) + Expression: 0x1 + IRs: + RETURN 1 + Function LibUint.t(uint256,uint256) (*) + Expression: 0x32 + IRs: + RETURN 50 +Contract TestUint + Function TestUint.test() (*) + Expression: a.t(2 ** 8) + IRs: + TMP_1(uint256) = 2 ** 8 + TMP_2(uint256) = LIBRARY_CALL, dest:LibUint, function:LibUint.t(uint256,uint256), arguments:['a', 'TMP_1'] + RETURN TMP_2 +Contract LibInt + Function LibInt.t(uint256,int8) (*) + Expression: 0x1 + IRs: + RETURN 1 + Function LibInt.t(uint256,int256) (*) + Expression: 0x32 + IRs: + RETURN 50 +Contract TestUintWithVariableiAndConversion + Function TestUintWithVariableiAndConversion.test() (*) + Expression: a.t(v) + IRs: + TMP_3(uint256) = LIBRARY_CALL, dest:LibInt, function:LibInt.t(uint256,int256), arguments:['a', 'v'] + RETURN TMP_3 + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..75b7284614 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,37 @@ + +LibByte: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +TestByte: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +LibUint: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +TestUint: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +LibInt: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +TestUintWithVariableiAndConversion: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..cd0f520db4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,46 @@ + +Contract LibByte ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| t | [] | [] | +| t | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract TestByte ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| test | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract LibUint ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| t | [] | [] | +| t | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract TestUint ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| test | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract LibInt ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| t | [] | [] | +| t | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract TestUintWithVariableiAndConversion ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| test | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..84567a7bd7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,81 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipLibByte.call-graph.dot +Call Graph: tmp.zipTestByte.call-graph.dot +Call Graph: tmp.zipLibUint.call-graph.dot +Call Graph: tmp.zipTestUint.call-graph.dot +Call Graph: tmp.zipLibInt.call-graph.dot +Call Graph: tmp.zipTestUintWithVariableiAndConversion.call-graph.dot + +strict digraph { +subgraph cluster_25_LibByte { +label = "LibByte" +"25_t" [label="t"] +}subgraph cluster_113_LibInt { +label = "LibInt" +"113_t" [label="t"] +}subgraph cluster_68_LibUint { +label = "LibUint" +"68_t" [label="t"] +}subgraph cluster_43_TestByte { +label = "TestByte" +"43_test" [label="test"] +}subgraph cluster_88_TestUint { +label = "TestUint" +"88_test" [label="test"] +}subgraph cluster_134_TestUintWithVariableiAndConversion { +label = "TestUintWithVariableiAndConversion" +"134_test" [label="test"] +}subgraph cluster_solidity { +label = "[Solidity]" +}"134_test" -> "113_t" +"43_test" -> "25_t" +"88_test" -> "68_t" +} +strict digraph { +subgraph cluster_25_LibByte { +label = "LibByte" +"25_t" [label="t"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_43_TestByte { +label = "TestByte" +"43_test" [label="test"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_68_LibUint { +label = "LibUint" +"68_t" [label="t"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_88_TestUint { +label = "TestUint" +"88_test" [label="test"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_113_LibInt { +label = "LibInt" +"113_t" [label="t"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_134_TestUintWithVariableiAndConversion { +label = "TestUintWithVariableiAndConversion" +"134_test" [label="test"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..b335a068ca --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,143 @@ +Export tmp.zip-LibByte-t(uint256,bytes1).dot +Export tmp.zip-LibByte-t(uint256,bytes32).dot +Export tmp.zip-TestByte-test().dot +Export tmp.zip-LibUint-t(uint256,uint8).dot +Export tmp.zip-LibUint-t(uint256,uint256).dot +Export tmp.zip-TestUint-test().dot +Export tmp.zip-LibInt-t(uint256,int8).dot +Export tmp.zip-LibInt-t(uint256,int256).dot +Export tmp.zip-TestUintWithVariableiAndConversion-test().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0x1 + +IRs: +RETURN 1"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0x32 + +IRs: +RETURN 50"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: RETURN 2 + +EXPRESSION: +a.t(0x10) + +IRs: +TMP_0(uint256) = LIBRARY_CALL, dest:LibByte, function:LibByte.t(uint256,bytes1), arguments:['a', '16'] +RETURN TMP_0"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0x1 + +IRs: +RETURN 1"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0x32 + +IRs: +RETURN 50"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: RETURN 2 + +EXPRESSION: +a.t(2 ** 8) + +IRs: +TMP_1(uint256) = 2 (c)** 8 +TMP_2(uint256) = LIBRARY_CALL, dest:LibUint, function:LibUint.t(uint256,uint256), arguments:['a', 'TMP_1'] +RETURN TMP_2"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0x1 + +IRs: +RETURN 1"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0x32 + +IRs: +RETURN 50"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: RETURN 3 + +EXPRESSION: +a.t(v) + +IRs: +TMP_3(uint256) = LIBRARY_CALL, dest:LibInt, function:LibInt.t(uint256,int256), arguments:['a', 'v'] +RETURN TMP_3"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..29a7cac415 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,74 @@ + + +CK complexity metrics (Variables): ++------------------------------------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++------------------------------------+-----------------+-----------+------------+ +| LibByte | 0 | 0 | 0 | +| TestByte | 0 | 0 | 0 | +| LibUint | 0 | 0 | 0 | +| TestUint | 0 | 0 | 0 | +| LibInt | 0 | 0 | 0 | +| TestUintWithVariableiAndConversion | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++------------------------------------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++------------------------------------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++------------------------------------+--------+----------+----------+---------+ +| LibByte | 0 | 0 | 2 | 0 | +| TestByte | 1 | 0 | 0 | 0 | +| LibUint | 0 | 0 | 2 | 0 | +| TestUint | 1 | 0 | 0 | 0 | +| LibInt | 0 | 0 | 2 | 0 | +| TestUintWithVariableiAndConversion | 1 | 0 | 0 | 0 | +| TOTAL | 3 | 0 | 6 | 0 | ++------------------------------------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++------------------------------------+----------+------+------+ +| Contract | Mutating | View | Pure | ++------------------------------------+----------+------+------+ +| LibByte | 2 | 0 | 0 | +| TestByte | 1 | 0 | 0 | +| LibUint | 2 | 0 | 0 | +| TestUint | 1 | 0 | 0 | +| LibInt | 2 | 0 | 0 | +| TestUintWithVariableiAndConversion | 1 | 0 | 0 | +| TOTAL | 9 | 0 | 0 | ++------------------------------------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++------------------------------------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++------------------------------------+-------------------+----------------------+--------------+ +| LibByte | 0 | 0 | 0 | +| TestByte | 1 | 1 | 1 | +| LibUint | 0 | 0 | 0 | +| TestUint | 1 | 1 | 1 | +| LibInt | 0 | 0 | 0 | +| TestUintWithVariableiAndConversion | 1 | 1 | 1 | +| TOTAL | 3 | 3 | 3 | ++------------------------------------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++------------------------------------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++------------------------------------+-----------+-----+-----+-----+-----+ +| LibByte | 0 | 0 | 0 | 0 | 1 | +| TestByte | 1 | 2 | 0 | 0 | 1 | +| LibUint | 0 | 0 | 0 | 0 | 1 | +| TestUint | 1 | 2 | 0 | 0 | 1 | +| LibInt | 0 | 0 | 0 | 0 | 1 | +| TestUintWithVariableiAndConversion | 1 | 2 | 0 | 0 | 1 | ++------------------------------------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..2e8abeb41a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,28 @@ + ++ Contract LibByte (Most derived contract) + - From LibByte + - t(uint256,bytes1) (internal) + - t(uint256,bytes32) (internal) + ++ Contract TestByte (Most derived contract) + - From TestByte + - test() (public) + ++ Contract LibUint (Most derived contract) + - From LibUint + - t(uint256,uint256) (internal) + - t(uint256,uint8) (internal) + ++ Contract TestUint (Most derived contract) + - From TestUint + - test() (public) + ++ Contract LibInt (Most derived contract) + - From LibInt + - t(uint256,int256) (internal) + - t(uint256,int8) (internal) + ++ Contract TestUintWithVariableiAndConversion (Most derived contract) + - From TestUintWithVariableiAndConversion + - test() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..96c13f5dfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,335 @@ + +Contract LibByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,bytes1) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract LibByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,bytes1) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,bytes1) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,uint8) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract LibByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,bytes1) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,uint8) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,bytes1) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,uint8) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibInt ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,int8) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,int256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract LibByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,bytes1) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestByte ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,uint8) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestUint ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | ++----------+--------------+ +Contract LibInt ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function t(uint256,int8) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function t(uint256,int256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract TestUintWithVariableiAndConversion ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function test() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| a | [] | +| v | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..e9d1879ad3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,99 @@ + +# Contracts +# LibByte + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#1 (9 - 17) + - Implementation(s): [] + - References: ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#13 (11 - 18)'] + + ## Function + - LibByte.t(uint256,bytes1) + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#2-4 (5 - 6)'] + - References: ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#16 (16 - 25)'] + - LibByte.t(uint256,bytes32) + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#5 (14 - 16) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#5-7 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# TestByte + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#12 (10 - 19) + - Implementation(s): [] + - References: [] + + ## Function + - TestByte.test() + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#14 (14 - 19) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#14-17 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# LibUint + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#20 (9 - 17) + - Implementation(s): [] + - References: ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#32 (11 - 18)'] + + ## Function + - LibUint.t(uint256,uint8) + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#21 (14 - 16) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#21-23 (5 - 6)'] + - References: [] + - LibUint.t(uint256,uint256) + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#24 (14 - 16) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#24-26 (5 - 6)'] + - References: ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#35 (16 - 25)'] + + ## State variables + + ## Structures +# TestUint + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#30 (10 - 19) + - Implementation(s): [] + - References: [] + + ## Function + - TestUint.test() + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#33 (14 - 19) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#33-36 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# LibInt + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#39 (9 - 16) + - Implementation(s): [] + - References: ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#51 (11 - 17)'] + + ## Function + - LibInt.t(uint256,int8) + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#40 (14 - 16) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#40-42 (5 - 6)'] + - References: [] + - LibInt.t(uint256,int256) + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#43 (14 - 16) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#43-45 (5 - 6)'] + - References: ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#55 (16 - 22)'] + + ## State variables + + ## Structures +# TestUintWithVariableiAndConversion + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#49 (10 - 45) + - Implementation(s): [] + - References: [] + + ## Function + - TestUintWithVariableiAndConversion.test() + - Declaration: tests/ast-parsing/library_implicit_conversion-0.5.0.sol#52 (14 - 19) + - Implementation(s): ['tests/ast-parsing/library_implicit_conversion-0.5.0.sol#52-56 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..05200f77c6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,19 @@ +Export tmp.zip-LibByte-t(uint256,bytes1).dot +Export tmp.zip-LibByte-t(uint256,bytes32).dot +Export tmp.zip-TestByte-test().dot +Export tmp.zip-LibUint-t(uint256,uint8).dot +Export tmp.zip-LibUint-t(uint256,uint256).dot +Export tmp.zip-TestUint-test().dot +Export tmp.zip-LibInt-t(uint256,int8).dot +Export tmp.zip-LibInt-t(uint256,int256).dot +Export tmp.zip-TestUintWithVariableiAndConversion-test().dot + +None +None +None +None +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..8c86bc4582 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,126 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "TestByte": { + "test()": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "16", + "type": "uint256" + } + ] + ] + }, + "TestUint": { + "test()": [ + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "256", + "type": "uint256" + } + ], + [ + { + "value": "50", + "type": "uint256" + } + ], + [ + { + "value": "8", + "type": "uint256" + } + ] + ] + }, + "TestUintWithVariableiAndConversion": { + "test()": [ + [ + { + "value": "50", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "TestUint": { + "test()": { + "BinaryType.POWER": [ + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "8", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "LibByte": {}, + "TestByte": { + "test()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "LibUint": {}, + "TestUint": { + "test()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "LibInt": {}, + "TestUintWithVariableiAndConversion": { + "test()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": { + "TestByte": [ + "test()" + ], + "TestUint": [ + "test()" + ], + "TestUintWithVariableiAndConversion": [ + "test()" + ] + }, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..610f805652 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,40 @@ + +LibByte: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +TestByte: ++--------+------------+ +| Name | ID | ++--------+------------+ +| test() | 0xf8a8fd6d | ++--------+------------+ + +LibUint: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +TestUint: ++--------+------------+ +| Name | ID | ++--------+------------+ +| test() | 0xf8a8fd6d | ++--------+------------+ + +LibInt: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +TestUintWithVariableiAndConversion: ++--------+------------+ +| Name | ID | ++--------+------------+ +| test() | 0xf8a8fd6d | ++--------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..7d0566b6f6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,94 @@ + +Contract LibByte +Contract vars: [] +Inheritance:: [] + ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| t(uint256,bytes1) | internal | [] | [] | [] | [] | [] | 1 | +| t(uint256,bytes32) | internal | [] | [] | [] | [] | [] | 1 | ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract TestByte +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| test() | public | [] | [] | [] | [] | ['a.t(0x10)'] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract LibUint +Contract vars: [] +Inheritance:: [] + ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| t(uint256,uint8) | internal | [] | [] | [] | [] | [] | 1 | +| t(uint256,uint256) | internal | [] | [] | [] | [] | [] | 1 | ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract TestUint +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+-----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+-----------------+-----------------------+ +| test() | public | [] | [] | [] | [] | ['a.t(2 ** 8)'] | 1 | ++----------+------------+-----------+------+-------+----------------+-----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract LibInt +Contract vars: [] +Inheritance:: [] + ++-------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| t(uint256,int8) | internal | [] | [] | [] | [] | [] | 1 | +| t(uint256,int256) | internal | [] | [] | [] | [] | [] | 1 | ++-------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract TestUintWithVariableiAndConversion +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| test() | public | [] | [] | [] | [] | ['a.t(v)'] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..2c89c3bd84 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,40 @@ + + +Halstead complexity metrics (Core): ++------------------------------------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++------------------------------------+-----------------+------------------+----------------+-----------------+ +| LibByte | 2 | 1 | 2 | 2 | +| TestByte | 2 | 2 | 3 | 3 | +| LibUint | 2 | 1 | 2 | 2 | +| TestUint | 3 | 3 | 4 | 4 | +| LibInt | 2 | 1 | 2 | 2 | +| TestUintWithVariableiAndConversion | 2 | 2 | 3 | 3 | ++------------------------------------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++------------------------------------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++------------------------------------+------------+----------------+------------------+--------+ +| LibByte | 3 | 4 | 2 | 6 | +| TestByte | 5 | 5 | 7 | 12 | +| LibUint | 3 | 4 | 2 | 6 | +| TestUint | 7 | 7 | 13 | 20 | +| LibInt | 3 | 4 | 2 | 6 | +| TestUintWithVariableiAndConversion | 5 | 5 | 7 | 12 | ++------------------------------------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++------------------------------------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++------------------------------------+------------+--------+------+----------------+ +| LibByte | 0 | 3 | 0 | 0.001 | +| TestByte | 1 | 12 | 1 | 0.002 | +| LibUint | 0 | 3 | 0 | 0.001 | +| TestUint | 2 | 29 | 2 | 0.003 | +| LibInt | 0 | 3 | 0 | 0.001 | +| TestUintWithVariableiAndConversion | 1 | 12 | 1 | 0.002 | ++------------------------------------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..51f52c1126 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 6 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 46 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..b8745dcaf8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,30 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ LibByte + ++ TestByte + ++ LibUint + ++ TestUint + ++ LibInt + ++ TestUintWithVariableiAndConversion + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ LibByte + ++ TestByte + ++ LibUint + ++ TestUint + ++ LibInt + ++ TestUintWithVariableiAndConversion + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..cfac7ec675 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,10 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c43_TestByte[shape="box"label=<
TestByte
Public Functions:
test()
>]; + +c88_TestUint[shape="box"label=<
TestUint
Public Functions:
test()
>]; + +c134_TestUintWithVariableiAndConversion[shape="box"label=<
TestUintWithVariableiAndConversion
Public Functions:
test()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..542c175b86 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 57 | +| sloc | 0 | 0 | 46 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 103 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..d12d53aab7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,19 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++------------------------------------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++------------------------------------+------------+--------------+-------------+-----------------------------+ +| LibByte | 1 | 0 | 0.00 | 0.00 | +| TestByte | 0 | 1 | 1.00 | 1.00 | +| LibUint | 1 | 0 | 0.00 | 0.00 | +| TestUint | 0 | 1 | 1.00 | 1.00 | +| LibInt | 1 | 0 | 0.00 | 0.00 | +| TestUintWithVariableiAndConversion | 0 | 1 | 1.00 | 1.00 | ++------------------------------------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..30294dfb5d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,40 @@ + +Contract LibByte ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| t | [] | +| t | [] | ++----------+-----------+ +Contract TestByte ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| test | [] | ++----------+-----------+ +Contract LibUint ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| t | [] | +| t | [] | ++----------+-----------+ +Contract TestUint ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| test | [] | ++----------+-----------+ +Contract LibInt ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| t | [] | +| t | [] | ++----------+-----------+ +Contract TestUintWithVariableiAndConversion ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| test | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..4ae17403e7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,41 @@ +Constructor and pure/view functions are not displayed + +LibByte: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +TestByte: ++--------+-------------------+ +| Name | Use whenNotPaused | ++--------+-------------------+ +| test() | | ++--------+-------------------+ + +LibUint: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +TestUint: ++--------+-------------------+ +| Name | Use whenNotPaused | ++--------+-------------------+ +| test() | | ++--------+-------------------+ + +LibInt: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +TestUintWithVariableiAndConversion: ++--------+-------------------+ +| Name | Use whenNotPaused | ++--------+-------------------+ +| test() | | ++--------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..3321d8dec4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,40 @@ + +Contract LibByte ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| t | | +| t | | ++----------+-------------------+ +Contract TestByte ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| test | | ++----------+-------------------+ +Contract LibUint ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| t | | +| t | | ++----------+-------------------+ +Contract TestUint ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| test | | ++----------+-------------------+ +Contract LibInt ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| t | | +| t | | ++----------+-------------------+ +Contract TestUintWithVariableiAndConversion ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| test | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..def6dd66b3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,47 @@ +Contract LibByte + Function LibByte.t(uint256,bytes1) (*) + Expression: 0x1 + IRs: + RETURN 1 + Function LibByte.t(uint256,bytes32) (*) + Expression: 0x32 + IRs: + RETURN 50 +Contract TestByte + Function TestByte.test() (*) + Expression: a.t(0x10) + IRs: + TMP_0(uint256) = LIBRARY_CALL, dest:LibByte, function:LibByte.t(uint256,bytes1), arguments:['a', '16'] + RETURN TMP_0 +Contract LibUint + Function LibUint.t(uint256,uint8) (*) + Expression: 0x1 + IRs: + RETURN 1 + Function LibUint.t(uint256,uint256) (*) + Expression: 0x32 + IRs: + RETURN 50 +Contract TestUint + Function TestUint.test() (*) + Expression: a.t(2 ** 8) + IRs: + TMP_1(uint256) = 2 (c)** 8 + TMP_2(uint256) = LIBRARY_CALL, dest:LibUint, function:LibUint.t(uint256,uint256), arguments:['a', 'TMP_1'] + RETURN TMP_2 +Contract LibInt + Function LibInt.t(uint256,int8) (*) + Expression: 0x1 + IRs: + RETURN 1 + Function LibInt.t(uint256,int256) (*) + Expression: 0x32 + IRs: + RETURN 50 +Contract TestUintWithVariableiAndConversion + Function TestUintWithVariableiAndConversion.test() (*) + Expression: a.t(v) + IRs: + TMP_3(uint256) = LIBRARY_CALL, dest:LibInt, function:LibInt.t(uint256,int256), arguments:['a', 'v'] + RETURN TMP_3 + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..75b7284614 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,37 @@ + +LibByte: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +TestByte: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +LibUint: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +TestUint: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +LibInt: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +TestUintWithVariableiAndConversion: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..cd0f520db4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_library_implicit_conversion_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,46 @@ + +Contract LibByte ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| t | [] | [] | +| t | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract TestByte ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| test | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract LibUint ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| t | [] | [] | +| t | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract TestUint ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| test | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract LibInt ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| t | [] | [] | +| t | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract TestUintWithVariableiAndConversion ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| test | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..eb65d22029 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_99_C { +label = "C" +"99_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_99_C { +label = "C" +"99_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..cdb1cc929a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,139 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +true +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +false +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +123 +"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +123.456 +"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +123.456e7 +"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +123.456e0 +"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +123.456e-7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +1_2_3 +"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +0xabc +"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +0xa_b_c +"]; +10->11; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +1 +"]; +11->12; +12[label="Node Type: EXPRESSION 12 + +EXPRESSION: +1000000000000 +"]; +12->13; +13[label="Node Type: EXPRESSION 13 + +EXPRESSION: +1000000000000000 +"]; +13->14; +14[label="Node Type: EXPRESSION 14 + +EXPRESSION: +1000000000000000000 +"]; +14->15; +15[label="Node Type: EXPRESSION 15 + +EXPRESSION: +1 +"]; +15->16; +16[label="Node Type: EXPRESSION 16 + +EXPRESSION: +60 +"]; +16->17; +17[label="Node Type: EXPRESSION 17 + +EXPRESSION: +3600 +"]; +17->18; +18[label="Node Type: EXPRESSION 18 + +EXPRESSION: +86400 +"]; +18->19; +19[label="Node Type: EXPRESSION 19 + +EXPRESSION: +604800 +"]; +19->20; +20[label="Node Type: EXPRESSION 20 + +EXPRESSION: +0xabcd +"]; +20->21; +21[label="Node Type: EXPRESSION 21 + +EXPRESSION: +abc +"]; +21->22; +22[label="Node Type: EXPRESSION 22 + +EXPRESSION: +def +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..5e49435671 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..6f8899d424 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/literal-0.5.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/literal-0.5.0.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/literal-0.5.0.sol#2-29 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..b0b8ede01c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,31 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..69f52dafb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..dbf420a942 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 26 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..daaf07c08d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c99_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..ce2ba40d61 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 30 | +| sloc | 0 | 0 | 26 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 56 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..28e38da18f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,47 @@ +Contract C + Function C.f() (*) + Expression: true + IRs: + Expression: false + IRs: + Expression: 123 + IRs: + Expression: 123.456 + IRs: + Expression: 123.456e7 + IRs: + Expression: 123.456e0 + IRs: + Expression: 123.456e-7 + IRs: + Expression: 1_2_3 + IRs: + Expression: 0xabc + IRs: + Expression: 0xa_b_c + IRs: + Expression: 1 + IRs: + Expression: 1000000000000 + IRs: + Expression: 1000000000000000 + IRs: + Expression: 1000000000000000000 + IRs: + Expression: 1 + IRs: + Expression: 60 + IRs: + Expression: 3600 + IRs: + Expression: 86400 + IRs: + Expression: 604800 + IRs: + Expression: 0xabcd + IRs: + Expression: abc + IRs: + Expression: def + IRs: + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_literal_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..887bbacb4e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,23 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_79_C { +label = "C" +"79_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +"balance(address)" +"79_f" -> "balance(address)" +} +} +strict digraph { +subgraph cluster_79_C { +label = "C" +"79_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +"balance(address)" +"79_f" -> "balance(address)" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..c3763e33a2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,54 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +x.length + +IRs: +REF_0 -> LENGTH x"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +address(this).balance + +IRs: +TMP_0 = CONVERT this to address +TMP_1(uint256) = SOLIDITY_CALL balance(address)(TMP_0)"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +block.coinbase +"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +msg.sender +"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +tx.origin +"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +S({a:5}).a + +IRs: +TMP_2(C.S) = new S(5) +REF_1(uint256) -> TMP_2.a"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..e92f2c4138 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,13 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| x | ['x'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..2829a22489 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,23 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/memberaccess-0.4.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/memberaccess-0.4.0.sol#6 (14 - 16) + - Implementation(s): ['tests/ast-parsing/memberaccess-0.4.0.sol#6-19 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + - S + - Declaration: struct S { + uint a; + } + - Implementation: tests/ast-parsing/memberaccess-0.4.0.sol#2-4 (5 - 6) + - References: ['tests/ast-parsing/memberaccess-0.4.0.sol#18 (9 - 10)'] + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..9f40455396 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,46 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "5", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": { + "C": [ + "f()" + ] + }, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..c9d005a6fc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+----------+-------+----------------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+----------+-------+----------------------+----------------+-----------------------+ +| f() | public | [] | ['this'] | [] | ['balance(address)'] | [] | 1 | ++----------+------------+-----------+----------+-------+----------------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..a781a7e4c5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 5 | 5 | 6 | 6 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 11 | 11 | 27 | 38 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 2 | 95 | 5 | 0.007 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..79a82916bf --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 14 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..891849518d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c79_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..0218d8eaf1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 20 | +| sloc | 0 | 0 | 14 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 34 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..436522f038 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,20 @@ +Contract C + Function C.f() (*) + Expression: x.length + IRs: + REF_0 -> LENGTH x + Expression: address(this).balance + IRs: + TMP_0 = CONVERT this to address + TMP_1(uint256) = SOLIDITY_CALL balance(address)(TMP_0) + Expression: block.coinbase + IRs: + Expression: msg.sender + IRs: + Expression: tx.origin + IRs: + Expression: S({a:5}).a + IRs: + TMP_2(C.S) = new S(5) + REF_1(uint256) -> TMP_2.a + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..e836940d8a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,33 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipI.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_47_C { +label = "C" +"47_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +"balance(address)" +"type()" +"47_f" -> "balance(address)" +"47_f" -> "type()" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_47_C { +label = "C" +"47_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +"balance(address)" +"type()" +"47_f" -> "balance(address)" +"47_f" -> "type()" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..d4ff4c2acc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,63 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +x.length + +IRs: +REF_0 -> LENGTH x"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +address(this).balance + +IRs: +TMP_0 = CONVERT this to address +TMP_1(uint256) = SOLIDITY_CALL balance(address)(TMP_0)"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +block.coinbase +"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +msg.sender +"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +tx.origin +"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +S({a:5}).a + +IRs: +TMP_2(C.S) = new S(5) +REF_1(uint256) -> TMP_2.a"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +type()(I).creationCode + +IRs: +TMP_3(type(I)) = SOLIDITY_CALL type()(I) +REF_2(bytes) (->None) := 6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220fa4230d5c072892b749b058c7c73d07d46563ac244a163372762d047dc16853564736f6c634300080c0033(string)"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..18803b6a9a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| I | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| I | 0 | 0 | 0 | 0 | +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| I | 0 | 0 | 0 | +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| I | 0 | 0 | 0 | +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| I | 0 | 0 | 0 | 0 | 0 | +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..e4ecfd0bd3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,7 @@ + ++ Contract I (Most derived contract) + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..5ad392434e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,25 @@ + +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| x | ['x'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..900de4fe28 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,33 @@ + +# Contracts +# I + - Declaration: tests/ast-parsing/memberaccess-0.5.3.sol#1 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/memberaccess-0.5.3.sol#24 (14 - 15)'] + + ## Function + + ## State variables + + ## Structures +# C + - Declaration: tests/ast-parsing/memberaccess-0.5.3.sol#5 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/memberaccess-0.5.3.sol#10 (14 - 16) + - Implementation(s): ['tests/ast-parsing/memberaccess-0.5.3.sol#10-25 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + - S + - Declaration: struct S { + uint a; + } + - Implementation: tests/ast-parsing/memberaccess-0.5.3.sol#6-8 (5 - 6) + - References: ['tests/ast-parsing/memberaccess-0.5.3.sol#22 (9 - 10)'] + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..2f395b6cc6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,53 @@ +{ + "payable": { + "C": [ + "f()" + ] + }, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "5", + "type": "uint256" + } + ], + [ + { + "value": "6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220fa4230d5c072892b749b058c7c73d07d46563ac244a163372762d047dc16853564736f6c634300080c0033", + "type": "string" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "I": {}, + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": { + "C": [ + "f()" + ] + }, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..981375c55c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,14 @@ + +I: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..cc3ee96546 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,30 @@ + +Contract I +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+----------+-------+--------------------------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+----------+-------+--------------------------------+----------------+-----------------------+ +| f() | public | [] | ['this'] | [] | ['balance(address)', 'type()'] | [] | 1 | ++----------+------------+-----------+----------+-------+--------------------------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..0d9bef6174 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| I | 0 | 0 | 0 | 0 | +| C | 7 | 7 | 9 | 9 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| I | 0 | 0 | 0 | 0 | +| C | 16 | 16 | 48 | 64 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| I | 0 | 0 | 0 | 0.000 | +| C | 4 | 224 | 12 | 0.012 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..121ceaa7b7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 17 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..98e0a0a538 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ I + ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ I + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..d8d29284d3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c1_I[shape="box"label=<
I
>]; + +c47_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..4399f1ffb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 26 | +| sloc | 0 | 0 | 17 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 43 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..c00a9e4911 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| I | 0 | 0 | 0.00 | 0.00 | +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..3087baa4ba --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,12 @@ + +Contract I ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..634ec341eb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,15 @@ +Constructor and pure/view functions are not displayed + +I: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..673d2a8a8b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,12 @@ + +Contract I ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..5fd43a6940 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,25 @@ +Contract I +Contract C + Function C.f() (*) + Expression: x.length + IRs: + REF_0 -> LENGTH x + Expression: address(this).balance + IRs: + TMP_0 = CONVERT this to address + TMP_1(uint256) = SOLIDITY_CALL balance(address)(TMP_0) + Expression: block.coinbase + IRs: + Expression: msg.sender + IRs: + Expression: tx.origin + IRs: + Expression: S({a:5}).a + IRs: + TMP_2(C.S) = new S(5) + REF_1(uint256) -> TMP_2.a + Expression: type()(I).creationCode + IRs: + TMP_3(type(I)) = SOLIDITY_CALL type()(I) + REF_2(bytes) (->None) := 6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220fa4230d5c072892b749b058c7c73d07d46563ac244a163372762d047dc16853564736f6c634300080c0033(string) + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..99d6a62a51 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,13 @@ + +I: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..5f7c787dab --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_memberaccess_0_5_3_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,14 @@ + +Contract I ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..0cc6ac34f8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_19_C { +label = "C" +"19_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_19_C { +label = "C" +"19_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..b2d46eb330 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,15 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +a = 0 + +IRs: +a(uint256) := 0(uint256)"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..31e00d6c43 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,13 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..035f61f287 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/minmax-0.4.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/minmax-0.4.0.sol#3 (14 - 16) + - Implementation(s): ['tests/ast-parsing/minmax-0.4.0.sol#3-7 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..2265857b0a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,42 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..69f52dafb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..2912b773e6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 1 | 1 | 2 | 2 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 3 | 3 | 2 | 5 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 2 | 0 | 0.001 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..616620ee33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 5 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..0248efaf7a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c19_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..af869504a8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 9 | +| sloc | 0 | 0 | 5 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 14 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..ef6ca384df --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,6 @@ +Contract C + Function C.f() (*) + Expression: a = 0 + IRs: + a(uint256) := 0(uint256) + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..d354b6d491 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,17 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipMinMax.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_43_MinMax { +label = "MinMax" +"43_slitherConstructorConstantVariables" [label="slitherConstructorConstantVariables"] +"43_slitherConstructorVariables" [label="slitherConstructorVariables"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..9e5285416b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,61 @@ +Export tmp.zip-MinMax-slitherConstructorVariables().dot +Export tmp.zip-MinMax-slitherConstructorConstantVariables().dot + +digraph{ +0[label="Node Type: OTHER_ENTRYPOINT 0 + +EXPRESSION: +a = type()(uint256).max + +IRs: +TMP_1(uint256) := 115792089237316195423570985008687907853269984665640564039457584007913129639935(uint256) +a(uint256) := TMP_1(uint256)"]; +0->1; +1[label="Node Type: OTHER_ENTRYPOINT 1 + +EXPRESSION: +b = type()(uint256).min + +IRs: +TMP_3(uint256) := 0(uint256) +b(uint256) := TMP_3(uint256)"]; +1->2; +2[label="Node Type: OTHER_ENTRYPOINT 2 + +EXPRESSION: +i = type()(uint8).max + +IRs: +TMP_5(uint8) := 255(uint8) +i(uint8) := TMP_5(uint8)"]; +2->3; +3[label="Node Type: OTHER_ENTRYPOINT 3 + +EXPRESSION: +j = type()(uint8).min + +IRs: +TMP_7(uint8) := 0(uint8) +j(uint8) := TMP_7(uint8)"]; +} + +digraph{ +0[label="Node Type: OTHER_ENTRYPOINT 0 + +EXPRESSION: +c = type()(int256).max + +IRs: +TMP_9(int256) := 57896044618658097711785492504343953926634992332820282019728792003956564819967(int256) +c(int256) := TMP_9(int256)"]; +0->1; +1[label="Node Type: OTHER_ENTRYPOINT 1 + +EXPRESSION: +d = type()(int256).min + +IRs: +TMP_11(int256) := -57896044618658097711785492504343953926634992332820282019728792003956564819968(int256) +d(int256) := TMP_11(int256)"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..59db8db7af --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| MinMax | 2 | 2 | 2 | +| TOTAL | 2 | 2 | 2 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| MinMax | 0 | 0 | 2 | 0 | +| TOTAL | 0 | 0 | 2 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| MinMax | 2 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| MinMax | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| MinMax | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..929bae1b9c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract MinMax (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..f5dc2d7d4d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,35 @@ + +Contract MinMax ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | +| c | [] | +| d | [] | +| i | [] | +| j | [] | ++----------+--------------+ + +Function slitherConstructorVariables() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| MinMax.a | [] | +| MinMax.b | [] | +| MinMax.c | [] | +| MinMax.d | [] | +| MinMax.i | [] | +| MinMax.j | [] | ++----------+--------------+ +Function slitherConstructorConstantVariables() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| MinMax.a | [] | +| MinMax.b | [] | +| MinMax.c | [] | +| MinMax.d | [] | +| MinMax.i | [] | +| MinMax.j | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..bd0aee38d2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,45 @@ + +# Contracts +# MinMax + - Declaration: tests/ast-parsing/minmax-0.6.8.sol#3 (10 - 17) + - Implementation(s): ['tests/ast-parsing/minmax-0.6.8.sol#3-13 (1 - 2)'] + - References: [] + + ## Function + - MinMax.slitherConstructorVariables() + - Declaration: tests/ast-parsing/minmax-0.6.8.sol#3-4 (1 - 11) + - Implementation(s): ['tests/ast-parsing/minmax-0.6.8.sol#3-13 (1 - 2)'] + - References: [] + - MinMax.slitherConstructorConstantVariables() + - Declaration: tests/ast-parsing/minmax-0.6.8.sol#3-4 (1 - 19) + - Implementation(s): ['tests/ast-parsing/minmax-0.6.8.sol#3-13 (1 - 2)'] + - References: [] + + ## State variables + - a + - Declaration: tests/ast-parsing/minmax-0.6.8.sol#4 (10 - 12) + - Implementation: tests/ast-parsing/minmax-0.6.8.sol#4 (5 - 28) + - References: [] + - b + - Declaration: tests/ast-parsing/minmax-0.6.8.sol#5 (10 - 12) + - Implementation: tests/ast-parsing/minmax-0.6.8.sol#5 (5 - 28) + - References: [] + - c + - Declaration: tests/ast-parsing/minmax-0.6.8.sol#7 (9 - 11) + - Implementation: tests/ast-parsing/minmax-0.6.8.sol#7 (5 - 35) + - References: [] + - d + - Declaration: tests/ast-parsing/minmax-0.6.8.sol#8 (18 - 20) + - Implementation: tests/ast-parsing/minmax-0.6.8.sol#8 (5 - 35) + - References: [] + - i + - Declaration: tests/ast-parsing/minmax-0.6.8.sol#10 (11 - 13) + - Implementation: tests/ast-parsing/minmax-0.6.8.sol#10 (5 - 39) + - References: [] + - j + - Declaration: tests/ast-parsing/minmax-0.6.8.sol#11 (21 - 23) + - Implementation: tests/ast-parsing/minmax-0.6.8.sol#11 (5 - 40) + - References: [] + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..b3f4642ea4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,5 @@ +Export tmp.zip-MinMax-slitherConstructorVariables().dot +Export tmp.zip-MinMax-slitherConstructorConstantVariables().dot + +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..7189af9461 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "MinMax": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..9c12c01a67 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +MinMax: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..9b84afb29b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,18 @@ + +Contract MinMax +Contract vars: ['a', 'b', 'c', 'd', 'i', 'j'] +Inheritance:: [] + ++---------------------------------------+------------+-----------+------+------------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------------------------------+------------+-----------+------+------------+----------------+----------------+-----------------------+ +| slitherConstructorVariables() | internal | [] | [] | ['a', 'b'] | [] | [] | 1 | +| | | | | ['i', 'j'] | | | | +| slitherConstructorConstantVariables() | internal | [] | [] | ['c', 'd'] | [] | [] | 1 | ++---------------------------------------+------------+-----------+------+------------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..85dee3f823 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| MinMax | 12 | 1 | 12 | 11 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| MinMax | 12 | 24 | 38 | 86 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| MinMax | 1 | 47 | 3 | 0.004 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..f94666c3f8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 8 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..9fc85d8305 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ MinMax + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ MinMax + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..03ffd274a7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c43_MinMax[shape="box"label=<
MinMax
Private Variables:
a
b
c
d
i
j
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..cbf726c05e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 13 | +| sloc | 0 | 0 | 8 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 21 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..13a6eef50f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| MinMax | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..3b81289839 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,8 @@ + +Contract MinMax ++-------------------------------------+-----------+ +| Function | Modifiers | ++-------------------------------------+-----------+ +| slitherConstructorVariables | [] | +| slitherConstructorConstantVariables | [] | ++-------------------------------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..ca4f279c9b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +MinMax: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..2e0f595838 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,8 @@ + +Contract MinMax ++-------------------------------------+-------------------+ +| Function | require or assert | ++-------------------------------------+-------------------+ +| slitherConstructorVariables | | +| slitherConstructorConstantVariables | | ++-------------------------------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..7fea94e87c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,28 @@ +Contract MinMax + Function MinMax.slitherConstructorVariables() (*) + Expression: a = type()(uint256).max + IRs: + TMP_1(uint256) := 115792089237316195423570985008687907853269984665640564039457584007913129639935(uint256) + a(uint256) := TMP_1(uint256) + Expression: b = type()(uint256).min + IRs: + TMP_3(uint256) := 0(uint256) + b(uint256) := TMP_3(uint256) + Expression: i = type()(uint8).max + IRs: + TMP_5(uint8) := 255(uint8) + i(uint8) := TMP_5(uint8) + Expression: j = type()(uint8).min + IRs: + TMP_7(uint8) := 0(uint8) + j(uint8) := TMP_7(uint8) + Function MinMax.slitherConstructorConstantVariables() (*) + Expression: c = type()(int256).max + IRs: + TMP_9(int256) := 57896044618658097711785492504343953926634992332820282019728792003956564819967(int256) + c(int256) := TMP_9(int256) + Expression: d = type()(int256).min + IRs: + TMP_11(int256) := -57896044618658097711785492504343953926634992332820282019728792003956564819968(int256) + d(int256) := TMP_11(int256) + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..45c4271f92 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,9 @@ + +MinMax: ++----------+---------+------+--------+ +| Name | Type | Slot | Offset | ++----------+---------+------+--------+ +| MinMax.a | uint256 | 0 | 0 | +| MinMax.b | uint256 | 1 | 0 | ++----------+---------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..92fbd03d2c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_6_8_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,9 @@ + +Contract MinMax ++-------------------------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------------------------------+-------------------------+--------------------------+ +| slitherConstructorVariables | ['a', 'b', 'i', 'j'] | [] | +| slitherConstructorConstantVariables | ['c', 'd'] | [] | ++-------------------------------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1fbd3b9768 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,35 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipMinMax.call-graph.dot + +strict digraph { +subgraph cluster_146_MinMax { +label = "MinMax" +"146_constructor" [label="constructor"] +"146_max" [label="max"] +"146_min" [label="min"] +}subgraph cluster_solidity { +label = "[Solidity]" +"type()" +"146_constructor" -> "type()" +"146_max" -> "type()" +"146_min" -> "type()" +} +} +strict digraph { +subgraph cluster_146_MinMax { +label = "MinMax" +"146_constructor" [label="constructor"] +"146_max" [label="max"] +"146_min" [label="min"] +"146_slitherConstructorConstantVariables" [label="slitherConstructorConstantVariables"] +"146_slitherConstructorVariables" [label="slitherConstructorVariables"] +}subgraph cluster_solidity { +label = "[Solidity]" +"type()" +"146_constructor" -> "type()" +"146_max" -> "type()" +"146_min" -> "type()" +"146_slitherConstructorConstantVariables" -> "type()" +"146_slitherConstructorVariables" -> "type()" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..97dba34eef --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,167 @@ +Export tmp.zip-MinMax-constructor().dot +Export tmp.zip-MinMax-min().dot +Export tmp.zip-MinMax-max().dot +Export tmp.zip-MinMax-slitherConstructorVariables().dot +Export tmp.zip-MinMax-slitherConstructorConstantVariables().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +i = type()(uint8).max + +IRs: +TMP_1(uint8) := 255(uint8) +i(uint8) := TMP_1(uint8)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +j = type()(uint8).min + +IRs: +TMP_3(uint8) := 0(uint8) +j(uint8) := TMP_3(uint8)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +k = uint256(type()(Enum).max) + +IRs: +TMP_4(type(Enum)) = SOLIDITY_CALL type()(Enum) +TMP_5(uint256) := 3(uint256) +TMP_6 = CONVERT TMP_5 to uint256 +k(uint256) := TMP_6(uint256)"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +l = uint256(type()(Enum).min) + +IRs: +TMP_7(type(Enum)) = SOLIDITY_CALL type()(Enum) +TMP_8(uint256) := 0(uint256) +TMP_9 = CONVERT TMP_8 to uint256 +l(uint256) := TMP_9(uint256)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +uint256(type()(Enum).min) + +IRs: +TMP_10(type(Enum)) = SOLIDITY_CALL type()(Enum) +TMP_11(uint256) := 0(uint256) +TMP_12 = CONVERT TMP_11 to uint256 +RETURN TMP_12"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +uint256(type()(Enum).max) + +IRs: +TMP_13(type(Enum)) = SOLIDITY_CALL type()(Enum) +TMP_14(uint256) := 3(uint256) +TMP_15 = CONVERT TMP_14 to uint256 +RETURN TMP_15"]; +} + +digraph{ +0[label="Node Type: OTHER_ENTRYPOINT 0 + +EXPRESSION: +a = type()(uint256).max + +IRs: +TMP_17(uint256) := 115792089237316195423570985008687907853269984665640564039457584007913129639935(uint256) +a(uint256) := TMP_17(uint256)"]; +0->1; +1[label="Node Type: OTHER_ENTRYPOINT 1 + +EXPRESSION: +b = type()(uint256).min + +IRs: +TMP_19(uint256) := 0(uint256) +b(uint256) := TMP_19(uint256)"]; +1->2; +2[label="Node Type: OTHER_ENTRYPOINT 2 + +EXPRESSION: +c = uint256(type()(Enum).min) + +IRs: +TMP_20(type(Enum)) = SOLIDITY_CALL type()(Enum) +TMP_21(uint256) := 0(uint256) +TMP_22 = CONVERT TMP_21 to uint256 +c(uint256) := TMP_22(uint256)"]; +2->3; +3[label="Node Type: OTHER_ENTRYPOINT 3 + +EXPRESSION: +d = uint256(type()(Enum).max) + +IRs: +TMP_23(type(Enum)) = SOLIDITY_CALL type()(Enum) +TMP_24(uint256) := 3(uint256) +TMP_25 = CONVERT TMP_24 to uint256 +d(uint256) := TMP_25(uint256)"]; +} + +digraph{ +0[label="Node Type: OTHER_ENTRYPOINT 0 + +EXPRESSION: +e = type()(int256).max + +IRs: +TMP_27(int256) := 57896044618658097711785492504343953926634992332820282019728792003956564819967(int256) +e(int256) := TMP_27(int256)"]; +0->1; +1[label="Node Type: OTHER_ENTRYPOINT 1 + +EXPRESSION: +f = type()(int256).min + +IRs: +TMP_29(int256) := -57896044618658097711785492504343953926634992332820282019728792003956564819968(int256) +f(int256) := TMP_29(int256)"]; +1->2; +2[label="Node Type: OTHER_ENTRYPOINT 2 + +EXPRESSION: +g = uint256(type()(Enum).max) + +IRs: +TMP_30(type(Enum)) = SOLIDITY_CALL type()(Enum) +TMP_31(uint256) := 3(uint256) +TMP_32 = CONVERT TMP_31 to uint256 +g(uint256) := TMP_32(uint256)"]; +2->3; +3[label="Node Type: OTHER_ENTRYPOINT 3 + +EXPRESSION: +h = uint256(type()(Enum).min) + +IRs: +TMP_33(type(Enum)) = SOLIDITY_CALL type()(Enum) +TMP_34(uint256) := 0(uint256) +TMP_35 = CONVERT TMP_34 to uint256 +h(uint256) := TMP_35(uint256)"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ba0f2370aa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| MinMax | 4 | 4 | 4 | +| TOTAL | 4 | 4 | 4 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| MinMax | 2 | 0 | 2 | 0 | +| TOTAL | 2 | 0 | 2 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| MinMax | 4 | 0 | 0 | +| TOTAL | 4 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| MinMax | 2 | 2 | 2 | +| TOTAL | 2 | 2 | 2 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| MinMax | 0 | 2 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..fa237dc145 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1,19 @@ + +###################### +####### MinMax ####### +###################### + +## Constructor Call Sequence + - MinMax + +## Constructor Definitions + +### MinMax + + constructor() { + i = type(uint8).max; + j = type(uint8).min; + k = uint(type(Enum).max); + l = uint(type(Enum).min); + } + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..63dc4d0a0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,7 @@ + ++ Contract MinMax (Most derived contract) + - From MinMax + - constructor() (public) + - max() (public) + - min() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..e88a24f4c0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,106 @@ + +Contract MinMax ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | +| c | [] | +| d | [] | +| e | [] | +| f | [] | +| g | [] | +| h | [] | +| i | [] | +| j | [] | +| k | [] | +| l | [] | ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| MinMax.a | [] | +| MinMax.b | [] | +| MinMax.c | [] | +| MinMax.d | [] | +| MinMax.e | [] | +| MinMax.f | [] | +| MinMax.g | [] | +| MinMax.h | [] | +| MinMax.i | [] | +| MinMax.j | [] | +| MinMax.k | [] | +| MinMax.l | [] | ++----------+--------------+ +Function min() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| MinMax.a | [] | +| MinMax.b | [] | +| MinMax.c | [] | +| MinMax.d | [] | +| MinMax.e | [] | +| MinMax.f | [] | +| MinMax.g | [] | +| MinMax.h | [] | +| MinMax.i | [] | +| MinMax.j | [] | +| MinMax.k | [] | +| MinMax.l | [] | ++----------+--------------+ +Function max() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| MinMax.a | [] | +| MinMax.b | [] | +| MinMax.c | [] | +| MinMax.d | [] | +| MinMax.e | [] | +| MinMax.f | [] | +| MinMax.g | [] | +| MinMax.h | [] | +| MinMax.i | [] | +| MinMax.j | [] | +| MinMax.k | [] | +| MinMax.l | [] | ++----------+--------------+ +Function slitherConstructorVariables() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| MinMax.a | [] | +| MinMax.b | [] | +| MinMax.c | [] | +| MinMax.d | [] | +| MinMax.e | [] | +| MinMax.f | [] | +| MinMax.g | [] | +| MinMax.h | [] | +| MinMax.i | [] | +| MinMax.j | [] | +| MinMax.k | [] | +| MinMax.l | [] | ++----------+--------------+ +Function slitherConstructorConstantVariables() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| MinMax.a | [] | +| MinMax.b | [] | +| MinMax.c | [] | +| MinMax.d | [] | +| MinMax.e | [] | +| MinMax.f | [] | +| MinMax.g | [] | +| MinMax.h | [] | +| MinMax.i | [] | +| MinMax.j | [] | +| MinMax.k | [] | +| MinMax.l | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..c6d46ec0ba --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,81 @@ + +# Contracts +# MinMax + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#3 (10 - 17) + - Implementation(s): ['tests/ast-parsing/minmax-0.8.8.sol#3-28 (1 - 2)'] + - References: [] + + ## Function + - MinMax.constructor() + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#19 (5 - 17) + - Implementation(s): ['tests/ast-parsing/minmax-0.8.8.sol#19-24 (5 - 6)'] + - References: [] + - MinMax.min() + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#26 (14 - 18) + - Implementation(s): ['tests/ast-parsing/minmax-0.8.8.sol#26 (5 - 73)'] + - References: [] + - MinMax.max() + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#27 (14 - 18) + - Implementation(s): ['tests/ast-parsing/minmax-0.8.8.sol#27 (5 - 73)'] + - References: [] + - MinMax.slitherConstructorVariables() + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#3-4 (1 - 11) + - Implementation(s): ['tests/ast-parsing/minmax-0.8.8.sol#3-28 (1 - 2)'] + - References: [] + - MinMax.slitherConstructorConstantVariables() + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#3-4 (1 - 19) + - Implementation(s): ['tests/ast-parsing/minmax-0.8.8.sol#3-28 (1 - 2)'] + - References: [] + + ## State variables + - a + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#4 (10 - 12) + - Implementation: tests/ast-parsing/minmax-0.8.8.sol#4 (5 - 28) + - References: [] + - b + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#5 (10 - 12) + - Implementation: tests/ast-parsing/minmax-0.8.8.sol#5 (5 - 28) + - References: [] + - c + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#6 (10 - 12) + - Implementation: tests/ast-parsing/minmax-0.8.8.sol#6 (5 - 34) + - References: [] + - d + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#7 (10 - 12) + - Implementation: tests/ast-parsing/minmax-0.8.8.sol#7 (5 - 35) + - References: [] + - e + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#9 (18 - 20) + - Implementation: tests/ast-parsing/minmax-0.8.8.sol#9 (5 - 35) + - References: [] + - f + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#10 (18 - 20) + - Implementation: tests/ast-parsing/minmax-0.8.8.sol#10 (5 - 35) + - References: [] + - g + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#11 (19 - 21) + - Implementation: tests/ast-parsing/minmax-0.8.8.sol#11 (5 - 43) + - References: [] + - h + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#12 (19 - 21) + - Implementation: tests/ast-parsing/minmax-0.8.8.sol#12 (5 - 43) + - References: [] + - i + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#14 (11 - 13) + - Implementation: tests/ast-parsing/minmax-0.8.8.sol#14 (5 - 22) + - References: ['tests/ast-parsing/minmax-0.8.8.sol#20 (9 - 10)'] + - j + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#15 (21 - 23) + - Implementation: tests/ast-parsing/minmax-0.8.8.sol#15 (5 - 22) + - References: ['tests/ast-parsing/minmax-0.8.8.sol#21 (9 - 10)'] + - k + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#16 (20 - 22) + - Implementation: tests/ast-parsing/minmax-0.8.8.sol#16 (5 - 21) + - References: ['tests/ast-parsing/minmax-0.8.8.sol#22 (9 - 10)'] + - l + - Declaration: tests/ast-parsing/minmax-0.8.8.sol#17 (20 - 22) + - Implementation: tests/ast-parsing/minmax-0.8.8.sol#17 (5 - 21) + - References: ['tests/ast-parsing/minmax-0.8.8.sol#23 (9 - 10)'] + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..94a95f4f5a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,11 @@ +Export tmp.zip-MinMax-constructor().dot +Export tmp.zip-MinMax-min().dot +Export tmp.zip-MinMax-max().dot +Export tmp.zip-MinMax-slitherConstructorVariables().dot +Export tmp.zip-MinMax-slitherConstructorConstantVariables().dot + +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..f0a47ea731 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,87 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "MinMax": [ + "min()", + "max()" + ] + }, + "constants_used": { + "MinMax": { + "constructor()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "0", + "type": "uint8" + } + ], + [ + { + "value": "255", + "type": "uint8" + } + ], + [ + { + "value": "3", + "type": "uint256" + } + ] + ], + "min()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "max()": [ + [ + { + "value": "3", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "MinMax": { + "constructor()": { + "impacts": [], + "is_impacted_by": [] + }, + "min()": { + "impacts": [], + "is_impacted_by": [] + }, + "max()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": { + "MinMax": "constructor()" + }, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..d4bedc57af --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,10 @@ + +MinMax: ++---------------+------------+ +| Name | ID | ++---------------+------------+ +| constructor() | 0x90fa17bb | +| min() | 0xf8897945 | +| max() | 0x6ac5db19 | ++---------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..200ac99d92 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,23 @@ + +Contract MinMax +Contract vars: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'] +Inheritance:: [] + ++---------------------------------------+------------+-----------+------+------------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------------------------------+------------+-----------+------+------------+----------------+----------------+-----------------------+ +| constructor() | public | [] | [] | ['i', 'j'] | ['type()'] | [] | 1 | +| | | | | ['k', 'l'] | | | | +| min() | public | [] | [] | [] | ['type()'] | [] | 1 | +| max() | public | [] | [] | [] | ['type()'] | [] | 1 | +| slitherConstructorVariables() | internal | [] | [] | ['a', 'b'] | ['type()'] | [] | 1 | +| | | | | ['c', 'd'] | | | | +| slitherConstructorConstantVariables() | internal | [] | [] | ['e', 'f'] | ['type()'] | [] | 1 | +| | | | | ['g', 'h'] | | | | ++---------------------------------------+------------+-----------+------+------------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..8767970017 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| MinMax | 44 | 4 | 34 | 19 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| MinMax | 23 | 78 | 89 | 353 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| MinMax | 4 | 1263 | 70 | 0.039 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..f6f4f438df --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 23 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..9fc85d8305 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ MinMax + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ MinMax + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..1c0f61b767 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c146_MinMax[shape="box"label=<
MinMax
Public Functions:
min()
max()
Private Variables:
a
b
c
d
e
f
g
h
i
j
k
l
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..2e423c72b7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 29 | +| sloc | 0 | 0 | 23 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 52 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..13a6eef50f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| MinMax | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..f9aca8323e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,11 @@ + +Contract MinMax ++-------------------------------------+-----------+ +| Function | Modifiers | ++-------------------------------------+-----------+ +| constructor | [] | +| min | [] | +| max | [] | +| slitherConstructorVariables | [] | +| slitherConstructorConstantVariables | [] | ++-------------------------------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..11e4bee2a0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,10 @@ +Constructor and pure/view functions are not displayed + +MinMax: ++-------+-------------------+ +| Name | Use whenNotPaused | ++-------+-------------------+ +| min() | | +| max() | | ++-------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..d77fa521a1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,11 @@ + +Contract MinMax ++-------------------------------------+-------------------+ +| Function | require or assert | ++-------------------------------------+-------------------+ +| constructor | | +| min | | +| max | | +| slitherConstructorVariables | | +| slitherConstructorConstantVariables | | ++-------------------------------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..952007edd1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,79 @@ +Contract MinMax + Function MinMax.constructor() (*) + Expression: i = type()(uint8).max + IRs: + TMP_1(uint8) := 255(uint8) + i(uint8) := TMP_1(uint8) + Expression: j = type()(uint8).min + IRs: + TMP_3(uint8) := 0(uint8) + j(uint8) := TMP_3(uint8) + Expression: k = uint256(type()(Enum).max) + IRs: + TMP_4(type(Enum)) = SOLIDITY_CALL type()(Enum) + TMP_5(uint256) := 3(uint256) + TMP_6 = CONVERT TMP_5 to uint256 + k(uint256) := TMP_6(uint256) + Expression: l = uint256(type()(Enum).min) + IRs: + TMP_7(type(Enum)) = SOLIDITY_CALL type()(Enum) + TMP_8(uint256) := 0(uint256) + TMP_9 = CONVERT TMP_8 to uint256 + l(uint256) := TMP_9(uint256) + Function MinMax.min() (*) + Expression: uint256(type()(Enum).min) + IRs: + TMP_10(type(Enum)) = SOLIDITY_CALL type()(Enum) + TMP_11(uint256) := 0(uint256) + TMP_12 = CONVERT TMP_11 to uint256 + RETURN TMP_12 + Function MinMax.max() (*) + Expression: uint256(type()(Enum).max) + IRs: + TMP_13(type(Enum)) = SOLIDITY_CALL type()(Enum) + TMP_14(uint256) := 3(uint256) + TMP_15 = CONVERT TMP_14 to uint256 + RETURN TMP_15 + Function MinMax.slitherConstructorVariables() (*) + Expression: a = type()(uint256).max + IRs: + TMP_17(uint256) := 115792089237316195423570985008687907853269984665640564039457584007913129639935(uint256) + a(uint256) := TMP_17(uint256) + Expression: b = type()(uint256).min + IRs: + TMP_19(uint256) := 0(uint256) + b(uint256) := TMP_19(uint256) + Expression: c = uint256(type()(Enum).min) + IRs: + TMP_20(type(Enum)) = SOLIDITY_CALL type()(Enum) + TMP_21(uint256) := 0(uint256) + TMP_22 = CONVERT TMP_21 to uint256 + c(uint256) := TMP_22(uint256) + Expression: d = uint256(type()(Enum).max) + IRs: + TMP_23(type(Enum)) = SOLIDITY_CALL type()(Enum) + TMP_24(uint256) := 3(uint256) + TMP_25 = CONVERT TMP_24 to uint256 + d(uint256) := TMP_25(uint256) + Function MinMax.slitherConstructorConstantVariables() (*) + Expression: e = type()(int256).max + IRs: + TMP_27(int256) := 57896044618658097711785492504343953926634992332820282019728792003956564819967(int256) + e(int256) := TMP_27(int256) + Expression: f = type()(int256).min + IRs: + TMP_29(int256) := -57896044618658097711785492504343953926634992332820282019728792003956564819968(int256) + f(int256) := TMP_29(int256) + Expression: g = uint256(type()(Enum).max) + IRs: + TMP_30(type(Enum)) = SOLIDITY_CALL type()(Enum) + TMP_31(uint256) := 3(uint256) + TMP_32 = CONVERT TMP_31 to uint256 + g(uint256) := TMP_32(uint256) + Expression: h = uint256(type()(Enum).min) + IRs: + TMP_33(type(Enum)) = SOLIDITY_CALL type()(Enum) + TMP_34(uint256) := 0(uint256) + TMP_35 = CONVERT TMP_34 to uint256 + h(uint256) := TMP_35(uint256) + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..fd28003f16 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,11 @@ + +MinMax: ++----------+---------+------+--------+ +| Name | Type | Slot | Offset | ++----------+---------+------+--------+ +| MinMax.a | uint256 | 0 | 0 | +| MinMax.b | uint256 | 1 | 0 | +| MinMax.c | uint256 | 2 | 0 | +| MinMax.d | uint256 | 3 | 0 | ++----------+---------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..1ab546de36 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_minmax_0_8_8_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,12 @@ + +Contract MinMax ++-------------------------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------------------------------+-------------------------+--------------------------+ +| constructor | ['i', 'j', 'k', 'l'] | [] | +| min | [] | [] | +| max | [] | [] | +| slitherConstructorVariables | ['a', 'b', 'c', 'd'] | [] | +| slitherConstructorConstantVariables | ['e', 'f', 'g', 'h'] | [] | ++-------------------------------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..d6bbb89e5b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,27 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipA.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_9_A { +label = "A" +"9_f" [label="f"] +"9_f" -> "9_m" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_9_A { +label = "A" +"9_f" [label="f"] +"9_f" -> "9_m" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..1e3c7ec5d2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,61 @@ +Export tmp.zip-A-f().dot +Export tmp.zip-A-m().dot +Export tmp.zip-C-onePlaceholder().dot +Export tmp.zip-C-multiplePlaceholders().dot +Export tmp.zip-C-acceptsVar(uint256).dot +Export tmp.zip-C-noParams().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +m() + +IRs: +MODIFIER_CALL, A.m()()"]; +} + +digraph{ +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +1->2; +2[label="Node Type: _ 2 +"]; +2->3; +3[label="Node Type: _ 3 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..7dfe80f180 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| A | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| A | 1 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| A | 1 | 0 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| A | 1 | 1 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 1 | 1 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| A | 0 | 1 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..7f8decf4a3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,7 @@ + ++ Contract A (Most derived contract) + - From A + - f() (public) + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..ce260c248b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,60 @@ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function m() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function m() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function onePlaceholder() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function multiplePlaceholders() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function acceptsVar(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Function noParams() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..0d4379abfc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,27 @@ + +# Contracts +# A + - Declaration: tests/ast-parsing/modifier-0.7.0.sol#1 (19 - 21) + - Implementation(s): [] + - References: [] + + ## Function + - A.f() + - Declaration: tests/ast-parsing/modifier-0.7.0.sol#4 (11 - 13) + - Implementation(s): ['tests/ast-parsing/modifier-0.7.0.sol#4-6 (2 - 3)'] + - References: [] + + ## State variables + + ## Structures +# C + - Declaration: tests/ast-parsing/modifier-0.7.0.sol#9 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..46a608566d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,13 @@ +Export tmp.zip-A-f().dot +Export tmp.zip-A-m().dot +Export tmp.zip-C-onePlaceholder().dot +Export tmp.zip-C-multiplePlaceholders().dot +Export tmp.zip-C-acceptsVar(uint256).dot +Export tmp.zip-C-noParams().dot + +None +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..77f31c93af --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,32 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "A": [ + "f()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "A": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..32ddb39c9f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,14 @@ + +A: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..46879c555d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,35 @@ + +Contract A +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | ['m'] | [] | [] | ['m'] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| m() | internal | [] | [] | [] | [] | 2 | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++------------------------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++------------------------+------------+------+-------+----------------+----------------+-----------------------+ +| onePlaceholder() | internal | [] | [] | [] | [] | 1 | +| multiplePlaceholders() | internal | [] | [] | [] | [] | 1 | +| acceptsVar(uint256) | internal | [] | [] | [] | [] | 1 | +| noParams() | internal | [] | [] | [] | [] | 1 | ++------------------------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..bfea5fb6aa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| A | 1 | 1 | 1 | 1 | +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| A | 2 | 2 | 0 | 2 | +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| A | 0 | 1 | 0 | 0.000 | +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..9ba0e45c51 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 21 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..7eaa2e0a76 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ A + ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ A + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..83ad8b9cb4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c9_A[shape="box"label=<
A
Public Functions:
f()
Modifiers:
m()
>]; + +c30_C[shape="box"label=<
C
Modifiers:
onePlaceholder()
multiplePlaceholders()
acceptsVar(uint256)
noParams()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..0754954cb4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 27 | +| sloc | 0 | 0 | 21 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 48 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..035d75b5d7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.5 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| A | 0 | 0 | 0.00 | 0.00 | +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..87fa47c19e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,12 @@ + +Contract A ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | ['m'] | ++----------+-----------+ +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..205cad1d1c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,15 @@ +Constructor and pure/view functions are not displayed + +A: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f597405060 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,12 @@ + +Contract A ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..409a7eec25 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,12 @@ +Contract A + Function A.f() (*) + Expression: m() + IRs: + MODIFIER_CALL, A.m()() + Modifier A.m() +Contract C + Modifier C.onePlaceholder() + Modifier C.multiplePlaceholders() + Modifier C.acceptsVar(uint256) + Modifier C.noParams() + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..2b3ad1dc9f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,13 @@ + +A: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..ef0747d4be --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_0_7_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,14 @@ + +Contract A ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..02a3bde19d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,43 @@ +Export tmp.zip-C-onePlaceholder().dot +Export tmp.zip-C-multiplePlaceholders().dot +Export tmp.zip-C-acceptsVar(uint256).dot +Export tmp.zip-C-noParams().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +1->2; +2[label="Node Type: _ 2 +"]; +2->3; +3[label="Node Type: _ 3 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..18a08c12d3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,28 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function onePlaceholder() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function multiplePlaceholders() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function acceptsVar(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Function noParams() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..987fb93141 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/modifier-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..6135266c0f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,9 @@ +Export tmp.zip-C-onePlaceholder().dot +Export tmp.zip-C-multiplePlaceholders().dot +Export tmp.zip-C-acceptsVar(uint256).dot +Export tmp.zip-C-noParams().dot + +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..afb98bb3d9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,19 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++------------------------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++------------------------+------------+------+-------+----------------+----------------+-----------------------+ +| onePlaceholder() | internal | [] | [] | [] | [] | 1 | +| multiplePlaceholders() | internal | [] | [] | [] | [] | 1 | +| acceptsVar(uint256) | internal | [] | [] | [] | [] | 1 | +| noParams() | internal | [] | [] | [] | [] | 1 | ++------------------------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..ea98958ae3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 16 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..5fcca48d17 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c43_C[shape="box"label=<
C
Modifiers:
onePlaceholder()
multiplePlaceholders()
acceptsVar(uint256)
noParams()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7c6caac6f7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 19 | +| sloc | 0 | 0 | 16 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 35 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..4174e5faf5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,6 @@ +Contract C + Modifier C.onePlaceholder() + Modifier C.multiplePlaceholders() + Modifier C.acceptsVar(uint256) + Modifier C.noParams() + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..bded6196ec --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,21 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipB.call-graph.dot + +strict digraph { +subgraph cluster_11_A { +label = "A" +"11_f" [label="f"] +"11_f" -> "11_m" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_11_A { +label = "A" +"11_f" [label="f"] +"11_f" -> "11_m" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..9ea5b3713c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,56 @@ +Export tmp.zip-A-f().dot +Export tmp.zip-A-m().dot +Export tmp.zip-B-f().dot +Export tmp.zip-B-m().dot +Export tmp.zip-B-m().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +m() + +IRs: +MODIFIER_CALL, A.m()()"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +m() + +IRs: +MODIFIER_CALL, B.m()()"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: _ 1 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..737e134592 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| A | 0 | 0 | 0 | +| B | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| A | 1 | 0 | 0 | 0 | +| B | 1 | 0 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| A | 1 | 0 | 0 | +| B | 1 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| A | 1 | 1 | 0 | +| B | 1 | 1 | 0 | +| TOTAL | 2 | 2 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| A | 0 | 1 | 1 | 0 | 0 | +| B | 0 | 1 | 0 | 1 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..c4f95eb378 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,9 @@ + ++ Contract A + - From A + - f() (public) + ++ Contract B (Most derived contract) + - From A + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..b985986c05 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,44 @@ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function m() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function m() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function m() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..ad4c64c996 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,27 @@ + +# Contracts +# A + - Declaration: tests/ast-parsing/modifier_identifier_path.sol#1 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/modifier_identifier_path.sol#8 (15 - 16)'] + + ## Function + - A.f() + - Declaration: tests/ast-parsing/modifier_identifier_path.sol#3 (11 - 13) + - Implementation(s): ['tests/ast-parsing/modifier_identifier_path.sol#3 (2 - 26)'] + - References: [] + + ## State variables + + ## Structures +# B + - Declaration: tests/ast-parsing/modifier_identifier_path.sol#8 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..3967164fdd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,11 @@ +Export tmp.zip-A-f().dot +Export tmp.zip-A-m().dot +Export tmp.zip-B-f().dot +Export tmp.zip-B-m().dot +Export tmp.zip-B-m().dot + +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..7be8d64e41 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,40 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "A": [ + "f()" + ], + "B": [ + "f()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "A": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "B": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..a8e7ee9de8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +B: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..aebc1138e1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,34 @@ + +Contract A +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | ['m'] | [] | [] | ['m'] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| m() | internal | [] | [] | [] | [] | 1 | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract B +Contract vars: [] +Inheritance:: ['A'] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | ['m'] | [] | [] | ['m'] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| m() | internal | [] | [] | [] | [] | 1 | +| m() | internal | [] | [] | [] | [] | 1 | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..063f012e32 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| A | 1 | 1 | 1 | 1 | +| B | 1 | 1 | 1 | 1 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| A | 2 | 2 | 0 | 2 | +| B | 2 | 2 | 0 | 2 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| A | 0 | 1 | 0 | 0.000 | +| B | 0 | 1 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..9d17d05dc4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 7 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..bba32ecfff --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,16 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ A + ++ B + -> A + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ A + -> B + ++ B + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..5163c080d2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,9 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c11_A[shape="box"label=<
A
Public Functions:
f()
Modifiers:
m()
>]; + +c19_B -> c11_A; +c19_B[shape="box"label=<
B
Modifiers:
m()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..6a2bfaa224 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 12 | +| sloc | 0 | 0 | 7 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 19 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..c7dde17b8f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| A | 0 | 0 | 0.00 | 0.00 | +| B | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..cd82800b31 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract B ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | ['m'] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..2fda1a3b62 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,16 @@ +Constructor and pure/view functions are not displayed + +A: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + +B: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..0ab68b6010 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract B ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..f8d26aac0b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,14 @@ +Contract A + Function A.f() (*) + Expression: m() + IRs: + MODIFIER_CALL, A.m()() + Modifier A.m() +Contract B + Function A.f() (*) + Expression: m() + IRs: + MODIFIER_CALL, B.m()() + Modifier A.m() + Modifier B.m() + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..eb0651d7d1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +B: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..b8c0387d4a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_modifier_identifier_path_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,15 @@ + +Contract A ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract B ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..d1b2704c2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,31 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipB.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_28_B { +label = "B" +"28_constructor" [label="constructor"] +}subgraph cluster_45_C { +label = "C" +"45_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_28_B { +label = "B" +"28_constructor" [label="constructor"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_45_C { +label = "C" +"45_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..0743c6475f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,31 @@ +Export tmp.zip-B-constructor().dot +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +new B +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +new uint256[] +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +new uint256[][] +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..10d35fcdb9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| B | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| B | 0 | 0 | 0 | 0 | +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| B | 0 | 0 | 0 | +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| B | 0 | 0 | 0 | +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| B | 0 | 0 | 0 | 0 | 0 | +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..4d155ef63f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1,14 @@ + +################# +####### B ####### +################# + +## Constructor Call Sequence + - B + +## Constructor Definitions + +### B + + constructor() public {} + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..445ed0f3c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,9 @@ + ++ Contract B (Most derived contract) + - From B + - constructor() (public) + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..6492591a50 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,34 @@ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..bcbe30eae7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,31 @@ + +# Contracts +# B + - Declaration: tests/ast-parsing/newexpression-0.5.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/newexpression-0.5.0.sol#7 (13 - 14)'] + + ## Function + - B.constructor() + - Declaration: tests/ast-parsing/newexpression-0.5.0.sol#2 (5 - 17) + - Implementation(s): ['tests/ast-parsing/newexpression-0.5.0.sol#2 (5 - 28)'] + - References: [] + + ## State variables + + ## Structures +# C + - Declaration: tests/ast-parsing/newexpression-0.5.0.sol#5 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/newexpression-0.5.0.sol#6 (14 - 16) + - Implementation(s): ['tests/ast-parsing/newexpression-0.5.0.sol#6-12 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..aad737105a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,5 @@ +Export tmp.zip-B-constructor().dot +Export tmp.zip-C-f().dot + +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..fd10156004 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,42 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "B": [ + "constructor()" + ], + "C": [ + "f()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "B": { + "constructor()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": { + "B": "constructor()" + }, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..75dd1fade1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,15 @@ + +B: ++---------------+------------+ +| Name | ID | ++---------------+------------+ +| constructor() | 0x90fa17bb | ++---------------+------------+ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..f20eb4a398 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,31 @@ + +Contract B +Contract vars: [] +Inheritance:: [] + ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor() | public | [] | [] | [] | [] | [] | 1 | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..6682d2c98f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| B | 0 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| B | 0 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| B | 0 | 0 | 0 | 0.000 | +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..96281dff7c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 10 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..034476d06e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ B + ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ B + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..8ba31fd677 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c28_B[shape="box"label=<
B
>]; + +c45_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..ef45eb2a09 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 13 | +| sloc | 0 | 0 | 10 | +| cloc | 0 | 0 | 1 | +| Total | 0 | 0 | 24 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..33893969e9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| B | 0 | 0 | 0.00 | 0.00 | +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..6f12097c1e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,13 @@ + +Contract B ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | ++-------------+-----------+ +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..0cc32dd415 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,15 @@ +Constructor and pure/view functions are not displayed + +B: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..b742cd1237 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,13 @@ + +Contract B ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | ++-------------+-------------------+ +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..b73dbafe70 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,11 @@ +Contract B + Function B.constructor() (*) +Contract C + Function C.f() (*) + Expression: new B + IRs: + Expression: new uint256[] + IRs: + Expression: new uint256[][] + IRs: + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..9e6a0c4880 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,13 @@ + +B: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..7c90f1d1ea --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,15 @@ + +Contract B ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1896e3e300 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,31 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipB.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_5_B { +label = "B" +"5_constructor" [label="constructor"] +}subgraph cluster_23_C { +label = "C" +"23_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_5_B { +label = "B" +"5_constructor" [label="constructor"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_23_C { +label = "C" +"23_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..0743c6475f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,31 @@ +Export tmp.zip-B-constructor().dot +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +new B +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +new uint256[] +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +new uint256[][] +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..10d35fcdb9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| B | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| B | 0 | 0 | 0 | 0 | +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| B | 0 | 0 | 0 | +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| B | 0 | 0 | 0 | +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| B | 0 | 0 | 0 | 0 | 0 | +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..4d155ef63f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1,14 @@ + +################# +####### B ####### +################# + +## Constructor Call Sequence + - B + +## Constructor Definitions + +### B + + constructor() public {} + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..445ed0f3c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,9 @@ + ++ Contract B (Most derived contract) + - From B + - constructor() (public) + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..6492591a50 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,34 @@ + +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract B ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function constructor() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..bcbe30eae7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,31 @@ + +# Contracts +# B + - Declaration: tests/ast-parsing/newexpression-0.5.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/newexpression-0.5.0.sol#7 (13 - 14)'] + + ## Function + - B.constructor() + - Declaration: tests/ast-parsing/newexpression-0.5.0.sol#2 (5 - 17) + - Implementation(s): ['tests/ast-parsing/newexpression-0.5.0.sol#2 (5 - 28)'] + - References: [] + + ## State variables + + ## Structures +# C + - Declaration: tests/ast-parsing/newexpression-0.5.0.sol#5 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/newexpression-0.5.0.sol#6 (14 - 16) + - Implementation(s): ['tests/ast-parsing/newexpression-0.5.0.sol#6-12 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..aad737105a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,5 @@ +Export tmp.zip-B-constructor().dot +Export tmp.zip-C-f().dot + +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..e881ccd7a3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,42 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "B": [ + "constructor()" + ], + "C": [ + "f()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "B": { + "constructor()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": { + "B": "constructor()" + }, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..75dd1fade1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,15 @@ + +B: ++---------------+------------+ +| Name | ID | ++---------------+------------+ +| constructor() | 0x90fa17bb | ++---------------+------------+ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..f20eb4a398 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,31 @@ + +Contract B +Contract vars: [] +Inheritance:: [] + ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| constructor() | public | [] | [] | [] | [] | [] | 1 | ++---------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..6682d2c98f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| B | 0 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| B | 0 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| B | 0 | 0 | 0 | 0.000 | +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..96281dff7c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 10 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..034476d06e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ B + ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ B + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..504a4fc748 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c5_B[shape="box"label=<
B
>]; + +c23_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..ef45eb2a09 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 13 | +| sloc | 0 | 0 | 10 | +| cloc | 0 | 0 | 1 | +| Total | 0 | 0 | 24 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..33893969e9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| B | 0 | 0 | 0.00 | 0.00 | +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..6f12097c1e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,13 @@ + +Contract B ++-------------+-----------+ +| Function | Modifiers | ++-------------+-----------+ +| constructor | [] | ++-------------+-----------+ +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..0cc32dd415 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,15 @@ +Constructor and pure/view functions are not displayed + +B: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..b742cd1237 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,13 @@ + +Contract B ++-------------+-------------------+ +| Function | require or assert | ++-------------+-------------------+ +| constructor | | ++-------------+-------------------+ +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..b73dbafe70 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,11 @@ +Contract B + Function B.constructor() (*) +Contract C + Function C.f() (*) + Expression: new B + IRs: + Expression: new uint256[] + IRs: + Expression: new uint256[][] + IRs: + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..9e6a0c4880 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,13 @@ + +B: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..7c90f1d1ea --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_newexpression_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,15 @@ + +Contract B ++-------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-------------+-------------------------+--------------------------+ +| constructor | [] | [] | ++-------------+-------------------------+--------------------------+ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..6e0a40fd1b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/pragma-0.5.0.sol#5 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..be5d3bd481 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 3 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..7bf19456e6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c7_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..ffa072e98e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 5 | +| sloc | 0 | 0 | 3 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 8 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..8b3bcfb45c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/pragma-0.8.0.sol#7 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..2a92db940a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..2bc8584124 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 4 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..af30b320e6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c4_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..52d8066d6e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 7 | +| sloc | 0 | 0 | 4 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 11 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_pragma_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..68c964d16c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_35_C { +label = "C" +"35_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_35_C { +label = "C" +"35_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..70e573bcfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,21 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +arr.push((1,2)) + +IRs: +REF_1 -> LENGTH arr +TMP_1(uint256) := REF_1(uint256) +TMP_2(uint256) = TMP_1 + 1 +REF_1(uint256) (->arr) := TMP_2(uint256) +REF_2(uint256[]) -> arr[TMP_1] +TMP_3(uint256[]) = ['1(uint256)', '2(uint256)'] +REF_2(uint256[]) (->arr) := TMP_3(uint256[])"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..5f52fb9a94 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..6b97ecfcd7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,14 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| arr | ['arr'] | ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| C.arr | ['arr'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..881ecbbfd1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,21 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/push-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/push-all.sol#5 (14 - 16) + - Implementation(s): ['tests/ast-parsing/push-all.sol#5-7 (5 - 6)'] + - References: [] + + ## State variables + - arr + - Declaration: tests/ast-parsing/push-all.sol#3 (14 - 18) + - Implementation: tests/ast-parsing/push-all.sol#3 (5 - 17) + - References: ['tests/ast-parsing/push-all.sol#6 (9 - 12)'] + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..bfd91319ed --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,61 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [ + "f()" + ], + "is_impacted_by": [ + "f()" + ] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..e7eb3495a8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: ['arr'] +Inheritance:: [] + ++----------+------------+-----------+---------+---------+----------------+---------------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+---------+---------+----------------+---------------------+-----------------------+ +| f() | public | [] | ['arr'] | ['arr'] | [] | ['arr.push((1,2))'] | 1 | ++----------+------------+-----------+---------+---------+----------------+---------------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..ba46c54217 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 7 | 5 | 10 | 5 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 10 | 17 | 23 | 56 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 5 | 282 | 16 | 0.014 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..b7508cda54 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 6 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..e4d1b1a9c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c35_C[shape="box"label=<
C
Public Functions:
f()
Private Variables:
arr
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..9fe2afec98 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 9 | +| sloc | 0 | 0 | 6 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 15 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..fe4c89a3f8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,12 @@ +Contract C + Function C.f() (*) + Expression: arr.push((1,2)) + IRs: + REF_1 -> LENGTH arr + TMP_1(uint256) := REF_1(uint256) + TMP_2(uint256) = TMP_1 + 1 + REF_1(uint256) (->arr) := TMP_2(uint256) + REF_2(uint256[]) -> arr[TMP_1] + TMP_3(uint256[]) = ['1(uint256)', '2(uint256)'] + REF_2(uint256[]) (->arr) := TMP_3(uint256[]) + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..d2662a47c7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,8 @@ + +C: ++-------+-------------+------+--------+ +| Name | Type | Slot | Offset | ++-------+-------------+------+--------+ +| C.arr | uint256[][] | 0 | 0 | ++-------+-------------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..1457a0e280 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | ['arr'] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..5efc7775e6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_17_C { +label = "C" +"17_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_17_C { +label = "C" +"17_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..3d99ab7ce0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,21 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +arr.push((1,2)) + +IRs: +REF_1 -> LENGTH arr +TMP_1(uint256) := REF_1(uint256) +TMP_2(uint256) = TMP_1 (c)+ 1 +REF_1(uint256) (->arr) := TMP_2(uint256) +REF_2(uint256[]) -> arr[TMP_1] +TMP_3(uint256[]) = ['1(uint256)', '2(uint256)'] +REF_2(uint256[]) (->arr) := TMP_3(uint256[])"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..5f52fb9a94 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..6b97ecfcd7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,14 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| arr | ['arr'] | ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| C.arr | ['arr'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..881ecbbfd1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,21 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/push-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/push-all.sol#5 (14 - 16) + - Implementation(s): ['tests/ast-parsing/push-all.sol#5-7 (5 - 6)'] + - References: [] + + ## State variables + - arr + - Declaration: tests/ast-parsing/push-all.sol#3 (14 - 18) + - Implementation: tests/ast-parsing/push-all.sol#3 (5 - 17) + - References: ['tests/ast-parsing/push-all.sol#6 (9 - 12)'] + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..434878b026 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,61 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [ + "f()" + ], + "is_impacted_by": [ + "f()" + ] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..e7eb3495a8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: ['arr'] +Inheritance:: [] + ++----------+------------+-----------+---------+---------+----------------+---------------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+---------+---------+----------------+---------------------+-----------------------+ +| f() | public | [] | ['arr'] | ['arr'] | [] | ['arr.push((1,2))'] | 1 | ++----------+------------+-----------+---------+---------+----------------+---------------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..ba46c54217 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 7 | 5 | 10 | 5 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 10 | 17 | 23 | 56 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 5 | 282 | 16 | 0.014 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..b7508cda54 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 6 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..9d80ea1adc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c17_C[shape="box"label=<
C
Public Functions:
f()
Private Variables:
arr
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..9fe2afec98 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 9 | +| sloc | 0 | 0 | 6 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 15 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..a8e8bd0ff1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,12 @@ +Contract C + Function C.f() (*) + Expression: arr.push((1,2)) + IRs: + REF_1 -> LENGTH arr + TMP_1(uint256) := REF_1(uint256) + TMP_2(uint256) = TMP_1 (c)+ 1 + REF_1(uint256) (->arr) := TMP_2(uint256) + REF_2(uint256[]) -> arr[TMP_1] + TMP_3(uint256[]) = ['1(uint256)', '2(uint256)'] + REF_2(uint256[]) (->arr) := TMP_3(uint256[]) + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..d2662a47c7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,8 @@ + +C: ++-------+-------------+------+--------+ +| Name | Type | Slot | Offset | ++-------+-------------+------+--------+ +| C.arr | uint256[][] | 0 | 0 | ++-------+-------------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..1457a0e280 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_push_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | ['arr'] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..cd24579281 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,27 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_145_C { +label = "C" +"145_returnConstant" [label="returnConstant"] +"145_returnDelete" [label="returnDelete"] +"145_returnTernary" [label="returnTernary"] +"145_returnTuple" [label="returnTuple"] +"145_returnVariable" [label="returnVariable"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_145_C { +label = "C" +"145_returnConstant" [label="returnConstant"] +"145_returnDelete" [label="returnDelete"] +"145_returnTernary" [label="returnTernary"] +"145_returnTuple" [label="returnTuple"] +"145_returnVariable" [label="returnVariable"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..1393b176da --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,122 @@ +Export tmp.zip-C-returnConstant().dot +Export tmp.zip-C-returnVariable().dot +Export tmp.zip-C-returnTuple().dot +Export tmp.zip-C-returnTernary().dot +Export tmp.zip-C-returnDelete().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0 + +IRs: +RETURN 0"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +x = 0 + +IRs: +x(uint256) := 0(uint256)"]; +1->2; +2[label="Node Type: RETURN 2 + +EXPRESSION: +x + +IRs: +RETURN x"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +x = 0 + +IRs: +x(uint256) := 0(uint256)"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +y = 0 + +IRs: +y(uint256) := 0(uint256)"]; +2->3; +3[label="Node Type: RETURN 3 + +EXPRESSION: +(x,y) + +IRs: +RETURN x,y"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +x = 0 + +IRs: +x(uint256) := 0(uint256)"]; +1->3; +3[label="Node Type: IF 3 + +EXPRESSION: +x == 0 + +IRs: +TMP_0(bool) = x == 0 +CONDITION TMP_0"]; +3->4[label="True"]; +3->5[label="False"]; +4[label="Node Type: RETURN 4 + +EXPRESSION: +1 + +IRs: +RETURN 1"]; +5[label="Node Type: RETURN 5 + +EXPRESSION: +2 + +IRs: +RETURN 2"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +delete (m[0]) + +IRs: +REF_0(uint256) -> m[0] +m = delete REF_0 +RETURN REF_0"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..16d65c8529 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 5 | 0 | 0 | 0 | +| TOTAL | 5 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 5 | 0 | 0 | +| TOTAL | 5 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 5 | 5 | 5 | +| TOTAL | 5 | 5 | 5 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 5 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..a23bfbac3f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,9 @@ + ++ Contract C (Most derived contract) + - From C + - returnConstant() (public) + - returnDelete() (public) + - returnTernary() (public) + - returnTuple() (public) + - returnVariable() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..6dbc032413 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,46 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| m | ['m'] | ++----------+--------------+ + +Function returnConstant() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| C.m | [] | ++----------+--------------+ +Function returnVariable() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| x | [] | +| C.m | [] | ++----------+--------------+ +Function returnTuple() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| x | [] | +| y | [] | +| C.m | [] | ++----------+--------------+ +Function returnTernary() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| x | [] | +| C.m | [] | ++----------+--------------+ +Function returnDelete() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| C.m | ['m'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..cfbfa9fe07 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,37 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/return-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.returnConstant() + - Declaration: tests/ast-parsing/return-all.sol#2 (14 - 29) + - Implementation(s): ['tests/ast-parsing/return-all.sol#2-4 (5 - 6)'] + - References: [] + - C.returnVariable() + - Declaration: tests/ast-parsing/return-all.sol#6 (14 - 29) + - Implementation(s): ['tests/ast-parsing/return-all.sol#6-9 (5 - 6)'] + - References: [] + - C.returnTuple() + - Declaration: tests/ast-parsing/return-all.sol#11 (14 - 26) + - Implementation(s): ['tests/ast-parsing/return-all.sol#11-15 (5 - 6)'] + - References: [] + - C.returnTernary() + - Declaration: tests/ast-parsing/return-all.sol#17 (14 - 28) + - Implementation(s): ['tests/ast-parsing/return-all.sol#17-20 (5 - 6)'] + - References: [] + - C.returnDelete() + - Declaration: tests/ast-parsing/return-all.sol#24 (14 - 27) + - Implementation(s): ['tests/ast-parsing/return-all.sol#24-26 (5 - 6)'] + - References: [] + + ## State variables + - m + - Declaration: tests/ast-parsing/return-all.sol#22 (27 - 29) + - Implementation: tests/ast-parsing/return-all.sol#22 (5 - 28) + - References: ['tests/ast-parsing/return-all.sol#25 (23 - 24)'] + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..609315e689 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,11 @@ +Export tmp.zip-C-returnConstant().dot +Export tmp.zip-C-returnVariable().dot +Export tmp.zip-C-returnTuple().dot +Export tmp.zip-C-returnTernary().dot +Export tmp.zip-C-returnDelete().dot + +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..e46add1bf1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,122 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "returnConstant()", + "returnVariable()", + "returnTuple()", + "returnTernary()" + ] + }, + "constants_used": { + "C": { + "returnConstant()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "returnVariable()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "returnTuple()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "returnTernary()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "returnDelete()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "returnTernary()": { + "BinaryType.EQUAL": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "returnConstant()": { + "impacts": [], + "is_impacted_by": [] + }, + "returnVariable()": { + "impacts": [], + "is_impacted_by": [] + }, + "returnTuple()": { + "impacts": [], + "is_impacted_by": [] + }, + "returnTernary()": { + "impacts": [], + "is_impacted_by": [] + }, + "returnDelete()": { + "impacts": [ + "returnDelete()" + ], + "is_impacted_by": [ + "returnDelete()" + ] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..3bcae60ebc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,12 @@ + +C: ++------------------+------------+ +| Name | ID | ++------------------+------------+ +| returnConstant() | 0xf7f92ce3 | +| returnVariable() | 0xa4c4d174 | +| returnTuple() | 0x39009482 | +| returnTernary() | 0x096b5e38 | +| returnDelete() | 0xd9cec295 | ++------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..60067f70a2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,20 @@ + +Contract C +Contract vars: ['m'] +Inheritance:: [] + ++------------------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++------------------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| returnConstant() | public | [] | [] | [] | [] | [] | 1 | +| returnVariable() | public | [] | [] | [] | [] | [] | 1 | +| returnTuple() | public | [] | [] | [] | [] | [] | 1 | +| returnTernary() | public | [] | [] | [] | [] | [] | 1 | +| returnDelete() | public | [] | ['m'] | ['m'] | [] | [] | 1 | ++------------------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..1a5fec0c68 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 14 | 6 | 22 | 9 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 15 | 36 | 44 | 141 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 7 | 1031 | 57 | 0.034 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..411f12b73e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 22 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..94ad955bb2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c145_C[shape="box"label=<
C
Public Functions:
returnConstant()
returnVariable()
returnTuple()
returnTernary()
returnDelete()
Private Variables:
m
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..4c6646786d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 27 | +| sloc | 0 | 0 | 22 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 49 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..802c5900c7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,11 @@ + +Contract C ++----------------+-----------+ +| Function | Modifiers | ++----------------+-----------+ +| returnConstant | [] | +| returnVariable | [] | +| returnTuple | [] | +| returnTernary | [] | +| returnDelete | [] | ++----------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..97db53a8da --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,13 @@ +Constructor and pure/view functions are not displayed + +C: ++------------------+-------------------+ +| Name | Use whenNotPaused | ++------------------+-------------------+ +| returnConstant() | | +| returnVariable() | | +| returnTuple() | | +| returnTernary() | | +| returnDelete() | | ++------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..3e847fd1a1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,11 @@ + +Contract C ++----------------+-------------------+ +| Function | require or assert | ++----------------+-------------------+ +| returnConstant | | +| returnVariable | | +| returnTuple | | +| returnTernary | | +| returnDelete | | ++----------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..5f630af0bc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,43 @@ +Contract C + Function C.returnConstant() (*) + Expression: 0 + IRs: + RETURN 0 + Function C.returnVariable() (*) + Expression: x = 0 + IRs: + x(uint256) := 0(uint256) + Expression: x + IRs: + RETURN x + Function C.returnTuple() (*) + Expression: x = 0 + IRs: + x(uint256) := 0(uint256) + Expression: y = 0 + IRs: + y(uint256) := 0(uint256) + Expression: (x,y) + IRs: + RETURN x,y + Function C.returnTernary() (*) + Expression: x = 0 + IRs: + x(uint256) := 0(uint256) + Expression: x == 0 + IRs: + TMP_0(bool) = x == 0 + CONDITION TMP_0 + Expression: 1 + IRs: + RETURN 1 + Expression: 2 + IRs: + RETURN 2 + Function C.returnDelete() (*) + Expression: delete (m[0]) + IRs: + REF_0(uint256) -> m[0] + m = delete REF_0 + RETURN REF_0 + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..c08e5cd8b4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,8 @@ + +C: ++------+-----------------------------+------+--------+ +| Name | Type | Slot | Offset | ++------+-----------------------------+------+--------+ +| C.m | mapping(uint256 => uint256) | 0 | 0 | ++------+-----------------------------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..1a849d3edb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------------+-------------------------+--------------------------+ +| returnConstant | [] | [] | +| returnVariable | [] | [] | +| returnTuple | [] | [] | +| returnTernary | [] | [] | +| returnDelete | ['m'] | [] | ++----------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..e0f9797cbf --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,27 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_72_C { +label = "C" +"72_returnConstant" [label="returnConstant"] +"72_returnDelete" [label="returnDelete"] +"72_returnTernary" [label="returnTernary"] +"72_returnTuple" [label="returnTuple"] +"72_returnVariable" [label="returnVariable"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_72_C { +label = "C" +"72_returnConstant" [label="returnConstant"] +"72_returnDelete" [label="returnDelete"] +"72_returnTernary" [label="returnTernary"] +"72_returnTuple" [label="returnTuple"] +"72_returnVariable" [label="returnVariable"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..1393b176da --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,122 @@ +Export tmp.zip-C-returnConstant().dot +Export tmp.zip-C-returnVariable().dot +Export tmp.zip-C-returnTuple().dot +Export tmp.zip-C-returnTernary().dot +Export tmp.zip-C-returnDelete().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0 + +IRs: +RETURN 0"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +x = 0 + +IRs: +x(uint256) := 0(uint256)"]; +1->2; +2[label="Node Type: RETURN 2 + +EXPRESSION: +x + +IRs: +RETURN x"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +x = 0 + +IRs: +x(uint256) := 0(uint256)"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +y = 0 + +IRs: +y(uint256) := 0(uint256)"]; +2->3; +3[label="Node Type: RETURN 3 + +EXPRESSION: +(x,y) + +IRs: +RETURN x,y"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +x = 0 + +IRs: +x(uint256) := 0(uint256)"]; +1->3; +3[label="Node Type: IF 3 + +EXPRESSION: +x == 0 + +IRs: +TMP_0(bool) = x == 0 +CONDITION TMP_0"]; +3->4[label="True"]; +3->5[label="False"]; +4[label="Node Type: RETURN 4 + +EXPRESSION: +1 + +IRs: +RETURN 1"]; +5[label="Node Type: RETURN 5 + +EXPRESSION: +2 + +IRs: +RETURN 2"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +delete (m[0]) + +IRs: +REF_0(uint256) -> m[0] +m = delete REF_0 +RETURN REF_0"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..16d65c8529 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 5 | 0 | 0 | 0 | +| TOTAL | 5 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 5 | 0 | 0 | +| TOTAL | 5 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 5 | 5 | 5 | +| TOTAL | 5 | 5 | 5 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 5 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..a23bfbac3f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,9 @@ + ++ Contract C (Most derived contract) + - From C + - returnConstant() (public) + - returnDelete() (public) + - returnTernary() (public) + - returnTuple() (public) + - returnVariable() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..6dbc032413 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,46 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| m | ['m'] | ++----------+--------------+ + +Function returnConstant() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| C.m | [] | ++----------+--------------+ +Function returnVariable() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| x | [] | +| C.m | [] | ++----------+--------------+ +Function returnTuple() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| x | [] | +| y | [] | +| C.m | [] | ++----------+--------------+ +Function returnTernary() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | +| x | [] | +| C.m | [] | ++----------+--------------+ +Function returnDelete() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| C.m | ['m'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..cfbfa9fe07 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,37 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/return-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.returnConstant() + - Declaration: tests/ast-parsing/return-all.sol#2 (14 - 29) + - Implementation(s): ['tests/ast-parsing/return-all.sol#2-4 (5 - 6)'] + - References: [] + - C.returnVariable() + - Declaration: tests/ast-parsing/return-all.sol#6 (14 - 29) + - Implementation(s): ['tests/ast-parsing/return-all.sol#6-9 (5 - 6)'] + - References: [] + - C.returnTuple() + - Declaration: tests/ast-parsing/return-all.sol#11 (14 - 26) + - Implementation(s): ['tests/ast-parsing/return-all.sol#11-15 (5 - 6)'] + - References: [] + - C.returnTernary() + - Declaration: tests/ast-parsing/return-all.sol#17 (14 - 28) + - Implementation(s): ['tests/ast-parsing/return-all.sol#17-20 (5 - 6)'] + - References: [] + - C.returnDelete() + - Declaration: tests/ast-parsing/return-all.sol#24 (14 - 27) + - Implementation(s): ['tests/ast-parsing/return-all.sol#24-26 (5 - 6)'] + - References: [] + + ## State variables + - m + - Declaration: tests/ast-parsing/return-all.sol#22 (27 - 29) + - Implementation: tests/ast-parsing/return-all.sol#22 (5 - 28) + - References: ['tests/ast-parsing/return-all.sol#25 (23 - 24)'] + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..609315e689 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,11 @@ +Export tmp.zip-C-returnConstant().dot +Export tmp.zip-C-returnVariable().dot +Export tmp.zip-C-returnTuple().dot +Export tmp.zip-C-returnTernary().dot +Export tmp.zip-C-returnDelete().dot + +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..027dc9822e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,122 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "returnConstant()", + "returnVariable()", + "returnTuple()", + "returnTernary()" + ] + }, + "constants_used": { + "C": { + "returnConstant()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "returnVariable()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "returnTuple()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "returnTernary()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ] + ], + "returnDelete()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "returnTernary()": { + "BinaryType.EQUAL": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "returnConstant()": { + "impacts": [], + "is_impacted_by": [] + }, + "returnVariable()": { + "impacts": [], + "is_impacted_by": [] + }, + "returnTuple()": { + "impacts": [], + "is_impacted_by": [] + }, + "returnTernary()": { + "impacts": [], + "is_impacted_by": [] + }, + "returnDelete()": { + "impacts": [ + "returnDelete()" + ], + "is_impacted_by": [ + "returnDelete()" + ] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..3bcae60ebc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,12 @@ + +C: ++------------------+------------+ +| Name | ID | ++------------------+------------+ +| returnConstant() | 0xf7f92ce3 | +| returnVariable() | 0xa4c4d174 | +| returnTuple() | 0x39009482 | +| returnTernary() | 0x096b5e38 | +| returnDelete() | 0xd9cec295 | ++------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..60067f70a2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,20 @@ + +Contract C +Contract vars: ['m'] +Inheritance:: [] + ++------------------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++------------------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| returnConstant() | public | [] | [] | [] | [] | [] | 1 | +| returnVariable() | public | [] | [] | [] | [] | [] | 1 | +| returnTuple() | public | [] | [] | [] | [] | [] | 1 | +| returnTernary() | public | [] | [] | [] | [] | [] | 1 | +| returnDelete() | public | [] | ['m'] | ['m'] | [] | [] | 1 | ++------------------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..1a5fec0c68 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 14 | 6 | 22 | 9 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 15 | 36 | 44 | 141 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 7 | 1031 | 57 | 0.034 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..411f12b73e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 22 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..17a0bed33f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c72_C[shape="box"label=<
C
Public Functions:
returnConstant()
returnVariable()
returnTuple()
returnTernary()
returnDelete()
Private Variables:
m
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..4c6646786d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 27 | +| sloc | 0 | 0 | 22 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 49 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..802c5900c7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,11 @@ + +Contract C ++----------------+-----------+ +| Function | Modifiers | ++----------------+-----------+ +| returnConstant | [] | +| returnVariable | [] | +| returnTuple | [] | +| returnTernary | [] | +| returnDelete | [] | ++----------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..97db53a8da --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,13 @@ +Constructor and pure/view functions are not displayed + +C: ++------------------+-------------------+ +| Name | Use whenNotPaused | ++------------------+-------------------+ +| returnConstant() | | +| returnVariable() | | +| returnTuple() | | +| returnTernary() | | +| returnDelete() | | ++------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..3e847fd1a1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,11 @@ + +Contract C ++----------------+-------------------+ +| Function | require or assert | ++----------------+-------------------+ +| returnConstant | | +| returnVariable | | +| returnTuple | | +| returnTernary | | +| returnDelete | | ++----------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..5f630af0bc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,43 @@ +Contract C + Function C.returnConstant() (*) + Expression: 0 + IRs: + RETURN 0 + Function C.returnVariable() (*) + Expression: x = 0 + IRs: + x(uint256) := 0(uint256) + Expression: x + IRs: + RETURN x + Function C.returnTuple() (*) + Expression: x = 0 + IRs: + x(uint256) := 0(uint256) + Expression: y = 0 + IRs: + y(uint256) := 0(uint256) + Expression: (x,y) + IRs: + RETURN x,y + Function C.returnTernary() (*) + Expression: x = 0 + IRs: + x(uint256) := 0(uint256) + Expression: x == 0 + IRs: + TMP_0(bool) = x == 0 + CONDITION TMP_0 + Expression: 1 + IRs: + RETURN 1 + Expression: 2 + IRs: + RETURN 2 + Function C.returnDelete() (*) + Expression: delete (m[0]) + IRs: + REF_0(uint256) -> m[0] + m = delete REF_0 + RETURN REF_0 + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..c08e5cd8b4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,8 @@ + +C: ++------+-----------------------------+------+--------+ +| Name | Type | Slot | Offset | ++------+-----------------------------+------+--------+ +| C.m | mapping(uint256 => uint256) | 0 | 0 | ++------+-----------------------------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..1a849d3edb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_return_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------------+-------------------------+--------------------------+ +| returnConstant | [] | [] | +| returnVariable | [] | [] | +| returnTuple | [] | [] | +| returnTernary | [] | [] | +| returnDelete | ['m'] | [] | ++----------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..739e1dbbd6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,25 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipScope.call-graph.dot + +strict digraph { +subgraph cluster_129_Scope { +label = "Scope" +"129_for_scope" [label="for_scope"] +"129_if_scope" [label="if_scope"] +"129_nested_scope" [label="nested_scope"] +"129_while_scope" [label="while_scope"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_129_Scope { +label = "Scope" +"129_for_scope" [label="for_scope"] +"129_if_scope" [label="if_scope"] +"129_nested_scope" [label="nested_scope"] +"129_while_scope" [label="while_scope"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..75576f9990 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,107 @@ +Export tmp.zip-Scope-nested_scope().dot +Export tmp.zip-Scope-if_scope().dot +Export tmp.zip-Scope-while_scope().dot +Export tmp.zip-Scope-for_scope().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: NEW VARIABLE 3 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +true + +IRs: +CONDITION True"]; +1->2[label="True"]; +1->3[label="False"]; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->4; +3[label="Node Type: NEW VARIABLE 3 +"]; +3->4; +4[label="Node Type: END_IF 4 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->3; +3[label="Node Type: IF_LOOP 3 + +EXPRESSION: +true + +IRs: +CONDITION True"]; +3->4[label="True"]; +3->5[label="False"]; +4[label="Node Type: NEW VARIABLE 4 +"]; +4->3; +5[label="Node Type: END_LOOP 5 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 +"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +a_scope_0 < 10 + +IRs: +TMP_0(bool) = a_scope_0 < 10 +CONDITION TMP_0"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: NEW VARIABLE 6 +"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +a_scope_0 ++ + +IRs: +TMP_1(uint256) := a_scope_0(uint256) +a_scope_0(uint256) = a_scope_0 + 1"]; +7->5; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..cdc2052908 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| Scope | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| Scope | 4 | 0 | 0 | 0 | +| TOTAL | 4 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| Scope | 4 | 0 | 0 | +| TOTAL | 4 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| Scope | 4 | 4 | 4 | +| TOTAL | 4 | 4 | 4 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| Scope | 0 | 4 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..ffbed2c95c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,8 @@ + ++ Contract Scope (Most derived contract) + - From Scope + - for_scope() (public) + - if_scope() (public) + - nested_scope() (public) + - while_scope() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..2081dd2843 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,37 @@ + +Contract Scope ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function nested_scope() ++-----------+--------------+ +| Variable | Dependencies | ++-----------+--------------+ +| a | [] | +| a_scope_0 | [] | +| a_scope_1 | [] | ++-----------+--------------+ +Function if_scope() ++-----------+--------------+ +| Variable | Dependencies | ++-----------+--------------+ +| a | [] | +| a_scope_0 | [] | ++-----------+--------------+ +Function while_scope() ++-----------+--------------+ +| Variable | Dependencies | ++-----------+--------------+ +| a | [] | +| a_scope_0 | [] | ++-----------+--------------+ +Function for_scope() ++-----------+---------------+ +| Variable | Dependencies | ++-----------+---------------+ +| a | [] | +| a_scope_0 | ['a_scope_0'] | +| a_scope_1 | [] | ++-----------+---------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..45c51f13d6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,29 @@ + +# Contracts +# Scope + - Declaration: tests/ast-parsing/scope-0.5.0.sol#1 (10 - 16) + - Implementation(s): [] + - References: [] + + ## Function + - Scope.nested_scope() + - Declaration: tests/ast-parsing/scope-0.5.0.sol#3 (14 - 27) + - Implementation(s): ['tests/ast-parsing/scope-0.5.0.sol#3-12 (5 - 6)'] + - References: [] + - Scope.if_scope() + - Declaration: tests/ast-parsing/scope-0.5.0.sol#14 (14 - 23) + - Implementation(s): ['tests/ast-parsing/scope-0.5.0.sol#14-22 (5 - 6)'] + - References: [] + - Scope.while_scope() + - Declaration: tests/ast-parsing/scope-0.5.0.sol#24 (14 - 26) + - Implementation(s): ['tests/ast-parsing/scope-0.5.0.sol#24-30 (5 - 6)'] + - References: [] + - Scope.for_scope() + - Declaration: tests/ast-parsing/scope-0.5.0.sol#31 (14 - 24) + - Implementation(s): ['tests/ast-parsing/scope-0.5.0.sol#31-37 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..a3653b459b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,9 @@ +Export tmp.zip-Scope-nested_scope().dot +Export tmp.zip-Scope-if_scope().dot +Export tmp.zip-Scope-while_scope().dot +Export tmp.zip-Scope-for_scope().dot + +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..3b50aa817f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,100 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "Scope": [ + "nested_scope()", + "if_scope()", + "while_scope()", + "for_scope()" + ] + }, + "constants_used": { + "Scope": { + "if_scope()": [ + [ + { + "value": "True", + "type": "bool" + } + ] + ], + "while_scope()": [ + [ + { + "value": "True", + "type": "bool" + } + ] + ], + "for_scope()": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "Scope": { + "for_scope()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "Scope": { + "nested_scope()": { + "impacts": [], + "is_impacted_by": [] + }, + "if_scope()": { + "impacts": [], + "is_impacted_by": [] + }, + "while_scope()": { + "impacts": [], + "is_impacted_by": [] + }, + "for_scope()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..c156eb4290 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,11 @@ + +Scope: ++----------------+------------+ +| Name | ID | ++----------------+------------+ +| nested_scope() | 0xc080a72c | +| if_scope() | 0xced36add | +| while_scope() | 0xc704c044 | +| for_scope() | 0x81dfeeec | ++----------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..365aa46d26 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,19 @@ + +Contract Scope +Contract vars: [] +Inheritance:: [] + ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| nested_scope() | public | [] | [] | [] | [] | [] | 1 | +| if_scope() | public | [] | [] | [] | [] | [] | 2 | +| while_scope() | public | [] | [] | [] | [] | [] | 2 | +| for_scope() | public | [] | [] | [] | [] | [] | 2 | ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..d76145e720 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| Scope | 6 | 5 | 8 | 3 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| Scope | 8 | 14 | 16 | 42 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| Scope | 7 | 280 | 16 | 0.014 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..06bde1b2d5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 34 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..99a818b8d4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ Scope + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ Scope + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..9bd2536712 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c129_Scope[shape="box"label=<
Scope
Public Functions:
nested_scope()
if_scope()
while_scope()
for_scope()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7654e9e040 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 38 | +| sloc | 0 | 0 | 34 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 72 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..e23130c94b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| Scope | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..e88fc07c27 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,10 @@ + +Contract Scope ++--------------+-----------+ +| Function | Modifiers | ++--------------+-----------+ +| nested_scope | [] | +| if_scope | [] | +| while_scope | [] | +| for_scope | [] | ++--------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..8167fa1c7e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,12 @@ +Constructor and pure/view functions are not displayed + +Scope: ++----------------+-------------------+ +| Name | Use whenNotPaused | ++----------------+-------------------+ +| nested_scope() | | +| if_scope() | | +| while_scope() | | +| for_scope() | | ++----------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..3d81170baa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,10 @@ + +Contract Scope ++--------------+-------------------+ +| Function | require or assert | ++--------------+-------------------+ +| nested_scope | | +| if_scope | | +| while_scope | | +| for_scope | | ++--------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..0261fce0c1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,20 @@ +Contract Scope + Function Scope.nested_scope() (*) + Function Scope.if_scope() (*) + Expression: true + IRs: + CONDITION True + Function Scope.while_scope() (*) + Expression: true + IRs: + CONDITION True + Function Scope.for_scope() (*) + Expression: a_scope_0 < 10 + IRs: + TMP_0(bool) = a_scope_0 < 10 + CONDITION TMP_0 + Expression: a_scope_0 ++ + IRs: + TMP_1(uint256) := a_scope_0(uint256) + a_scope_0(uint256) = a_scope_0 + 1 + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..99b75f1862 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +Scope: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..cddf8c3103 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,11 @@ + +Contract Scope ++--------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++--------------+-------------------------+--------------------------+ +| nested_scope | [] | [] | +| if_scope | [] | [] | +| while_scope | [] | [] | +| for_scope | [] | [] | ++--------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..482496b79d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,25 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipScope.call-graph.dot + +strict digraph { +subgraph cluster_64_Scope { +label = "Scope" +"64_for_scope" [label="for_scope"] +"64_if_scope" [label="if_scope"] +"64_nested_scope" [label="nested_scope"] +"64_while_scope" [label="while_scope"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_64_Scope { +label = "Scope" +"64_for_scope" [label="for_scope"] +"64_if_scope" [label="if_scope"] +"64_nested_scope" [label="nested_scope"] +"64_while_scope" [label="while_scope"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..a2b14eb3b2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,107 @@ +Export tmp.zip-Scope-nested_scope().dot +Export tmp.zip-Scope-if_scope().dot +Export tmp.zip-Scope-while_scope().dot +Export tmp.zip-Scope-for_scope().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: NEW VARIABLE 3 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +true + +IRs: +CONDITION True"]; +1->2[label="True"]; +1->3[label="False"]; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->4; +3[label="Node Type: NEW VARIABLE 3 +"]; +3->4; +4[label="Node Type: END_IF 4 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->3; +3[label="Node Type: IF_LOOP 3 + +EXPRESSION: +true + +IRs: +CONDITION True"]; +3->4[label="True"]; +3->5[label="False"]; +4[label="Node Type: NEW VARIABLE 4 +"]; +4->3; +5[label="Node Type: END_LOOP 5 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->4; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->5; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 +"]; +4->2; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +a_scope_0 < 10 + +IRs: +TMP_0(bool) = a_scope_0 < 10 +CONDITION TMP_0"]; +5->6[label="True"]; +5->3[label="False"]; +6[label="Node Type: NEW VARIABLE 6 +"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +a_scope_0 ++ + +IRs: +TMP_1(uint256) := a_scope_0(uint256) +a_scope_0(uint256) = a_scope_0 (c)+ 1"]; +7->5; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..cdc2052908 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| Scope | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| Scope | 4 | 0 | 0 | 0 | +| TOTAL | 4 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| Scope | 4 | 0 | 0 | +| TOTAL | 4 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| Scope | 4 | 4 | 4 | +| TOTAL | 4 | 4 | 4 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| Scope | 0 | 4 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..ffbed2c95c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,8 @@ + ++ Contract Scope (Most derived contract) + - From Scope + - for_scope() (public) + - if_scope() (public) + - nested_scope() (public) + - while_scope() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..2081dd2843 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,37 @@ + +Contract Scope ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function nested_scope() ++-----------+--------------+ +| Variable | Dependencies | ++-----------+--------------+ +| a | [] | +| a_scope_0 | [] | +| a_scope_1 | [] | ++-----------+--------------+ +Function if_scope() ++-----------+--------------+ +| Variable | Dependencies | ++-----------+--------------+ +| a | [] | +| a_scope_0 | [] | ++-----------+--------------+ +Function while_scope() ++-----------+--------------+ +| Variable | Dependencies | ++-----------+--------------+ +| a | [] | +| a_scope_0 | [] | ++-----------+--------------+ +Function for_scope() ++-----------+---------------+ +| Variable | Dependencies | ++-----------+---------------+ +| a | [] | +| a_scope_0 | ['a_scope_0'] | +| a_scope_1 | [] | ++-----------+---------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..45c51f13d6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,29 @@ + +# Contracts +# Scope + - Declaration: tests/ast-parsing/scope-0.5.0.sol#1 (10 - 16) + - Implementation(s): [] + - References: [] + + ## Function + - Scope.nested_scope() + - Declaration: tests/ast-parsing/scope-0.5.0.sol#3 (14 - 27) + - Implementation(s): ['tests/ast-parsing/scope-0.5.0.sol#3-12 (5 - 6)'] + - References: [] + - Scope.if_scope() + - Declaration: tests/ast-parsing/scope-0.5.0.sol#14 (14 - 23) + - Implementation(s): ['tests/ast-parsing/scope-0.5.0.sol#14-22 (5 - 6)'] + - References: [] + - Scope.while_scope() + - Declaration: tests/ast-parsing/scope-0.5.0.sol#24 (14 - 26) + - Implementation(s): ['tests/ast-parsing/scope-0.5.0.sol#24-30 (5 - 6)'] + - References: [] + - Scope.for_scope() + - Declaration: tests/ast-parsing/scope-0.5.0.sol#31 (14 - 24) + - Implementation(s): ['tests/ast-parsing/scope-0.5.0.sol#31-37 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..a3653b459b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,9 @@ +Export tmp.zip-Scope-nested_scope().dot +Export tmp.zip-Scope-if_scope().dot +Export tmp.zip-Scope-while_scope().dot +Export tmp.zip-Scope-for_scope().dot + +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d62e8f32d8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,100 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "Scope": [ + "nested_scope()", + "if_scope()", + "while_scope()", + "for_scope()" + ] + }, + "constants_used": { + "Scope": { + "if_scope()": [ + [ + { + "value": "True", + "type": "bool" + } + ] + ], + "while_scope()": [ + [ + { + "value": "True", + "type": "bool" + } + ] + ], + "for_scope()": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "Scope": { + "for_scope()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.LESS": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "Scope": { + "nested_scope()": { + "impacts": [], + "is_impacted_by": [] + }, + "if_scope()": { + "impacts": [], + "is_impacted_by": [] + }, + "while_scope()": { + "impacts": [], + "is_impacted_by": [] + }, + "for_scope()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..c156eb4290 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,11 @@ + +Scope: ++----------------+------------+ +| Name | ID | ++----------------+------------+ +| nested_scope() | 0xc080a72c | +| if_scope() | 0xced36add | +| while_scope() | 0xc704c044 | +| for_scope() | 0x81dfeeec | ++----------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..365aa46d26 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,19 @@ + +Contract Scope +Contract vars: [] +Inheritance:: [] + ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| nested_scope() | public | [] | [] | [] | [] | [] | 1 | +| if_scope() | public | [] | [] | [] | [] | [] | 2 | +| while_scope() | public | [] | [] | [] | [] | [] | 2 | +| for_scope() | public | [] | [] | [] | [] | [] | 2 | ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..d76145e720 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| Scope | 6 | 5 | 8 | 3 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| Scope | 8 | 14 | 16 | 42 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| Scope | 7 | 280 | 16 | 0.014 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..06bde1b2d5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 34 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..99a818b8d4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ Scope + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ Scope + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..48fca98377 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c64_Scope[shape="box"label=<
Scope
Public Functions:
nested_scope()
if_scope()
while_scope()
for_scope()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7654e9e040 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 38 | +| sloc | 0 | 0 | 34 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 72 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..e23130c94b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| Scope | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..e88fc07c27 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,10 @@ + +Contract Scope ++--------------+-----------+ +| Function | Modifiers | ++--------------+-----------+ +| nested_scope | [] | +| if_scope | [] | +| while_scope | [] | +| for_scope | [] | ++--------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..8167fa1c7e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,12 @@ +Constructor and pure/view functions are not displayed + +Scope: ++----------------+-------------------+ +| Name | Use whenNotPaused | ++----------------+-------------------+ +| nested_scope() | | +| if_scope() | | +| while_scope() | | +| for_scope() | | ++----------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..3d81170baa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,10 @@ + +Contract Scope ++--------------+-------------------+ +| Function | require or assert | ++--------------+-------------------+ +| nested_scope | | +| if_scope | | +| while_scope | | +| for_scope | | ++--------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..2ecbbc7188 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,20 @@ +Contract Scope + Function Scope.nested_scope() (*) + Function Scope.if_scope() (*) + Expression: true + IRs: + CONDITION True + Function Scope.while_scope() (*) + Expression: true + IRs: + CONDITION True + Function Scope.for_scope() (*) + Expression: a_scope_0 < 10 + IRs: + TMP_0(bool) = a_scope_0 < 10 + CONDITION TMP_0 + Expression: a_scope_0 ++ + IRs: + TMP_1(uint256) := a_scope_0(uint256) + a_scope_0(uint256) = a_scope_0 (c)+ 1 + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..99b75f1862 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +Scope: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..cddf8c3103 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_scope_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,11 @@ + +Contract Scope ++--------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++--------------+-------------------------+--------------------------+ +| nested_scope | [] | [] | +| if_scope | [] | [] | +| while_scope | [] | [] | +| for_scope | [] | [] | ++--------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..2188c68369 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,27 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/struct-0.4.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + - S1 + - Declaration: struct S1 { + uint a; + int b; + mapping(address => bool) c; + } + - Implementation: tests/ast-parsing/struct-0.4.0.sol#2-6 (5 - 6) + - References: [] + - S2 + - Declaration: struct S2 { + bool d; + } + - Implementation: tests/ast-parsing/struct-0.4.0.sol#8-10 (5 - 6) + - References: [] + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..45060c9912 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 10 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..86eba8d3f4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c27_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..f8db37c75e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 11 | +| sloc | 0 | 0 | 10 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 21 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..4b20a149d0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,27 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/struct-0.6.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + - S1 + - Declaration: struct S1 { + uint a; + int b; + mapping(address => bool) c; + } + - Implementation: tests/ast-parsing/struct-0.6.0.sol#2-6 (5 - 6) + - References: [] + - S2 + - Declaration: struct S2 { + bool d; + } + - Implementation: tests/ast-parsing/struct-0.6.0.sol#8-10 (5 - 6) + - References: [] + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..2a92db940a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..1124fd063f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 13 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..56f619e956 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c13_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..8850c3cc4d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 15 | +| sloc | 0 | 0 | 13 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 28 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_struct_0_6_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..3da643defa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/throw-0.5.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..a0f9e91ef3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 1 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..523e148cfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c3_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7ad904ffae --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 1 | +| sloc | 0 | 0 | 1 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 2 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..3da643defa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/throw-0.5.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..2a92db940a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..a0f9e91ef3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 1 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..b6fcf0805b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c1_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7ad904ffae --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 1 | +| sloc | 0 | 0 | 1 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 2 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_throw_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..37b4bc4a08 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/top-level-0.4.0.sol#2 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..a0f9e91ef3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 1 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..523e148cfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c3_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..90f41895e3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 2 | +| sloc | 0 | 0 | 1 | +| cloc | 0 | 0 | 1 | +| Total | 0 | 0 | 4 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..eb29b1f892 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,7 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..92f907cc2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1 @@ +No contract found diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..5007c405a6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,3 @@ + +# Contracts + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..2a1ca6e96e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,20 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": {}, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..92f907cc2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1 @@ +No contract found diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..6802af662f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,13 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 6 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..5185118e97 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,6 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..23c2b9f30d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,4 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..ce5e592870 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 8 | +| sloc | 0 | 0 | 6 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 14 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..92f907cc2d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1 @@ +No contract found diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..8e33777cc5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,2 @@ +Constructor and pure/view functions are not displayed + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..7aceb1fc49 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,3 @@ +Top level functions + Function toFixed() + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_0_7_4_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..5bbc126982 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/top-level-import-0.4.0.sol#2 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..a0f9e91ef3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 1 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..523e148cfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c3_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..90f41895e3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 2 | +| sloc | 0 | 0 | 1 | +| cloc | 0 | 0 | 1 | +| Total | 0 | 0 | 4 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..4a6471d82a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,21 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_13_C { +label = "C" +"13_f" [label="f"] +"13_f" -> "13_min" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_13_C { +label = "C" +"13_f" [label="f"] +"13_f" -> "13_min" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..6b89f423a3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,15 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +Helper.min(0,1) + +IRs: +TMP_0(uint256) = INTERNAL_CALL, min(uint256,uint256)(0,1)"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..5e49435671 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..940314b816 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/top-level-import-0.7.1.sol#3 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/top-level-import-0.7.1.sol#6 (14 - 16) + - Implementation(s): ['tests/ast-parsing/top-level-import-0.7.1.sol#6-8 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..638e07e356 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,48 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..42d32ecb78 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+---------------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+---------------------+-----------------------+ +| f() | public | [] | [] | [] | ['min'] | ['Helper.min(0,1)'] | 1 | ++----------+------------+-----------+------+-------+----------------+---------------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..2912b773e6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 1 | 1 | 2 | 2 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 3 | 3 | 2 | 5 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 2 | 0 | 0.001 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..1124fd063f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 13 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..2b4195d5da --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c13_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..4c85b5b80c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 21 | +| sloc | 0 | 0 | 13 | +| cloc | 0 | 0 | 2 | +| Total | 0 | 0 | 36 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..99c06bc980 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,38 @@ +Contract C + Function C.f() (*) + Expression: Helper.min(0,1) + IRs: + TMP_0(uint256) = INTERNAL_CALL, min(uint256,uint256)(0,1) +Top level functions + Function min(uint256,uint256) + Expression: x < y + IRs: + TMP_1(bool) = x < y + CONDITION TMP_1 + Expression: x + IRs: + RETURN x + Expression: y + IRs: + RETURN y + Function sum(uint256[]) + Expression: i = 0 + IRs: + i(uint256) := 0(uint256) + Expression: i < items.length + IRs: + REF_0 -> LENGTH items + TMP_2(bool) = i < REF_0 + CONDITION TMP_2 + Expression: s += items[i] + IRs: + REF_1(uint256) -> items[i] + s(uint256) = s (c)+ REF_1 + Expression: i ++ + IRs: + TMP_3(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Expression: s + IRs: + RETURN s + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_0_7_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..3adb5fb974 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/top-level-import-bis-0.4.0.sol#2 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..a0f9e91ef3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 1 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..523e148cfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c3_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..90f41895e3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 2 | +| sloc | 0 | 0 | 1 | +| cloc | 0 | 0 | 1 | +| Total | 0 | 0 | 4 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..2319aaa389 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,21 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_19_C { +label = "C" +"19_f" [label="f"] +"19_f" -> "19__require" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_19_C { +label = "C" +"19_f" [label="f"] +"19_f" -> "19__require" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..134afb3923 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,17 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +Helper._require(msg.sender != address(0),42) + +IRs: +TMP_0 = CONVERT 0 to address +TMP_1(bool) = msg.sender != TMP_0 +INTERNAL_CALL, _require(bool,uint256)(TMP_1,42)"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..01e3a7b0a5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 1 | 0 | 0 | +| TOTAL | 0 | 1 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..33234ba130 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (external) + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..5e49435671 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..96c008b532 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/top-level-import-bis-0.7.1.sol#3 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/top-level-import-bis-0.7.1.sol#4 (12 - 14) + - Implementation(s): ['tests/ast-parsing/top-level-import-bis-0.7.1.sol#4-6 (3 - 4)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..eac46fc700 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,52 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": { + "C": [ + "f()" + ] + }, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "address" + } + ], + [ + { + "value": "42", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..798b0cbe21 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+----------------+-------+----------------+--------------------------------------------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+----------------+-------+----------------+--------------------------------------------------+-----------------------+ +| f() | external | [] | ['msg.sender'] | [] | ['_require'] | ['Helper._require(msg.sender != address(0),42)'] | 1 | ++----------+------------+-----------+----------------+-------+----------------+--------------------------------------------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..12ab0d9d7b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 3 | 3 | 4 | 4 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 7 | 7 | 13 | 20 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 2 | 29 | 2 | 0.003 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..927e842dca --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 9 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..0248efaf7a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c19_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..2b6a88e56d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 11 | +| sloc | 0 | 0 | 9 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 20 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..8dca9fa173 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,17 @@ +Contract C + Function C.f() (*) + Expression: Helper._require(msg.sender != address(0),42) + IRs: + TMP_0 = CONVERT 0 to address + TMP_1(bool) = msg.sender != TMP_0 + INTERNAL_CALL, _require(bool,uint256)(TMP_1,42) +Top level functions + Function _require(bool,uint256) + Expression: ! condition + IRs: + TMP_3 = UnaryType.BANG condition + CONDITION TMP_3 + Expression: revert()() + IRs: + TMP_4(None) = SOLIDITY_CALL revert()() + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_import_bis_0_7_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..14dcebfbf7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/top-level-nested-import-0.4.0.sol#2 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..a0f9e91ef3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 1 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..523e148cfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c3_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..90f41895e3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 2 | +| sloc | 0 | 0 | 1 | +| cloc | 0 | 0 | 1 | +| Total | 0 | 0 | 4 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..767f41e3e8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,21 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_13_C { +label = "C" +"13_f" [label="f"] +"13_f" -> "13__require" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_13_C { +label = "C" +"13_f" [label="f"] +"13_f" -> "13__require" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..6f2d431297 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,15 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +Helper._require(true,1) + +IRs: +INTERNAL_CALL, _require(bool,uint256)(True,1)"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..5e49435671 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..a9401f10cf --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/top-level-nested-import-0.7.1.sol#3 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/top-level-nested-import-0.7.1.sol#6 (14 - 16) + - Implementation(s): ['tests/ast-parsing/top-level-nested-import-0.7.1.sol#6-8 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..5294ced508 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,48 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..554bf80431 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+-----------------------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+-----------------------------+-----------------------+ +| f() | public | [] | [] | [] | ['_require'] | ['Helper._require(true,1)'] | 1 | ++----------+------------+-----------+------+-------+----------------+-----------------------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..3f2552a7db --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 1 | 1 | 3 | 2 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 3 | 4 | 2 | 6 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 1 | 5 | 0 | 0.001 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..45060c9912 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 10 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..2b4195d5da --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c13_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..2559619e00 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 15 | +| sloc | 0 | 0 | 10 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 25 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..343004d24c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,15 @@ +Contract C + Function C.f() (*) + Expression: Helper._require(true,1) + IRs: + INTERNAL_CALL, _require(bool,uint256)(True,1) +Top level functions + Function _require(bool,uint256) + Expression: ! condition + IRs: + TMP_1 = UnaryType.BANG condition + CONDITION TMP_1 + Expression: revert()() + IRs: + TMP_2(None) = SOLIDITY_CALL revert()() + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_nested_import_0_7_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..8e14e69785 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipA.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..33c3ca4a30 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| A | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| A | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| A | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| A | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| A | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..0f61e51a48 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract A (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..3972f22091 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..ed88a26808 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# A + - Declaration: tests/ast-parsing/top_level_variable2-0.4.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..8cdb5e954e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "A": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..b38e31b421 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +A: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..87beeacf6d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract A +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..53ee1714d3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| A | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| A | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| A | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..a0f9e91ef3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 1 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..f88999182f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ A + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ A + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..6039d8c611 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c3_A[shape="box"label=<
A
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7ad904ffae --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 1 | +| sloc | 0 | 0 | 1 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 2 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..5e180d8d87 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| A | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..ce74598159 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract A ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..dea66196aa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +A: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..cc9c025c07 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract A ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..3cd393a528 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract A + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..9d4cdc4d67 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +A: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..29567aa30c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract A ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..be02a202c1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,33 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipT.call-graph.dot +Call Graph: tmp.zipT2.call-graph.dot + +strict digraph { +subgraph cluster_35_T { +label = "T" +"35_g" [label="g"] +"35_g" -> "35_f" +}subgraph cluster_10_T2 { +label = "T2" +"10_h" [label="h"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_35_T { +label = "T" +"35_g" [label="g"] +"35_g" -> "35_f" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_10_T2 { +label = "T2" +"10_h" [label="h"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..a5a719600e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,21 @@ +Export tmp.zip-T-g().dot +Export tmp.zip-T2-h(uint256[10]).dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +f() + +IRs: +TMP_0(uint256) = INTERNAL_CALL, f()()"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ddd7f989ff --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| T | 0 | 0 | 0 | +| T2 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| T | 1 | 0 | 0 | 0 | +| T2 | 1 | 0 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| T | 1 | 0 | 0 | +| T2 | 1 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| T | 1 | 1 | 1 | +| T2 | 1 | 1 | 1 | +| TOTAL | 2 | 2 | 2 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| T | 0 | 1 | 0 | 0 | 0 | +| T2 | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..4378ac7977 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,9 @@ + ++ Contract T (Most derived contract) + - From T + - g() (public) + ++ Contract T2 (Most derived contract) + - From T2 + - h(uint256[10]) (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..248f54e324 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,35 @@ + +Contract T ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function g() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract T ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function g() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Contract T2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function h(uint256[10]) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..f4b8c1f49f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,31 @@ + +# Contracts +# T + - Declaration: tests/ast-parsing/top_level_variable-0.8.0.sol#11 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - T.g() + - Declaration: tests/ast-parsing/top_level_variable-0.8.0.sol#12 (14 - 16) + - Implementation(s): ['tests/ast-parsing/top_level_variable-0.8.0.sol#12-14 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# T2 + - Declaration: tests/ast-parsing/top_level_variable2-0.8.0.sol#3 (10 - 13) + - Implementation(s): [] + - References: [] + + ## Function + - T2.h(uint256[10]) + - Declaration: tests/ast-parsing/top_level_variable2-0.8.0.sol#5 (14 - 16) + - Implementation(s): ['tests/ast-parsing/top_level_variable2-0.8.0.sol#5-6 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..254f114e8e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,5 @@ +Export tmp.zip-T-g().dot +Export tmp.zip-T2-h(uint256[10]).dot + +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d803fd0da7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,40 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "T": [ + "g()" + ], + "T2": [ + "h(uint256[])" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "T": { + "g()": { + "impacts": [], + "is_impacted_by": [] + } + }, + "T2": { + "h(uint256[])": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..ea90643398 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,15 @@ + +T: ++------+------------+ +| Name | ID | ++------+------------+ +| g() | 0xe2179b8e | ++------+------------+ + +T2: ++--------------+------------+ +| Name | ID | ++--------------+------------+ +| h(uint256[]) | 0x40dcbb08 | ++--------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..1e5d065ad8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,31 @@ + +Contract T +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| g() | public | [] | [] | [] | ['f'] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract T2 +Contract vars: [] +Inheritance:: [] + ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| h(uint256[10]) | public | [] | [] | [] | [] | [] | 1 | ++----------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..121ceaa7b7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 17 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..a665295eec --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ T + ++ T2 + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ T + ++ T2 + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..62880cccb3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c35_T[shape="box"label=<
T
Public Functions:
g()
>]; + +c10_T2[shape="box"label=<
T2
Public Functions:
h(uint256[10])
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..c91bb7e13e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 24 | +| sloc | 0 | 0 | 17 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 41 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..892f96ca62 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| T | 0 | 0 | 0.00 | 0.00 | +| T2 | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..0815317257 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,13 @@ + +Contract T ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| g | [] | ++----------+-----------+ +Contract T2 ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| h | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..1994a14159 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,16 @@ +Constructor and pure/view functions are not displayed + +T: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| g() | | ++------+-------------------+ + +T2: ++--------------+-------------------+ +| Name | Use whenNotPaused | ++--------------+-------------------+ +| h(uint256[]) | | ++--------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..9e142ee9e1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,13 @@ + +Contract T ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| g | | ++----------+-------------------+ +Contract T2 ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| h | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..fd908c0f31 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,13 @@ +Contract T + Function T.g() (*) + Expression: f() + IRs: + TMP_0(uint256) = INTERNAL_CALL, f()() +Contract T2 + Function T2.h(uint256[10]) (*) +Top level functions + Function f() + Expression: A + IRs: + RETURN A + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..03d46dbb22 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,13 @@ + +T: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +T2: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f0c60a8350 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable2_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,15 @@ + +Contract T ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| g | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract T2 ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| h | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..8e14e69785 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipA.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..33c3ca4a30 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| A | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| A | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| A | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| A | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| A | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..0f61e51a48 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract A (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..3972f22091 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..7146b844c0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# A + - Declaration: tests/ast-parsing/top_level_variable-0.4.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..8cdb5e954e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "A": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..b38e31b421 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +A: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..87beeacf6d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract A +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..53ee1714d3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| A | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| A | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| A | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..a0f9e91ef3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 1 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..f88999182f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ A + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ A + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..6039d8c611 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c3_A[shape="box"label=<
A
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7ad904ffae --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 1 | +| sloc | 0 | 0 | 1 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 2 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..5e180d8d87 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| A | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..ce74598159 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract A ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..dea66196aa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +A: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..cc9c025c07 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract A ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..3cd393a528 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract A + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..9d4cdc4d67 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +A: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..29567aa30c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract A ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..3d778442d8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,21 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipT.call-graph.dot + +strict digraph { +subgraph cluster_24_T { +label = "T" +"24_g" [label="g"] +"24_g" -> "24_f" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_24_T { +label = "T" +"24_g" [label="g"] +"24_g" -> "24_f" +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..e3ee1b0fc4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,15 @@ +Export tmp.zip-T-g().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +f() + +IRs: +TMP_0(uint256) = INTERNAL_CALL, f()()"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..db8c4cc93d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| T | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| T | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| T | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| T | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| T | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..4c74c0f840 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract T (Most derived contract) + - From T + - g() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..39d3c385a7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,12 @@ + +Contract T ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function g() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..2e861c71cd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# T + - Declaration: tests/ast-parsing/top_level_variable-0.8.0.sol#11 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - T.g() + - Declaration: tests/ast-parsing/top_level_variable-0.8.0.sol#12 (14 - 16) + - Implementation(s): ['tests/ast-parsing/top_level_variable-0.8.0.sol#12-14 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..78d8337d28 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-T-g().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..a535039d2c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,31 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "T": [ + "g()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "T": { + "g()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..0eadb71e44 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +T: ++------+------------+ +| Name | ID | ++------+------------+ +| g() | 0xe2179b8e | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..e4d84d81ed --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract T +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| g() | public | [] | [] | [] | ['f'] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..27782a9f02 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 12 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..0f9cb336c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ T + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ T + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..4e1eb2adb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c24_T[shape="box"label=<
T
Public Functions:
g()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..f45180fc7e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 17 | +| sloc | 0 | 0 | 12 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 29 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..62cc17ca95 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| T | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..2b6a421e45 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract T ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| g | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..a18ea8ba94 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +T: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| g() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f6bce524d0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract T ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| g | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..ae8a821546 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,11 @@ +Contract T + Function T.g() (*) + Expression: f() + IRs: + TMP_0(uint256) = INTERNAL_CALL, f()() +Top level functions + Function f() + Expression: A + IRs: + RETURN A + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..f8d2a339a0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +T: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..c5a609e942 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_top_level_variable_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract T ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| g | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..85e51e73be --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/e2e/solc_parsing/test_data/trycatch-0.4.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..a0f9e91ef3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 1 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..523e148cfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c3_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..7ad904ffae --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 1 | +| sloc | 0 | 0 | 1 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 2 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..bfbe12f396 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,38 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipERC20.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_210_C { +label = "C" +"210_tryCatchContractDeployment" [label="tryCatchContractDeployment"] +"210_tryCatchFunctionCall" [label="tryCatchFunctionCall"] +}subgraph cluster_11_ERC20 { +label = "ERC20" +"11_balanceOf" [label="balanceOf"] +}subgraph cluster_solidity { +label = "[Solidity]" +"revert(string)" +"210_tryCatchFunctionCall" -> "revert(string)" +}"210_tryCatchContractDeployment" -> "11_balanceOf" +"210_tryCatchFunctionCall" -> "11_balanceOf" +} +strict digraph { +subgraph cluster_11_ERC20 { +label = "ERC20" +"11_balanceOf" [label="balanceOf"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_210_C { +label = "C" +"210_tryCatchContractDeployment" [label="tryCatchContractDeployment"] +"210_tryCatchFunctionCall" [label="tryCatchFunctionCall"] +}subgraph cluster_solidity { +label = "[Solidity]" +"revert(string)" +"210_tryCatchFunctionCall" -> "revert(string)" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8550ffffc2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,262 @@ +Export tmp.zip-ERC20-balanceOf(address).dot +Export tmp.zip-C-tryCatchFunctionCall().dot +Export tmp.zip-C-tryCatchContractDeployment().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +0 + +IRs: +RETURN 0"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: TRY 2 + +EXPRESSION: +balance = ERC20(msg.sender).balanceOf(address(this)) + +IRs: +TMP_0 = CONVERT msg.sender to ERC20 +TMP_1 = CONVERT this to address +TMP_2(uint256) = HIGH_LEVEL_CALL, dest:TMP_0(ERC20), function:balanceOf, arguments:['TMP_1'] +balance(uint256) := TMP_2(uint256)"]; +2->3; +2->5; +2->7; +3[label="Node Type: CATCH 3 +"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +actualBalance = balance + +IRs: +actualBalance(uint256) := balance(uint256)"]; +4->7; +5[label="Node Type: CATCH 5 +"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +revert(string)(err) + +IRs: +TMP_3(None) = SOLIDITY_CALL revert(string)(err)"]; +6->7; +7[label="Node Type: TRY 7 + +EXPRESSION: +balance_scope_0 = ERC20(msg.sender).balanceOf(address(this)) + +IRs: +TMP_4 = CONVERT msg.sender to ERC20 +TMP_5 = CONVERT this to address +TMP_6(uint256) = HIGH_LEVEL_CALL, dest:TMP_4(ERC20), function:balanceOf, arguments:['TMP_5'] +balance_scope_0(uint256) := TMP_6(uint256)"]; +7->8; +7->10; +7->12; +8[label="Node Type: CATCH 8 +"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +actualBalance = balance_scope_0 + +IRs: +actualBalance(uint256) := balance_scope_0(uint256)"]; +9->12; +10[label="Node Type: CATCH 10 +"]; +10->11; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +revert(string)(string(err_scope_1)) + +IRs: +TMP_7 = CONVERT err_scope_1 to string +TMP_8(None) = SOLIDITY_CALL revert(string)(TMP_7)"]; +11->12; +12[label="Node Type: TRY 12 + +EXPRESSION: +balance_scope_2 = ERC20(msg.sender).balanceOf(address(this)) + +IRs: +TMP_9 = CONVERT msg.sender to ERC20 +TMP_10 = CONVERT this to address +TMP_11(uint256) = HIGH_LEVEL_CALL, dest:TMP_9(ERC20), function:balanceOf, arguments:['TMP_10'] +balance_scope_2(uint256) := TMP_11(uint256)"]; +12->13; +12->15; +12->17; +12->19; +13[label="Node Type: CATCH 13 +"]; +13->14; +14[label="Node Type: EXPRESSION 14 + +EXPRESSION: +actualBalance = balance_scope_2 + +IRs: +actualBalance(uint256) := balance_scope_2(uint256)"]; +14->19; +15[label="Node Type: CATCH 15 +"]; +15->16; +16[label="Node Type: EXPRESSION 16 + +EXPRESSION: +revert(string)(err_scope_3) + +IRs: +TMP_12(None) = SOLIDITY_CALL revert(string)(err_scope_3)"]; +16->19; +17[label="Node Type: CATCH 17 +"]; +17->18; +18[label="Node Type: EXPRESSION 18 + +EXPRESSION: +revert(string)(string(err_scope_4)) + +IRs: +TMP_13 = CONVERT err_scope_4 to string +TMP_14(None) = SOLIDITY_CALL revert(string)(TMP_13)"]; +18->19; +19[label="Node Type: TRY 19 + +EXPRESSION: +ERC20(msg.sender).balanceOf(address(this)) + +IRs: +TMP_15 = CONVERT msg.sender to ERC20 +TMP_16 = CONVERT this to address +TMP_17(uint256) = HIGH_LEVEL_CALL, dest:TMP_15(ERC20), function:balanceOf, arguments:['TMP_16'] "]; +19->20; +19->21; +19->23; +20[label="Node Type: CATCH 20 +"]; +20->23; +21[label="Node Type: CATCH 21 +"]; +21->22; +22[label="Node Type: EXPRESSION 22 + +EXPRESSION: +actualBalance = 0 + +IRs: +actualBalance(uint256) := 0(uint256)"]; +22->23; +23[label="Node Type: TRY 23 + +EXPRESSION: +balance_scope_5 = ERC20(msg.sender).balanceOf(address(this)) + +IRs: +TMP_18 = CONVERT msg.sender to ERC20 +TMP_19 = CONVERT this to address +TMP_20(uint256) = HIGH_LEVEL_CALL, dest:TMP_18(ERC20), function:balanceOf, arguments:['TMP_19'] +balance_scope_5(uint256) := TMP_20(uint256)"]; +23->24; +23->32; +24[label="Node Type: CATCH 24 +"]; +24->25; +25[label="Node Type: NEW VARIABLE 25 +"]; +25->28; +26[label="Node Type: BEGIN_LOOP 26 +"]; +26->29; +27[label="Node Type: END_LOOP 27 +"]; +28[label="Node Type: NEW VARIABLE 28 +"]; +28->26; +29[label="Node Type: IF_LOOP 29 + +EXPRESSION: +i < balance_scope_5 + +IRs: +TMP_21(bool) = i < balance_scope_5 +CONDITION TMP_21"]; +29->30[label="True"]; +29->27[label="False"]; +30[label="Node Type: EXPRESSION 30 + +EXPRESSION: +c ++ + +IRs: +TMP_22(uint256) := c(uint256) +c(uint256) = c (c)+ 1"]; +30->31; +31[label="Node Type: EXPRESSION 31 + +EXPRESSION: +i ++ + +IRs: +TMP_23(uint256) := i(uint256) +i(uint256) = i (c)+ 1"]; +31->29; +32[label="Node Type: CATCH 32 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: TRY 1 + +EXPRESSION: +deployed = new ERC20() + +IRs: +TMP_25(ERC20) = new ERC20() +deployed(ERC20) := TMP_25(ERC20)"]; +1->2; +1->6; +2[label="Node Type: CATCH 2 +"]; +2->3; +3[label="Node Type: TRY 3 + +EXPRESSION: +deployed.balanceOf(address(this)) + +IRs: +TMP_26 = CONVERT this to address +TMP_27(uint256) = HIGH_LEVEL_CALL, dest:deployed(ERC20), function:balanceOf, arguments:['TMP_26'] "]; +3->4; +3->5; +4[label="Node Type: CATCH 4 +"]; +5[label="Node Type: CATCH 5 +"]; +6[label="Node Type: CATCH 6 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..1820326722 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| ERC20 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| ERC20 | 1 | 0 | 0 | 0 | +| C | 2 | 0 | 0 | 0 | +| TOTAL | 3 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| ERC20 | 0 | 1 | 0 | +| C | 2 | 0 | 0 | +| TOTAL | 2 | 1 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| ERC20 | 0 | 0 | 0 | +| C | 2 | 2 | 2 | +| TOTAL | 2 | 2 | 2 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| ERC20 | 0 | 1 | 0 | 0 | 1 | +| C | 6 | 4 | 0 | 0 | 1 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..0f66cbec45 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,10 @@ + ++ Contract ERC20 (Most derived contract) + - From ERC20 + - balanceOf(address) (public) + ++ Contract C (Most derived contract) + - From C + - tryCatchContractDeployment() (public) + - tryCatchFunctionCall() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..3792d7983b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,53 @@ + +Contract ERC20 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function balanceOf(address) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract ERC20 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function balanceOf(address) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function tryCatchFunctionCall() ++-----------------+-------------------------------------------------------------------------+ +| Variable | Dependencies | ++-----------------+-------------------------------------------------------------------------+ +| actualBalance | ['balance', 'balance_scope_0', 'balance_scope_2', 'msg.sender', 'this'] | +| balance | ['msg.sender', 'this'] | +| err | [] | +| balance_scope_0 | ['msg.sender', 'this'] | +| err_scope_1 | [] | +| balance_scope_2 | ['msg.sender', 'this'] | +| err_scope_3 | [] | +| err_scope_4 | [] | +| balance_scope_5 | ['msg.sender', 'this'] | +| c | ['c'] | +| i | ['i'] | ++-----------------+-------------------------------------------------------------------------+ +Function tryCatchContractDeployment() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| deployed | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..fb30d310e8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,35 @@ + +# Contracts +# ERC20 + - Declaration: tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#1 (10 - 16) + - Implementation(s): [] + - References: ['tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#11 (13 - 30)', 'tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#17 (13 - 30)', 'tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#23 (13 - 30)', 'tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#31 (13 - 30)', 'tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#36 (13 - 30)', 'tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#46 (34 - 39)', 'tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#46 (17 - 22)', 'tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#46 (13 - 24)'] + + ## Function + - ERC20.balanceOf(address) + - Declaration: tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#2 (14 - 24) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#2-4 (5 - 6)'] + - References: ['tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#11 (13 - 55)', 'tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#17 (13 - 55)', 'tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#23 (13 - 55)', 'tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#31 (13 - 55)', 'tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#36 (13 - 55)', 'tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#47 (17 - 50)'] + + ## State variables + + ## Structures +# C + - Declaration: tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#7 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.tryCatchFunctionCall() + - Declaration: tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#8 (14 - 35) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#8-43 (5 - 6)'] + - References: [] + - C.tryCatchContractDeployment() + - Declaration: tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#45 (14 - 41) + - Implementation(s): ['tests/e2e/solc_parsing/test_data/trycatch-0.6.0.sol#45-55 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..1027ca70a1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,7 @@ +Export tmp.zip-ERC20-balanceOf(address).dot +Export tmp.zip-C-tryCatchFunctionCall().dot +Export tmp.zip-C-tryCatchContractDeployment().dot + +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d260f15a87 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,94 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": { + "C": [ + "tryCatchFunctionCall()" + ] + }, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "ERC20": [ + "balanceOf(address)" + ], + "C": [ + "tryCatchFunctionCall()", + "tryCatchContractDeployment()" + ] + }, + "constants_used": { + "ERC20": { + "balanceOf(address)": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + }, + "C": { + "tryCatchFunctionCall()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "tryCatchFunctionCall()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "ERC20": { + "balanceOf(address)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C": { + "tryCatchFunctionCall()": { + "impacts": [], + "is_impacted_by": [] + }, + "tryCatchContractDeployment()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": { + "C": [ + "tryCatchContractDeployment()", + "tryCatchFunctionCall()" + ] + }, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..6ccb3c4bc8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,16 @@ + +ERC20: ++--------------------+------------+ +| Name | ID | ++--------------------+------------+ +| balanceOf(address) | 0x70a08231 | ++--------------------+------------+ + +C: ++------------------------------+------------+ +| Name | ID | ++------------------------------+------------+ +| tryCatchFunctionCall() | 0x52acbfe6 | +| tryCatchContractDeployment() | 0x8c148d41 | ++------------------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..29b01219db --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,34 @@ + +Contract ERC20 +Contract vars: [] +Inheritance:: [] + ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| balanceOf(address) | public | [] | [] | [] | [] | [] | 1 | ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: [] +Inheritance:: [] + ++------------------------------+------------+-----------+------------------------+-------+--------------------+----------------------------------------------------------------------------------------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++------------------------------+------------+-----------+------------------------+-------+--------------------+----------------------------------------------------------------------------------------------+-----------------------+ +| tryCatchFunctionCall() | public | [] | ['msg.sender', 'this'] | [] | ['revert(string)'] | ['ERC20(msg.sender).balanceOf(address(this))', 'ERC20(msg.sender).balanceOf(address(this))'] | 11 | +| | | | | | | ['ERC20(msg.sender).balanceOf(address(this))', 'ERC20(msg.sender).balanceOf(address(this))'] | | +| | | | | | | ['ERC20(msg.sender).balanceOf(address(this))'] | | +| tryCatchContractDeployment() | public | [] | ['this'] | [] | [] | ['deployed.balanceOf(address(this))', 'new ERC20()'] | 1 | ++------------------------------+------------+-----------+------------------------+-------+--------------------+----------------------------------------------------------------------------------------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..7997591a54 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| ERC20 | 1 | 1 | 1 | 1 | +| C | 39 | 10 | 39 | 16 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| ERC20 | 2 | 2 | 0 | 2 | +| C | 26 | 78 | 97 | 367 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| ERC20 | 0 | 1 | 0 | 0.000 | +| C | 12 | 4468 | 248 | 0.090 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..509f6b98dc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 46 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..e9d13d22b6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ ERC20 + ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ ERC20 + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..12e29f5a73 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c11_ERC20[shape="box"label=<
ERC20
Public Functions:
balanceOf(address)
>]; + +c210_C[shape="box"label=<
C
Public Functions:
tryCatchFunctionCall()
tryCatchContractDeployment()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..06f9de5ebd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 56 | +| sloc | 0 | 0 | 46 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 102 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..351e405416 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| ERC20 | 1 | 0 | 0.00 | 0.00 | +| C | 0 | 1 | 1.00 | 1.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..1328750852 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,14 @@ + +Contract ERC20 ++-----------+-----------+ +| Function | Modifiers | ++-----------+-----------+ +| balanceOf | [] | ++-----------+-----------+ +Contract C ++----------------------------+-----------+ +| Function | Modifiers | ++----------------------------+-----------+ +| tryCatchFunctionCall | [] | +| tryCatchContractDeployment | [] | ++----------------------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..63f5df1adc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,16 @@ +Constructor and pure/view functions are not displayed + +ERC20: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +C: ++------------------------------+-------------------+ +| Name | Use whenNotPaused | ++------------------------------+-------------------+ +| tryCatchFunctionCall() | | +| tryCatchContractDeployment() | | ++------------------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..4380941a0b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,14 @@ + +Contract ERC20 ++-----------+-------------------+ +| Function | require or assert | ++-----------+-------------------+ +| balanceOf | | ++-----------+-------------------+ +Contract C ++----------------------------+-------------------+ +| Function | require or assert | ++----------------------------+-------------------+ +| tryCatchFunctionCall | | +| tryCatchContractDeployment | | ++----------------------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..79158cfb4e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,84 @@ +Contract ERC20 + Function ERC20.balanceOf(address) (*) + Expression: 0 + IRs: + RETURN 0 +Contract C + Function C.tryCatchFunctionCall() (*) + Expression: balance = ERC20(msg.sender).balanceOf(address(this)) + IRs: + TMP_0 = CONVERT msg.sender to ERC20 + TMP_1 = CONVERT this to address + TMP_2(uint256) = HIGH_LEVEL_CALL, dest:TMP_0(ERC20), function:balanceOf, arguments:['TMP_1'] + balance(uint256) := TMP_2(uint256) + Expression: actualBalance = balance + IRs: + actualBalance(uint256) := balance(uint256) + Expression: revert(string)(err) + IRs: + TMP_3(None) = SOLIDITY_CALL revert(string)(err) + Expression: balance_scope_0 = ERC20(msg.sender).balanceOf(address(this)) + IRs: + TMP_4 = CONVERT msg.sender to ERC20 + TMP_5 = CONVERT this to address + TMP_6(uint256) = HIGH_LEVEL_CALL, dest:TMP_4(ERC20), function:balanceOf, arguments:['TMP_5'] + balance_scope_0(uint256) := TMP_6(uint256) + Expression: actualBalance = balance_scope_0 + IRs: + actualBalance(uint256) := balance_scope_0(uint256) + Expression: revert(string)(string(err_scope_1)) + IRs: + TMP_7 = CONVERT err_scope_1 to string + TMP_8(None) = SOLIDITY_CALL revert(string)(TMP_7) + Expression: balance_scope_2 = ERC20(msg.sender).balanceOf(address(this)) + IRs: + TMP_9 = CONVERT msg.sender to ERC20 + TMP_10 = CONVERT this to address + TMP_11(uint256) = HIGH_LEVEL_CALL, dest:TMP_9(ERC20), function:balanceOf, arguments:['TMP_10'] + balance_scope_2(uint256) := TMP_11(uint256) + Expression: actualBalance = balance_scope_2 + IRs: + actualBalance(uint256) := balance_scope_2(uint256) + Expression: revert(string)(err_scope_3) + IRs: + TMP_12(None) = SOLIDITY_CALL revert(string)(err_scope_3) + Expression: revert(string)(string(err_scope_4)) + IRs: + TMP_13 = CONVERT err_scope_4 to string + TMP_14(None) = SOLIDITY_CALL revert(string)(TMP_13) + Expression: ERC20(msg.sender).balanceOf(address(this)) + IRs: + TMP_15 = CONVERT msg.sender to ERC20 + TMP_16 = CONVERT this to address + TMP_17(uint256) = HIGH_LEVEL_CALL, dest:TMP_15(ERC20), function:balanceOf, arguments:['TMP_16'] + Expression: actualBalance = 0 + IRs: + actualBalance(uint256) := 0(uint256) + Expression: balance_scope_5 = ERC20(msg.sender).balanceOf(address(this)) + IRs: + TMP_18 = CONVERT msg.sender to ERC20 + TMP_19 = CONVERT this to address + TMP_20(uint256) = HIGH_LEVEL_CALL, dest:TMP_18(ERC20), function:balanceOf, arguments:['TMP_19'] + balance_scope_5(uint256) := TMP_20(uint256) + Expression: i < balance_scope_5 + IRs: + TMP_21(bool) = i < balance_scope_5 + CONDITION TMP_21 + Expression: c ++ + IRs: + TMP_22(uint256) := c(uint256) + c(uint256) = c (c)+ 1 + Expression: i ++ + IRs: + TMP_23(uint256) := i(uint256) + i(uint256) = i (c)+ 1 + Function C.tryCatchContractDeployment() (*) + Expression: deployed = new ERC20() + IRs: + TMP_25(ERC20) = new ERC20() + deployed(ERC20) := TMP_25(ERC20) + Expression: deployed.balanceOf(address(this)) + IRs: + TMP_26 = CONVERT this to address + TMP_27(uint256) = HIGH_LEVEL_CALL, dest:deployed(ERC20), function:balanceOf, arguments:['TMP_26'] + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..8fd49e2e98 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,13 @@ + +ERC20: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..e4554dfbf9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_trycatch_0_6_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,16 @@ + +Contract ERC20 ++-----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-----------+-------------------------+--------------------------+ +| balanceOf | [] | [] | ++-----------+-------------------------+--------------------------+ + +Contract C ++----------------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------------------------+-------------------------+--------------------------+ +| tryCatchFunctionCall | [] | [] | +| tryCatchContractDeployment | [] | [] | ++----------------------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..e383fcffb3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_39_C { +label = "C" +"39_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_39_C { +label = "C" +"39_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..87484f7f32 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,25 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +(a,b) +"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +(a,b) +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..b5ba222cdb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,14 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..64ad2e11c8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/tupleexpression-0.4.24.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/tupleexpression-0.4.24.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/tupleexpression-0.4.24.sol#2-7 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..b0b8ede01c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,31 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..69f52dafb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..f94666c3f8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 8 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..7b11a4822e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c39_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..4d713468a6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 8 | +| sloc | 0 | 0 | 8 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 16 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..8a7e019520 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,7 @@ +Contract C + Function C.f() (*) + Expression: (a,b) + IRs: + Expression: (a,b) + IRs: + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_4_24_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..3350d9ee20 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_23_C { +label = "C" +"23_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_23_C { +label = "C" +"23_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..ec455191c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,31 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +(a,b) +"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +(a,b) +"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +(type(),type()) +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..b5ba222cdb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,14 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..934600e0c2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/tupleexpression-0.5.3.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/tupleexpression-0.5.3.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/tupleexpression-0.5.3.sol#2-8 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..cce4d82f83 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,31 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..69f52dafb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 1 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..927e842dca --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 9 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..50da513793 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c23_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..b0d78e6106 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 9 | +| sloc | 0 | 0 | 9 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 18 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..ffd69d0033 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,9 @@ +Contract C + Function C.f() (*) + Expression: (a,b) + IRs: + Expression: (a,b) + IRs: + Expression: (type(),type()) + IRs: + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_tupleexpression_0_5_3_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..62c397cecd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_93_C { +label = "C" +"93_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_93_C { +label = "C" +"93_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..a86217e024 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,84 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +a ++ + +IRs: +TMP_0(uint256) := a(uint256) +a(uint256) = a + 1"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +a -- + +IRs: +TMP_1(uint256) := a(uint256) +a(uint256) = a - 1"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +++ a + +IRs: +a(uint256) = a + 1"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +-- a + +IRs: +a(uint256) = a - 1"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +~ a + +IRs: +TMP_2 = UnaryType.TILD a "]; +6->7; +7[label="Node Type: NEW VARIABLE 7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +i = - 5 + +IRs: +TMP_3(uint256) = 0 - 5 +i(int256) := TMP_3(uint256)"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +delete m[0] + +IRs: +REF_0(uint256) -> m[0] +m = delete REF_0 "]; +9->10; +10[label="Node Type: NEW VARIABLE 10 +"]; +10->11; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +! b + +IRs: +TMP_4 = UnaryType.BANG b "]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..5f52fb9a94 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..516c90ff29 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,17 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| m | ['m'] | ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | ['a'] | +| i | [] | +| b | [] | +| C.m | ['m'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..3edfa1da6f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,21 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/unaryexpression-0.5.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/unaryexpression-0.5.0.sol#4 (14 - 16) + - Implementation(s): ['tests/ast-parsing/unaryexpression-0.5.0.sol#4-20 (5 - 6)'] + - References: [] + + ## State variables + - m + - Declaration: tests/ast-parsing/unaryexpression-0.5.0.sol#2 (27 - 29) + - Implementation: tests/ast-parsing/unaryexpression-0.5.0.sol#2 (5 - 28) + - References: ['tests/ast-parsing/unaryexpression-0.5.0.sol#16 (16 - 17)'] + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..06e91e002c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,93 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "115792089237316195423570985008687907853269984665640564039457584007913129639931", + "type": "uint256" + } + ], + [ + { + "value": "5", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.SUBTRACTION": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "5", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [ + "f()" + ], + "is_impacted_by": [ + "f()" + ] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..29d8d8f5e6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: ['m'] +Inheritance:: [] + ++----------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | ['m'] | ['m'] | [] | [] | 1 | ++----------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..74c64e13e1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 12 | 7 | 24 | 8 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 15 | 36 | 44 | 141 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 10 | 1477 | 82 | 0.043 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..ea98958ae3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 16 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..7658bedabc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c93_C[shape="box"label=<
C
Public Functions:
f()
Private Variables:
m
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..859aaf908c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 21 | +| sloc | 0 | 0 | 16 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 37 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..31ae3a5d45 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,31 @@ +Contract C + Function C.f() (*) + Expression: a ++ + IRs: + TMP_0(uint256) := a(uint256) + a(uint256) = a + 1 + Expression: a -- + IRs: + TMP_1(uint256) := a(uint256) + a(uint256) = a - 1 + Expression: ++ a + IRs: + a(uint256) = a + 1 + Expression: -- a + IRs: + a(uint256) = a - 1 + Expression: ~ a + IRs: + TMP_2 = UnaryType.TILD a + Expression: i = - 5 + IRs: + TMP_3(uint256) = 0 - 5 + i(int256) := TMP_3(uint256) + Expression: delete m[0] + IRs: + REF_0(uint256) -> m[0] + m = delete REF_0 + Expression: ! b + IRs: + TMP_4 = UnaryType.BANG b + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..c08e5cd8b4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,8 @@ + +C: ++------+-----------------------------+------+--------+ +| Name | Type | Slot | Offset | ++------+-----------------------------+------+--------+ +| C.m | mapping(uint256 => uint256) | 0 | 0 | ++------+-----------------------------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..999a34fbde --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | ['m'] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..d9d7ec92dd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_46_C { +label = "C" +"46_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_46_C { +label = "C" +"46_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..4a1247654b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,84 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +a ++ + +IRs: +TMP_0(uint256) := a(uint256) +a(uint256) = a (c)+ 1"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +a -- + +IRs: +TMP_1(uint256) := a(uint256) +a(uint256) = a (c)- 1"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +++ a + +IRs: +a(uint256) = a (c)+ 1"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +-- a + +IRs: +a(uint256) = a (c)- 1"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +~ a + +IRs: +TMP_2 = UnaryType.TILD a "]; +6->7; +7[label="Node Type: NEW VARIABLE 7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +i = - 5 + +IRs: +TMP_3(uint256) = 0 (c)- 5 +i(int256) := TMP_3(uint256)"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +delete m[0] + +IRs: +REF_0(uint256) -> m[0] +m = delete REF_0 "]; +9->10; +10[label="Node Type: NEW VARIABLE 10 +"]; +10->11; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +! b + +IRs: +TMP_4 = UnaryType.BANG b "]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..5f52fb9a94 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..516c90ff29 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,17 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| m | ['m'] | ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | ['a'] | +| i | [] | +| b | [] | +| C.m | ['m'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..3edfa1da6f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,21 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/unaryexpression-0.5.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/unaryexpression-0.5.0.sol#4 (14 - 16) + - Implementation(s): ['tests/ast-parsing/unaryexpression-0.5.0.sol#4-20 (5 - 6)'] + - References: [] + + ## State variables + - m + - Declaration: tests/ast-parsing/unaryexpression-0.5.0.sol#2 (27 - 29) + - Implementation: tests/ast-parsing/unaryexpression-0.5.0.sol#2 (5 - 28) + - References: ['tests/ast-parsing/unaryexpression-0.5.0.sol#16 (16 - 17)'] + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..9118a643dc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,93 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "115792089237316195423570985008687907853269984665640564039457584007913129639931", + "type": "uint256" + } + ], + [ + { + "value": "5", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.ADDITION": [ + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "BinaryType.SUBTRACTION": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "5", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [ + "f()" + ], + "is_impacted_by": [ + "f()" + ] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..29d8d8f5e6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: ['m'] +Inheritance:: [] + ++----------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | ['m'] | ['m'] | [] | [] | 1 | ++----------+------------+-----------+-------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..74c64e13e1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 12 | 7 | 24 | 8 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 15 | 36 | 44 | 141 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 10 | 1477 | 82 | 0.043 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..ea98958ae3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 16 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..702897b63b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c46_C[shape="box"label=<
C
Public Functions:
f()
Private Variables:
m
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..859aaf908c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 21 | +| sloc | 0 | 0 | 16 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 37 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..0aa327fe5c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,31 @@ +Contract C + Function C.f() (*) + Expression: a ++ + IRs: + TMP_0(uint256) := a(uint256) + a(uint256) = a (c)+ 1 + Expression: a -- + IRs: + TMP_1(uint256) := a(uint256) + a(uint256) = a (c)- 1 + Expression: ++ a + IRs: + a(uint256) = a (c)+ 1 + Expression: -- a + IRs: + a(uint256) = a (c)- 1 + Expression: ~ a + IRs: + TMP_2 = UnaryType.TILD a + Expression: i = - 5 + IRs: + TMP_3(uint256) = 0 (c)- 5 + i(int256) := TMP_3(uint256) + Expression: delete m[0] + IRs: + REF_0(uint256) -> m[0] + m = delete REF_0 + Expression: ! b + IRs: + TMP_4 = UnaryType.BANG b + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..c08e5cd8b4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,8 @@ + +C: ++------+-----------------------------+------+--------+ +| Name | Type | Slot | Offset | ++------+-----------------------------+------+--------+ +| C.m | mapping(uint256 => uint256) | 0 | 0 | ++------+-----------------------------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..999a34fbde --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unaryexpression_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | ['m'] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..1bf44ff41e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,13 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..69fc1402b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 0 | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adff2e8b11 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,3 @@ + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..573e784e0d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..720ed67a86 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,13 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/unchecked-0.4.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d69be25b0e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,22 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..546fa5d60f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,7 @@ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..65f43d861c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,15 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..b779e10b39 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..cacc394bd7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 2 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..523e148cfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c3_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..66b9274a4f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 13 | +| sloc | 0 | 0 | 2 | +| cloc | 0 | 0 | 11 | +| Total | 0 | 0 | 26 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..13c9b6b1ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..afb909dfc9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,6 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..cb9a6c8780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,2 @@ +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..f69a3509c9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_4_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..8b2c875e83 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,21 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_30_C { +label = "C" +"30_f" [label="f"] +"30_g" [label="g"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_30_C { +label = "C" +"30_f" [label="f"] +"30_g" [label="g"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..962ccb2f27 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,31 @@ +Export tmp.zip-C-f(uint256,uint256).dot +Export tmp.zip-C-g(uint256,uint256).dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +a - b + +IRs: +TMP_0(uint256) = a - b +RETURN TMP_0"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +a - b + +IRs: +TMP_1(uint256) = a (c)- b +RETURN TMP_1"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..5bd932495c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 2 | 0 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 0 | 0 | 2 | +| TOTAL | 0 | 0 | 2 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 2 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..adb77ad0dd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,6 @@ + ++ Contract C (Most derived contract) + - From C + - f(uint256,uint256) (public) + - g(uint256,uint256) (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..f2ec7c3f8d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,23 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | +| | [] | ++----------+--------------+ +Function g(uint256,uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| b | [] | +| | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..d7f33e1eaa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,21 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/unchecked-0.8.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f(uint256,uint256) + - Declaration: tests/ast-parsing/unchecked-0.8.0.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/unchecked-0.8.0.sol#2-5 (5 - 6)'] + - References: [] + - C.g(uint256,uint256) + - Declaration: tests/ast-parsing/unchecked-0.8.0.sol#6 (14 - 16) + - Implementation(s): ['tests/ast-parsing/unchecked-0.8.0.sol#6-9 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..3d72b4b767 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,5 @@ +Export tmp.zip-C-f(uint256,uint256).dot +Export tmp.zip-C-g(uint256,uint256).dot + +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..f4509340e5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,36 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f(uint256,uint256)", + "g(uint256,uint256)" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f(uint256,uint256)": { + "impacts": [], + "is_impacted_by": [] + }, + "g(uint256,uint256)": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..e015105bfa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,9 @@ + +C: ++--------------------+------------+ +| Name | ID | ++--------------------+------------+ +| f(uint256,uint256) | 0x13d1aa2e | +| g(uint256,uint256) | 0x1cd65ae4 | ++--------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..48bf005a68 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,17 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f(uint256,uint256) | public | [] | [] | [] | [] | [] | 1 | +| g(uint256,uint256) | public | [] | [] | [] | [] | [] | 1 | ++--------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..2495e3b77d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 4 | 2 | 4 | 4 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 6 | 8 | 10 | 21 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 1 | 21 | 1 | 0.003 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..f94666c3f8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 8 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..21e48df21b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c30_C[shape="box"label=<
C
Public Functions:
f(uint256,uint256)
g(uint256,uint256)
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..2c5f56ebe2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 10 | +| sloc | 0 | 0 | 8 | +| cloc | 0 | 0 | 2 | +| Total | 0 | 0 | 20 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..7815e1668f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | +| g | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..d7946d0189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,8 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..91a31b733f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | +| g | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..ccf57948f7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,12 @@ +Contract C + Function C.f(uint256,uint256) (*) + Expression: a - b + IRs: + TMP_0(uint256) = a - b + RETURN TMP_0 + Function C.g(uint256,uint256) (*) + Expression: a - b + IRs: + TMP_1(uint256) = a (c)- b + RETURN TMP_1 + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..409aab03b6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_unchecked_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,9 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | +| g | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..653e01c582 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,113 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipTest.call-graph.dot + +strict digraph { +subgraph cluster_519_Test { +label = "Test" +"519_abi_encode" [label="abi_encode"] +"519_address_related" [label="address_related"] +"519_block_and_transactions" [label="block_and_transactions"] +"519_contract_related" [label="contract_related"] +"519_error_handling" [label="error_handling"] +"519_ether_unit" [label="ether_unit"] +"519_math_and_crypto" [label="math_and_crypto"] +"519_time_unit" [label="time_unit"] +}subgraph cluster_solidity { +label = "[Solidity]" +"abi.decode()" +"abi.encode()" +"abi.encodePacked()" +"abi.encodeWithSelector()" +"abi.encodeWithSignature()" +"addmod(uint256,uint256,uint256)" +"assert(bool)" +"balance(address)" +"blockhash(uint256)" +"ecrecover(bytes32,uint8,bytes32,bytes32)" +"gasleft()" +"keccak256(bytes)" +"mulmod(uint256,uint256,uint256)" +"require(bool)" +"require(bool,string)" +"revert()" +"revert(string)" +"ripemd160(bytes)" +"selfdestruct(address)" +"sha256(bytes)" +"519_abi_encode" -> "abi.decode()" +"519_abi_encode" -> "abi.encode()" +"519_abi_encode" -> "abi.encodePacked()" +"519_abi_encode" -> "abi.encodeWithSelector()" +"519_abi_encode" -> "abi.encodeWithSignature()" +"519_address_related" -> "balance(address)" +"519_block_and_transactions" -> "blockhash(uint256)" +"519_block_and_transactions" -> "gasleft()" +"519_contract_related" -> "selfdestruct(address)" +"519_error_handling" -> "assert(bool)" +"519_error_handling" -> "require(bool)" +"519_error_handling" -> "require(bool,string)" +"519_error_handling" -> "revert()" +"519_error_handling" -> "revert(string)" +"519_math_and_crypto" -> "addmod(uint256,uint256,uint256)" +"519_math_and_crypto" -> "ecrecover(bytes32,uint8,bytes32,bytes32)" +"519_math_and_crypto" -> "keccak256(bytes)" +"519_math_and_crypto" -> "mulmod(uint256,uint256,uint256)" +"519_math_and_crypto" -> "ripemd160(bytes)" +"519_math_and_crypto" -> "sha256(bytes)" +} +} +strict digraph { +subgraph cluster_519_Test { +label = "Test" +"519_abi_encode" [label="abi_encode"] +"519_address_related" [label="address_related"] +"519_block_and_transactions" [label="block_and_transactions"] +"519_contract_related" [label="contract_related"] +"519_error_handling" [label="error_handling"] +"519_ether_unit" [label="ether_unit"] +"519_math_and_crypto" [label="math_and_crypto"] +"519_time_unit" [label="time_unit"] +}subgraph cluster_solidity { +label = "[Solidity]" +"abi.decode()" +"abi.encode()" +"abi.encodePacked()" +"abi.encodeWithSelector()" +"abi.encodeWithSignature()" +"addmod(uint256,uint256,uint256)" +"assert(bool)" +"balance(address)" +"blockhash(uint256)" +"ecrecover(bytes32,uint8,bytes32,bytes32)" +"gasleft()" +"keccak256(bytes)" +"mulmod(uint256,uint256,uint256)" +"require(bool)" +"require(bool,string)" +"revert()" +"revert(string)" +"ripemd160(bytes)" +"selfdestruct(address)" +"sha256(bytes)" +"519_abi_encode" -> "abi.decode()" +"519_abi_encode" -> "abi.encode()" +"519_abi_encode" -> "abi.encodePacked()" +"519_abi_encode" -> "abi.encodeWithSelector()" +"519_abi_encode" -> "abi.encodeWithSignature()" +"519_address_related" -> "balance(address)" +"519_block_and_transactions" -> "blockhash(uint256)" +"519_block_and_transactions" -> "gasleft()" +"519_contract_related" -> "selfdestruct(address)" +"519_error_handling" -> "assert(bool)" +"519_error_handling" -> "require(bool)" +"519_error_handling" -> "require(bool,string)" +"519_error_handling" -> "revert()" +"519_error_handling" -> "revert(string)" +"519_math_and_crypto" -> "addmod(uint256,uint256,uint256)" +"519_math_and_crypto" -> "ecrecover(bytes32,uint8,bytes32,bytes32)" +"519_math_and_crypto" -> "keccak256(bytes)" +"519_math_and_crypto" -> "mulmod(uint256,uint256,uint256)" +"519_math_and_crypto" -> "ripemd160(bytes)" +"519_math_and_crypto" -> "sha256(bytes)" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..be593b2828 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,409 @@ +Export tmp.zip-Test-ether_unit().dot +Export tmp.zip-Test-time_unit().dot +Export tmp.zip-Test-block_and_transactions().dot +Export tmp.zip-Test-abi_encode().dot +Export tmp.zip-Test-error_handling().dot +Export tmp.zip-Test-math_and_crypto().dot +Export tmp.zip-Test-address_related().dot +Export tmp.zip-Test-contract_related().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +1000000000000000 +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +1000000000000 +"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +1000000000000000000 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +60 +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +3600 +"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +86400 +"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +604800 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +blockhash(uint256)(0) + +IRs: +TMP_0(uint256) = SOLIDITY_CALL blockhash(uint256)(0)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +block.coinbase +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +block.difficulty +"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +block.gaslimit +"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +block.number +"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +block.timestamp +"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +gasleft()() + +IRs: +TMP_1(uint256) = SOLIDITY_CALL gasleft()()"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +msg.data +"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +msg.sender +"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +msg.sig +"]; +10->11; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +msg.value +"]; +11->12; +12[label="Node Type: EXPRESSION 12 + +EXPRESSION: +now +"]; +12->13; +13[label="Node Type: EXPRESSION 13 + +EXPRESSION: +tx.gasprice +"]; +13->14; +14[label="Node Type: EXPRESSION 14 + +EXPRESSION: +tx.origin +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +abi.decode(m,(uint256,uint256)) + +IRs: +TUPLE_0(uint256,uint256) = SOLIDITY_CALL abi.decode()(m(uint256,uint256))"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +abi.encode(10) + +IRs: +TMP_2(bytes) = SOLIDITY_CALL abi.encode()(10)"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +abi.encodePacked(uint256(10)) + +IRs: +TMP_3 = CONVERT 10 to uint256 +TMP_4(bytes) = SOLIDITY_CALL abi.encodePacked()(TMP_3)"]; +4->5; +5[label="Node Type: NEW VARIABLE 5 +"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +abi.encodeWithSelector(selector,10) + +IRs: +TMP_5(bytes) = SOLIDITY_CALL abi.encodeWithSelector()(selector,10)"]; +6->7; +7[label="Node Type: NEW VARIABLE 7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +abi.encodeWithSignature(signature,10) + +IRs: +TMP_6(bytes) = SOLIDITY_CALL abi.encodeWithSignature()(signature,10)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +assert(bool)(true) + +IRs: +TMP_7(None) = SOLIDITY_CALL assert(bool)(True)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +require(bool)(true) + +IRs: +TMP_8(None) = SOLIDITY_CALL require(bool)(True)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +require(bool,string)(true,something) + +IRs: +TMP_9(None) = SOLIDITY_CALL require(bool,string)(True,something)"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +revert()() + +IRs: +TMP_10(None) = SOLIDITY_CALL revert()()"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +revert(string)(something) + +IRs: +TMP_11(None) = SOLIDITY_CALL revert(string)(something)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +addmod(uint256,uint256,uint256)(0,0,1) + +IRs: +TMP_12(uint256) = SOLIDITY_CALL addmod(uint256,uint256,uint256)(0,0,1)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +mulmod(uint256,uint256,uint256)(0,0,1) + +IRs: +TMP_13(uint256) = SOLIDITY_CALL mulmod(uint256,uint256,uint256)(0,0,1)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +keccak256(bytes)() + +IRs: +TMP_14(bytes32) = SOLIDITY_CALL keccak256(bytes)()"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +sha256(bytes)() + +IRs: +TMP_15(bytes32) = SOLIDITY_CALL sha256(bytes)()"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +ripemd160(bytes)() + +IRs: +TMP_16(bytes32) = SOLIDITY_CALL ripemd160(bytes)()"]; +5->6; +6[label="Node Type: NEW VARIABLE 6 +"]; +6->7; +7[label="Node Type: NEW VARIABLE 7 +"]; +7->8; +8[label="Node Type: NEW VARIABLE 8 +"]; +8->9; +9[label="Node Type: NEW VARIABLE 9 +"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +ecrecover(bytes32,uint8,bytes32,bytes32)(hash,v,r,s) + +IRs: +TMP_17(address) = SOLIDITY_CALL ecrecover(bytes32,uint8,bytes32,bytes32)(hash,v,r,s)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +a.balance + +IRs: +TMP_18(uint256) = SOLIDITY_CALL balance(address)(a)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +a.send(0) + +IRs: +TMP_19 = SEND dest:a value:0"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +a.transfer(0) + +IRs: +Transfer dest:a value:0"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +a.call() + +IRs: +TUPLE_1(bool,bytes) = LOW_LEVEL_CALL, dest:a, function:call, arguments:[''] "]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +a.delegatecall() + +IRs: +TUPLE_2(bool,bytes) = LOW_LEVEL_CALL, dest:a, function:delegatecall, arguments:[''] "]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +a.staticcall() + +IRs: +TUPLE_3(bool,bytes) = LOW_LEVEL_CALL, dest:a, function:staticcall, arguments:[''] "]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +this +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +selfdestruct(address)(a) + +IRs: +TMP_21(None) = SOLIDITY_CALL selfdestruct(address)(a)"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..1b9a609c1f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| Test | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| Test | 8 | 0 | 0 | 0 | +| TOTAL | 8 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| Test | 8 | 0 | 0 | +| TOTAL | 8 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| Test | 8 | 8 | 8 | +| TOTAL | 8 | 8 | 8 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| Test | 0 | 8 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..d2d38bc176 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,12 @@ + ++ Contract Test (Most derived contract) + - From Test + - abi_encode() (public) + - address_related() (public) + - block_and_transactions() (public) + - contract_related() (public) + - error_handling() (public) + - ether_unit() (public) + - math_and_crypto() (public) + - time_unit() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..a42ce122c1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,56 @@ + +Contract Test ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function ether_unit() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function time_unit() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function block_and_transactions() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function abi_encode() ++-----------+--------------+ +| Variable | Dependencies | ++-----------+--------------+ +| m | [] | +| selector | [] | +| signature | [] | ++-----------+--------------+ +Function error_handling() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function math_and_crypto() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| hash | [] | +| v | [] | +| r | [] | +| s | [] | ++----------+--------------+ +Function address_related() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Function contract_related() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..bb3cb3beef --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,45 @@ + +# Contracts +# Test + - Declaration: tests/ast-parsing/units_and_global_variables-0.5.4.sol#4 (10 - 15) + - Implementation(s): [] + - References: [] + + ## Function + - Test.ether_unit() + - Declaration: tests/ast-parsing/units_and_global_variables-0.5.4.sol#6 (14 - 25) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.5.4.sol#6-11 (5 - 6)'] + - References: [] + - Test.time_unit() + - Declaration: tests/ast-parsing/units_and_global_variables-0.5.4.sol#13 (14 - 24) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.5.4.sol#13-19 (5 - 6)'] + - References: [] + - Test.block_and_transactions() + - Declaration: tests/ast-parsing/units_and_global_variables-0.5.4.sol#21 (14 - 37) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.5.4.sol#21-36 (5 - 6)'] + - References: [] + - Test.abi_encode() + - Declaration: tests/ast-parsing/units_and_global_variables-0.5.4.sol#38 (14 - 25) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.5.4.sol#38-47 (5 - 6)'] + - References: [] + - Test.error_handling() + - Declaration: tests/ast-parsing/units_and_global_variables-0.5.4.sol#49 (14 - 29) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.5.4.sol#49-55 (5 - 6)'] + - References: [] + - Test.math_and_crypto() + - Declaration: tests/ast-parsing/units_and_global_variables-0.5.4.sol#57 (14 - 30) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.5.4.sol#57-68 (5 - 6)'] + - References: [] + - Test.address_related() + - Declaration: tests/ast-parsing/units_and_global_variables-0.5.4.sol#70 (14 - 30) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.5.4.sol#70-78 (5 - 6)'] + - References: [] + - Test.contract_related() + - Declaration: tests/ast-parsing/units_and_global_variables-0.5.4.sol#80 (14 - 31) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.5.4.sol#80-84 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ba62a82881 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,17 @@ +Export tmp.zip-Test-ether_unit().dot +Export tmp.zip-Test-time_unit().dot +Export tmp.zip-Test-block_and_transactions().dot +Export tmp.zip-Test-abi_encode().dot +Export tmp.zip-Test-error_handling().dot +Export tmp.zip-Test-math_and_crypto().dot +Export tmp.zip-Test-address_related().dot +Export tmp.zip-Test-contract_related().dot + +None +None +None +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..03cfeeb300 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,146 @@ +{ + "payable": { + "Test": [ + "block_and_transactions()" + ] + }, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": { + "Test": [ + "error_handling()" + ] + }, + "constant_functions": { + "Test": [ + "ether_unit()", + "time_unit()", + "abi_encode()", + "error_handling()", + "math_and_crypto()" + ] + }, + "constants_used": { + "Test": { + "block_and_transactions()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "abi_encode()": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "error_handling()": [ + [ + { + "value": "True", + "type": "bool" + } + ], + [ + { + "value": "something", + "type": "string" + } + ] + ], + "math_and_crypto()": [ + [ + { + "value": "", + "type": "string" + } + ], + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "address_related()": [ + [ + { + "value": "", + "type": "string" + } + ], + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "Test": { + "ether_unit()": { + "impacts": [], + "is_impacted_by": [] + }, + "time_unit()": { + "impacts": [], + "is_impacted_by": [] + }, + "block_and_transactions()": { + "impacts": [], + "is_impacted_by": [] + }, + "abi_encode()": { + "impacts": [], + "is_impacted_by": [] + }, + "error_handling()": { + "impacts": [], + "is_impacted_by": [] + }, + "math_and_crypto()": { + "impacts": [], + "is_impacted_by": [] + }, + "address_related()": { + "impacts": [], + "is_impacted_by": [] + }, + "contract_related()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": { + "Test": [ + "address_related()" + ] + }, + "use_balance": { + "Test": [ + "address_related()" + ] + }, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..a8b0cc245c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,15 @@ + +Test: ++--------------------------+------------+ +| Name | ID | ++--------------------------+------------+ +| ether_unit() | 0x95af8066 | +| time_unit() | 0x030dd91c | +| block_and_transactions() | 0x4d88f0e0 | +| abi_encode() | 0x36f66b46 | +| error_handling() | 0x8bae1bea | +| math_and_crypto() | 0xbe48073f | +| address_related() | 0x81ec0bbe | +| contract_related() | 0xdf1e2a6b | ++--------------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..caed195ef3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,31 @@ + +Contract Test +Contract vars: [] +Inheritance:: [] + ++--------------------------+------------+-----------+------+-------+---------------------------------------------------------------------------------+--------------------------------------------------------------------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++--------------------------+------------+-----------+------+-------+---------------------------------------------------------------------------------+--------------------------------------------------------------------------+-----------------------+ +| ether_unit() | public | [] | [] | [] | [] | [] | 1 | +| time_unit() | public | [] | [] | [] | [] | [] | 1 | +| block_and_transactions() | public | [] | [] | [] | ['blockhash(uint256)', 'gasleft()'] | [] | 1 | +| abi_encode() | public | [] | [] | [] | ['abi.decode()', 'abi.encode()'] | ['abi.decode(m,(uint256,uint256))', 'abi.encode(10)'] | 1 | +| | | | | | ['abi.encodePacked()', 'abi.encodeWithSelector()'] | ['abi.encodePacked(uint256(10))', 'abi.encodeWithSelector(selector,10)'] | | +| | | | | | ['abi.encodeWithSignature()'] | ['abi.encodeWithSignature(signature,10)'] | | +| error_handling() | public | [] | [] | [] | ['assert(bool)', 'require(bool)'] | [] | 1 | +| | | | | | ['require(bool,string)', 'revert()'] | | | +| | | | | | ['revert(string)'] | | | +| math_and_crypto() | public | [] | [] | [] | ['addmod(uint256,uint256,uint256)', 'ecrecover(bytes32,uint8,bytes32,bytes32)'] | [] | 1 | +| | | | | | ['keccak256(bytes)', 'mulmod(uint256,uint256,uint256)'] | | | +| | | | | | ['ripemd160(bytes)', 'sha256(bytes)'] | | | +| address_related() | public | [] | [] | [] | ['balance(address)'] | ['a.call()', 'a.delegatecall()'] | 1 | +| | | | | | | ['a.send(0)', 'a.staticcall()'] | | +| | | | | | | ['a.transfer(0)'] | | +| contract_related() | public | [] | [] | [] | ['selfdestruct(address)'] | [] | 1 | ++--------------------------+------------+-----------+------+-------+---------------------------------------------------------------------------------+--------------------------------------------------------------------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..603186e461 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| Test | 26 | 24 | 44 | 19 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| Test | 43 | 70 | 191 | 380 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| Test | 28 | 10556 | 586 | 0.160 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..e06a6b6688 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 74 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1f3aa193ae --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ Test + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ Test + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..71b02541f9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c519_Test[shape="box"label=<
Test
Public Functions:
ether_unit()
time_unit()
block_and_transactions()
abi_encode()
error_handling()
math_and_crypto()
address_related()
contract_related()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..50bd7a554d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 85 | +| sloc | 0 | 0 | 74 | +| cloc | 0 | 0 | 2 | +| Total | 0 | 0 | 161 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..1084620cdd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| Test | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..c37e0b5192 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,14 @@ + +Contract Test ++------------------------+-----------+ +| Function | Modifiers | ++------------------------+-----------+ +| ether_unit | [] | +| time_unit | [] | +| block_and_transactions | [] | +| abi_encode | [] | +| error_handling | [] | +| math_and_crypto | [] | +| address_related | [] | +| contract_related | [] | ++------------------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f068b7a7be --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,16 @@ +Constructor and pure/view functions are not displayed + +Test: ++--------------------------+-------------------+ +| Name | Use whenNotPaused | ++--------------------------+-------------------+ +| ether_unit() | | +| time_unit() | | +| block_and_transactions() | | +| abi_encode() | | +| error_handling() | | +| math_and_crypto() | | +| address_related() | | +| contract_related() | | ++--------------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..737c0e138f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,16 @@ + +Contract Test ++------------------------+--------------------------------------+ +| Function | require or assert | ++------------------------+--------------------------------------+ +| ether_unit | | +| time_unit | | +| block_and_transactions | | +| abi_encode | | +| error_handling | assert(bool)(true) | +| | require(bool)(true) | +| | require(bool,string)(true,something) | +| math_and_crypto | | +| address_related | | +| contract_related | | ++------------------------+--------------------------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..fbaf746c19 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,130 @@ +Contract Test + Function Test.ether_unit() (*) + Expression: 1 + IRs: + Expression: 1000000000000000 + IRs: + Expression: 1000000000000 + IRs: + Expression: 1000000000000000000 + IRs: + Function Test.time_unit() (*) + Expression: 1 + IRs: + Expression: 60 + IRs: + Expression: 3600 + IRs: + Expression: 86400 + IRs: + Expression: 604800 + IRs: + Function Test.block_and_transactions() (*) + Expression: blockhash(uint256)(0) + IRs: + TMP_0(uint256) = SOLIDITY_CALL blockhash(uint256)(0) + Expression: block.coinbase + IRs: + Expression: block.difficulty + IRs: + Expression: block.gaslimit + IRs: + Expression: block.number + IRs: + Expression: block.timestamp + IRs: + Expression: gasleft()() + IRs: + TMP_1(uint256) = SOLIDITY_CALL gasleft()() + Expression: msg.data + IRs: + Expression: msg.sender + IRs: + Expression: msg.sig + IRs: + Expression: msg.value + IRs: + Expression: now + IRs: + Expression: tx.gasprice + IRs: + Expression: tx.origin + IRs: + Function Test.abi_encode() (*) + Expression: abi.decode(m,(uint256,uint256)) + IRs: + TUPLE_0(uint256,uint256) = SOLIDITY_CALL abi.decode()(m(uint256,uint256)) + Expression: abi.encode(10) + IRs: + TMP_2(bytes) = SOLIDITY_CALL abi.encode()(10) + Expression: abi.encodePacked(uint256(10)) + IRs: + TMP_3 = CONVERT 10 to uint256 + TMP_4(bytes) = SOLIDITY_CALL abi.encodePacked()(TMP_3) + Expression: abi.encodeWithSelector(selector,10) + IRs: + TMP_5(bytes) = SOLIDITY_CALL abi.encodeWithSelector()(selector,10) + Expression: abi.encodeWithSignature(signature,10) + IRs: + TMP_6(bytes) = SOLIDITY_CALL abi.encodeWithSignature()(signature,10) + Function Test.error_handling() (*) + Expression: assert(bool)(true) + IRs: + TMP_7(None) = SOLIDITY_CALL assert(bool)(True) + Expression: require(bool)(true) + IRs: + TMP_8(None) = SOLIDITY_CALL require(bool)(True) + Expression: require(bool,string)(true,something) + IRs: + TMP_9(None) = SOLIDITY_CALL require(bool,string)(True,something) + Expression: revert()() + IRs: + TMP_10(None) = SOLIDITY_CALL revert()() + Expression: revert(string)(something) + IRs: + TMP_11(None) = SOLIDITY_CALL revert(string)(something) + Function Test.math_and_crypto() (*) + Expression: addmod(uint256,uint256,uint256)(0,0,1) + IRs: + TMP_12(uint256) = SOLIDITY_CALL addmod(uint256,uint256,uint256)(0,0,1) + Expression: mulmod(uint256,uint256,uint256)(0,0,1) + IRs: + TMP_13(uint256) = SOLIDITY_CALL mulmod(uint256,uint256,uint256)(0,0,1) + Expression: keccak256(bytes)() + IRs: + TMP_14(bytes32) = SOLIDITY_CALL keccak256(bytes)() + Expression: sha256(bytes)() + IRs: + TMP_15(bytes32) = SOLIDITY_CALL sha256(bytes)() + Expression: ripemd160(bytes)() + IRs: + TMP_16(bytes32) = SOLIDITY_CALL ripemd160(bytes)() + Expression: ecrecover(bytes32,uint8,bytes32,bytes32)(hash,v,r,s) + IRs: + TMP_17(address) = SOLIDITY_CALL ecrecover(bytes32,uint8,bytes32,bytes32)(hash,v,r,s) + Function Test.address_related() (*) + Expression: a.balance + IRs: + TMP_18(uint256) = SOLIDITY_CALL balance(address)(a) + Expression: a.send(0) + IRs: + TMP_19 = SEND dest:a value:0 + Expression: a.transfer(0) + IRs: + Transfer dest:a value:0 + Expression: a.call() + IRs: + TUPLE_1(bool,bytes) = LOW_LEVEL_CALL, dest:a, function:call, arguments:[''] + Expression: a.delegatecall() + IRs: + TUPLE_2(bool,bytes) = LOW_LEVEL_CALL, dest:a, function:delegatecall, arguments:[''] + Expression: a.staticcall() + IRs: + TUPLE_3(bool,bytes) = LOW_LEVEL_CALL, dest:a, function:staticcall, arguments:[''] + Function Test.contract_related() (*) + Expression: this + IRs: + Expression: selfdestruct(address)(a) + IRs: + TMP_21(None) = SOLIDITY_CALL selfdestruct(address)(a) + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..729c40ecb5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +Test: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..da1bfa0dfd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_5_4_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,15 @@ + +Contract Test ++------------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++------------------------+-------------------------+--------------------------+ +| ether_unit | [] | [] | +| time_unit | [] | [] | +| block_and_transactions | [] | [] | +| abi_encode | [] | [] | +| error_handling | [] | [] | +| math_and_crypto | [] | [] | +| address_related | [] | [] | +| contract_related | [] | [] | ++------------------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..d5427b8cf7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,151 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipA.call-graph.dot +Call Graph: tmp.zipI.call-graph.dot +Call Graph: tmp.zipTest.call-graph.dot + +strict digraph { +subgraph cluster_333_Test { +label = "Test" +"333_abi_encode" [label="abi_encode"] +"333_address_edge_case" [label="address_edge_case"] +"333_address_related" [label="address_related"] +"333_block_and_transactions" [label="block_and_transactions"] +"333_contract_related" [label="contract_related"] +"333_error_handling" [label="error_handling"] +"333_ether_unit" [label="ether_unit"] +"333_math_and_crypto" [label="math_and_crypto"] +"333_return_addr" [label="return_addr"] +"333_time_unit" [label="time_unit"] +"333_type_related" [label="type_related"] +"333_address_edge_case" -> "333_return_addr" +}subgraph cluster_solidity { +label = "[Solidity]" +"abi.decode()" +"abi.encode()" +"abi.encodePacked()" +"abi.encodeWithSelector()" +"abi.encodeWithSignature()" +"addmod(uint256,uint256,uint256)" +"assert(bool)" +"balance(address)" +"blockhash(uint256)" +"code(address)" +"codehash(address)" +"ecrecover(bytes32,uint8,bytes32,bytes32)" +"gasleft()" +"keccak256(bytes)" +"mulmod(uint256,uint256,uint256)" +"require(bool)" +"require(bool,string)" +"revert()" +"revert(string)" +"ripemd160(bytes)" +"selfdestruct(address)" +"sha256(bytes)" +"type()" +"333_abi_encode" -> "abi.decode()" +"333_abi_encode" -> "abi.encode()" +"333_abi_encode" -> "abi.encodePacked()" +"333_abi_encode" -> "abi.encodeWithSelector()" +"333_abi_encode" -> "abi.encodeWithSignature()" +"333_address_edge_case" -> "balance(address)" +"333_address_edge_case" -> "code(address)" +"333_address_edge_case" -> "codehash(address)" +"333_address_related" -> "balance(address)" +"333_address_related" -> "code(address)" +"333_address_related" -> "codehash(address)" +"333_block_and_transactions" -> "blockhash(uint256)" +"333_block_and_transactions" -> "gasleft()" +"333_contract_related" -> "selfdestruct(address)" +"333_error_handling" -> "assert(bool)" +"333_error_handling" -> "require(bool)" +"333_error_handling" -> "require(bool,string)" +"333_error_handling" -> "revert()" +"333_error_handling" -> "revert(string)" +"333_math_and_crypto" -> "addmod(uint256,uint256,uint256)" +"333_math_and_crypto" -> "ecrecover(bytes32,uint8,bytes32,bytes32)" +"333_math_and_crypto" -> "keccak256(bytes)" +"333_math_and_crypto" -> "mulmod(uint256,uint256,uint256)" +"333_math_and_crypto" -> "ripemd160(bytes)" +"333_math_and_crypto" -> "sha256(bytes)" +"333_type_related" -> "type()" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_333_Test { +label = "Test" +"333_abi_encode" [label="abi_encode"] +"333_address_edge_case" [label="address_edge_case"] +"333_address_related" [label="address_related"] +"333_block_and_transactions" [label="block_and_transactions"] +"333_contract_related" [label="contract_related"] +"333_error_handling" [label="error_handling"] +"333_ether_unit" [label="ether_unit"] +"333_math_and_crypto" [label="math_and_crypto"] +"333_return_addr" [label="return_addr"] +"333_time_unit" [label="time_unit"] +"333_type_related" [label="type_related"] +"333_address_edge_case" -> "333_return_addr" +}subgraph cluster_solidity { +label = "[Solidity]" +"abi.decode()" +"abi.encode()" +"abi.encodePacked()" +"abi.encodeWithSelector()" +"abi.encodeWithSignature()" +"addmod(uint256,uint256,uint256)" +"assert(bool)" +"balance(address)" +"blockhash(uint256)" +"code(address)" +"codehash(address)" +"ecrecover(bytes32,uint8,bytes32,bytes32)" +"gasleft()" +"keccak256(bytes)" +"mulmod(uint256,uint256,uint256)" +"require(bool)" +"require(bool,string)" +"revert()" +"revert(string)" +"ripemd160(bytes)" +"selfdestruct(address)" +"sha256(bytes)" +"type()" +"333_abi_encode" -> "abi.decode()" +"333_abi_encode" -> "abi.encode()" +"333_abi_encode" -> "abi.encodePacked()" +"333_abi_encode" -> "abi.encodeWithSelector()" +"333_abi_encode" -> "abi.encodeWithSignature()" +"333_address_edge_case" -> "balance(address)" +"333_address_edge_case" -> "code(address)" +"333_address_edge_case" -> "codehash(address)" +"333_address_related" -> "balance(address)" +"333_address_related" -> "code(address)" +"333_address_related" -> "codehash(address)" +"333_block_and_transactions" -> "blockhash(uint256)" +"333_block_and_transactions" -> "gasleft()" +"333_contract_related" -> "selfdestruct(address)" +"333_error_handling" -> "assert(bool)" +"333_error_handling" -> "require(bool)" +"333_error_handling" -> "require(bool,string)" +"333_error_handling" -> "revert()" +"333_error_handling" -> "revert(string)" +"333_math_and_crypto" -> "addmod(uint256,uint256,uint256)" +"333_math_and_crypto" -> "ecrecover(bytes32,uint8,bytes32,bytes32)" +"333_math_and_crypto" -> "keccak256(bytes)" +"333_math_and_crypto" -> "mulmod(uint256,uint256,uint256)" +"333_math_and_crypto" -> "ripemd160(bytes)" +"333_math_and_crypto" -> "sha256(bytes)" +"333_type_related" -> "type()" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..e9cec3766e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,516 @@ +Export tmp.zip-Test-ether_unit().dot +Export tmp.zip-Test-time_unit().dot +Export tmp.zip-Test-block_and_transactions().dot +Export tmp.zip-Test-abi_encode().dot +Export tmp.zip-Test-error_handling().dot +Export tmp.zip-Test-math_and_crypto().dot +Export tmp.zip-Test-address_related().dot +Export tmp.zip-Test-return_addr().dot +Export tmp.zip-Test-address_edge_case().dot +Export tmp.zip-Test-contract_related().dot +Export tmp.zip-Test-type_related().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +1000000000000000000 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +60 +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +3600 +"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +86400 +"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +604800 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +blockhash(uint256)(0) + +IRs: +TMP_0(uint256) = SOLIDITY_CALL blockhash(uint256)(0)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +block.chainid +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +block.coinbase +"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +block.difficulty +"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +block.gaslimit +"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +block.number +"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +block.timestamp +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +gasleft()() + +IRs: +TMP_1(uint256) = SOLIDITY_CALL gasleft()()"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +msg.data +"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +msg.sender +"]; +10->11; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +msg.sig +"]; +11->12; +12[label="Node Type: EXPRESSION 12 + +EXPRESSION: +msg.value +"]; +12->13; +13[label="Node Type: EXPRESSION 13 + +EXPRESSION: +block.timestamp +"]; +13->14; +14[label="Node Type: EXPRESSION 14 + +EXPRESSION: +tx.gasprice +"]; +14->15; +15[label="Node Type: EXPRESSION 15 + +EXPRESSION: +tx.origin +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +abi.decode(m,(uint256,uint256)) + +IRs: +TUPLE_0(uint256,uint256) = SOLIDITY_CALL abi.decode()(m(uint256,uint256))"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +abi.encode(10) + +IRs: +TMP_2(bytes) = SOLIDITY_CALL abi.encode()(10)"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +abi.encodePacked(uint256(10)) + +IRs: +TMP_3 = CONVERT 10 to uint256 +TMP_4(bytes) = SOLIDITY_CALL abi.encodePacked()(TMP_3)"]; +4->5; +5[label="Node Type: NEW VARIABLE 5 +"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +abi.encodeWithSelector(selector,10) + +IRs: +TMP_5(bytes) = SOLIDITY_CALL abi.encodeWithSelector()(selector,10)"]; +6->7; +7[label="Node Type: NEW VARIABLE 7 +"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +abi.encodeWithSignature(signature,10) + +IRs: +TMP_6(bytes) = SOLIDITY_CALL abi.encodeWithSignature()(signature,10)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +assert(bool)(true) + +IRs: +TMP_7(None) = SOLIDITY_CALL assert(bool)(True)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +require(bool)(true) + +IRs: +TMP_8(None) = SOLIDITY_CALL require(bool)(True)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +require(bool,string)(true,something) + +IRs: +TMP_9(None) = SOLIDITY_CALL require(bool,string)(True,something)"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +revert()() + +IRs: +TMP_10(None) = SOLIDITY_CALL revert()()"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +revert(string)(something) + +IRs: +TMP_11(None) = SOLIDITY_CALL revert(string)(something)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +addmod(uint256,uint256,uint256)(0,0,1) + +IRs: +TMP_12(uint256) = SOLIDITY_CALL addmod(uint256,uint256,uint256)(0,0,1)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +mulmod(uint256,uint256,uint256)(0,0,1) + +IRs: +TMP_13(uint256) = SOLIDITY_CALL mulmod(uint256,uint256,uint256)(0,0,1)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +keccak256(bytes)() + +IRs: +TMP_14(bytes32) = SOLIDITY_CALL keccak256(bytes)()"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +sha256(bytes)() + +IRs: +TMP_15(bytes32) = SOLIDITY_CALL sha256(bytes)()"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +ripemd160(bytes)() + +IRs: +TMP_16(bytes32) = SOLIDITY_CALL ripemd160(bytes)()"]; +5->6; +6[label="Node Type: NEW VARIABLE 6 +"]; +6->7; +7[label="Node Type: NEW VARIABLE 7 +"]; +7->8; +8[label="Node Type: NEW VARIABLE 8 +"]; +8->9; +9[label="Node Type: NEW VARIABLE 9 +"]; +9->10; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +ecrecover(bytes32,uint8,bytes32,bytes32)(hash,v,r,s) + +IRs: +TMP_17(address) = SOLIDITY_CALL ecrecover(bytes32,uint8,bytes32,bytes32)(hash,v,r,s)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +a.balance + +IRs: +TMP_18(uint256) = SOLIDITY_CALL balance(address)(a)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +a.code + +IRs: +TMP_19(bytes) = SOLIDITY_CALL code(address)(a)"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +a.codehash + +IRs: +TMP_20(bytes32) = SOLIDITY_CALL codehash(address)(a)"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +a.send(0) + +IRs: +TMP_21 = SEND dest:a value:0"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +a.transfer(0) + +IRs: +Transfer dest:a value:0"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +a.call() + +IRs: +TUPLE_1(bool,bytes) = LOW_LEVEL_CALL, dest:a, function:call, arguments:[''] "]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +a.delegatecall() + +IRs: +TUPLE_2(bool,bytes) = LOW_LEVEL_CALL, dest:a, function:delegatecall, arguments:[''] "]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +a.staticcall() + +IRs: +TUPLE_3(bool,bytes) = LOW_LEVEL_CALL, dest:a, function:staticcall, arguments:[''] "]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +return_addr().balance + +IRs: +TMP_23(address) = INTERNAL_CALL, Test.return_addr()() +REF_10(uint256) = SOLIDITY_CALL balance(address)(TMP_23)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +return_addr().code + +IRs: +TMP_24(address) = INTERNAL_CALL, Test.return_addr()() +REF_11(bytes) = SOLIDITY_CALL code(address)(TMP_24)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +return_addr().codehash + +IRs: +TMP_25(address) = INTERNAL_CALL, Test.return_addr()() +REF_12(bytes32) = SOLIDITY_CALL codehash(address)(TMP_25)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +this +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +selfdestruct(address)(a) + +IRs: +TMP_26(None) = SOLIDITY_CALL selfdestruct(address)(a)"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +type()(A).name + +IRs: +TMP_27(type(A)) = SOLIDITY_CALL type()(A) +REF_13(string) (->None) := A(string)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +type()(A).creationCode + +IRs: +TMP_28(type(A)) = SOLIDITY_CALL type()(A) +REF_14(bytes) (->None) := 6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea26469706673582212206213b9c5b8ebef4a5a16be67bf75f4031184fb4c87a046b4d24564d5efba773c64736f6c634300080c0033(string)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +type()(A).runtimeCode + +IRs: +TMP_29(type(A)) = SOLIDITY_CALL type()(A) +REF_15(bytes) (->None) := 6080604052600080fdfea26469706673582212206213b9c5b8ebef4a5a16be67bf75f4031184fb4c87a046b4d24564d5efba773c64736f6c634300080c0033(string)"]; +3->4; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +type()(I).interfaceId + +IRs: +TMP_30(type(I)) = SOLIDITY_CALL type()(I) +REF_16(bytes4) (->None) := 0(bytes4)"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +type()(uint256).min + +IRs: +TMP_32(uint256) := 0(uint256)"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +type()(uint256).min + +IRs: +TMP_34(uint256) := 0(uint256)"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..e676b7c5ed --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,59 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| A | 0 | 0 | 0 | +| I | 0 | 0 | 0 | +| Test | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| A | 0 | 0 | 0 | 0 | +| I | 0 | 0 | 0 | 0 | +| Test | 10 | 0 | 1 | 0 | +| TOTAL | 10 | 0 | 1 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| A | 0 | 0 | 0 | +| I | 0 | 0 | 0 | +| Test | 11 | 0 | 0 | +| TOTAL | 11 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| A | 0 | 0 | 0 | +| I | 0 | 0 | 0 | +| Test | 10 | 10 | 10 | +| TOTAL | 10 | 10 | 10 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| A | 0 | 0 | 0 | 0 | 0 | +| I | 0 | 0 | 0 | 0 | 0 | +| Test | 0 | 10 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..fb53745c91 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,19 @@ + ++ Contract A (Most derived contract) + ++ Contract I (Most derived contract) + ++ Contract Test (Most derived contract) + - From Test + - abi_encode() (public) + - address_edge_case() (public) + - address_related() (public) + - block_and_transactions() (public) + - contract_related() (public) + - error_handling() (public) + - ether_unit() (public) + - math_and_crypto() (public) + - return_addr() (internal) + - time_unit() (public) + - type_related() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..eefcd16baa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,102 @@ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract A ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract I ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract Test ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function ether_unit() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function time_unit() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function block_and_transactions() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function abi_encode() ++-----------+--------------+ +| Variable | Dependencies | ++-----------+--------------+ +| m | [] | +| selector | [] | +| signature | [] | ++-----------+--------------+ +Function error_handling() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function math_and_crypto() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| hash | [] | +| v | [] | +| r | [] | +| s | [] | ++----------+--------------+ +Function address_related() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Function return_addr() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| | [] | ++----------+--------------+ +Function address_edge_case() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ +Function contract_related() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | ++----------+--------------+ +Function type_related() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..f68bc7c802 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,77 @@ + +# Contracts +# A + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#3 (10 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#100 (14 - 15)', 'tests/ast-parsing/units_and_global_variables-0.8.0.sol#101 (14 - 15)', 'tests/ast-parsing/units_and_global_variables-0.8.0.sol#102 (14 - 15)'] + + ## Function + + ## State variables + + ## Structures +# I + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#5 (11 - 13) + - Implementation(s): [] + - References: ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#103 (14 - 15)'] + + ## Function + + ## State variables + + ## Structures +# Test + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#7 (10 - 15) + - Implementation(s): [] + - References: [] + + ## Function + - Test.ether_unit() + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#9 (14 - 25) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#9-12 (5 - 6)'] + - References: [] + - Test.time_unit() + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#14 (14 - 24) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#14-20 (5 - 6)'] + - References: [] + - Test.block_and_transactions() + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#22 (14 - 37) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#22-38 (5 - 6)'] + - References: [] + - Test.abi_encode() + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#40 (14 - 25) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#40-49 (5 - 6)'] + - References: [] + - Test.error_handling() + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#51 (14 - 29) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#51-57 (5 - 6)'] + - References: [] + - Test.math_and_crypto() + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#59 (14 - 30) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#59-70 (5 - 6)'] + - References: [] + - Test.address_related() + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#72 (14 - 30) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#72-82 (5 - 6)'] + - References: [] + - Test.return_addr() + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#84 (14 - 26) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#84 (5 - 55)'] + - References: ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#88 (9 - 20)', 'tests/ast-parsing/units_and_global_variables-0.8.0.sol#89 (9 - 20)', 'tests/ast-parsing/units_and_global_variables-0.8.0.sol#90 (9 - 20)'] + - Test.address_edge_case() + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#85 (14 - 32) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#85-91 (5 - 6)'] + - References: [] + - Test.contract_related() + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#93 (14 - 31) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#93-97 (5 - 6)'] + - References: [] + - Test.type_related() + - Declaration: tests/ast-parsing/units_and_global_variables-0.8.0.sol#99 (14 - 27) + - Implementation(s): ['tests/ast-parsing/units_and_global_variables-0.8.0.sol#99-106 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..e32840ba53 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,23 @@ +Export tmp.zip-Test-ether_unit().dot +Export tmp.zip-Test-time_unit().dot +Export tmp.zip-Test-block_and_transactions().dot +Export tmp.zip-Test-abi_encode().dot +Export tmp.zip-Test-error_handling().dot +Export tmp.zip-Test-math_and_crypto().dot +Export tmp.zip-Test-address_related().dot +Export tmp.zip-Test-return_addr().dot +Export tmp.zip-Test-address_edge_case().dot +Export tmp.zip-Test-contract_related().dot +Export tmp.zip-Test-type_related().dot + +None +None +None +None +None +None +None +None +None +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..83d374788c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,191 @@ +{ + "payable": { + "Test": [ + "block_and_transactions()" + ] + }, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": { + "Test": [ + "error_handling()" + ] + }, + "constant_functions": { + "Test": [ + "ether_unit()", + "time_unit()", + "abi_encode()", + "error_handling()", + "math_and_crypto()", + "address_edge_case()", + "type_related()" + ] + }, + "constants_used": { + "Test": { + "block_and_transactions()": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "abi_encode()": [ + [ + { + "value": "10", + "type": "uint256" + } + ] + ], + "error_handling()": [ + [ + { + "value": "True", + "type": "bool" + } + ], + [ + { + "value": "something", + "type": "string" + } + ] + ], + "math_and_crypto()": [ + [ + { + "value": "", + "type": "string" + } + ], + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ] + ], + "address_related()": [ + [ + { + "value": "", + "type": "string" + } + ], + [ + { + "value": "0", + "type": "uint256" + } + ] + ], + "type_related()": [ + [ + { + "value": "0", + "type": "bytes4" + } + ], + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea26469706673582212206213b9c5b8ebef4a5a16be67bf75f4031184fb4c87a046b4d24564d5efba773c64736f6c634300080c0033", + "type": "string" + } + ], + [ + { + "value": "6080604052600080fdfea26469706673582212206213b9c5b8ebef4a5a16be67bf75f4031184fb4c87a046b4d24564d5efba773c64736f6c634300080c0033", + "type": "string" + } + ], + [ + { + "value": "A", + "type": "string" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "A": {}, + "I": {}, + "Test": { + "ether_unit()": { + "impacts": [], + "is_impacted_by": [] + }, + "time_unit()": { + "impacts": [], + "is_impacted_by": [] + }, + "block_and_transactions()": { + "impacts": [], + "is_impacted_by": [] + }, + "abi_encode()": { + "impacts": [], + "is_impacted_by": [] + }, + "error_handling()": { + "impacts": [], + "is_impacted_by": [] + }, + "math_and_crypto()": { + "impacts": [], + "is_impacted_by": [] + }, + "address_related()": { + "impacts": [], + "is_impacted_by": [] + }, + "address_edge_case()": { + "impacts": [], + "is_impacted_by": [] + }, + "contract_related()": { + "impacts": [], + "is_impacted_by": [] + }, + "type_related()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": { + "Test": [ + "address_related()" + ] + }, + "use_balance": { + "Test": [ + "address_edge_case()", + "address_related()" + ] + }, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..0823bac60b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,29 @@ + +A: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +I: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +Test: ++--------------------------+------------+ +| Name | ID | ++--------------------------+------------+ +| ether_unit() | 0x95af8066 | +| time_unit() | 0x030dd91c | +| block_and_transactions() | 0x4d88f0e0 | +| abi_encode() | 0x36f66b46 | +| error_handling() | 0x8bae1bea | +| math_and_crypto() | 0xbe48073f | +| address_related() | 0x81ec0bbe | +| address_edge_case() | 0x8a4efade | +| contract_related() | 0xdf1e2a6b | +| type_related() | 0xc2468eef | ++--------------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..c876a53c65 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,63 @@ + +Contract A +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract I +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract Test +Contract vars: [] +Inheritance:: [] + ++--------------------------+------------+-----------+------+-------+---------------------------------------------------------------------------------+--------------------------------------------------------------------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++--------------------------+------------+-----------+------+-------+---------------------------------------------------------------------------------+--------------------------------------------------------------------------+-----------------------+ +| ether_unit() | public | [] | [] | [] | [] | [] | 1 | +| time_unit() | public | [] | [] | [] | [] | [] | 1 | +| block_and_transactions() | public | [] | [] | [] | ['blockhash(uint256)', 'gasleft()'] | [] | 1 | +| abi_encode() | public | [] | [] | [] | ['abi.decode()', 'abi.encode()'] | ['abi.decode(m,(uint256,uint256))', 'abi.encode(10)'] | 1 | +| | | | | | ['abi.encodePacked()', 'abi.encodeWithSelector()'] | ['abi.encodePacked(uint256(10))', 'abi.encodeWithSelector(selector,10)'] | | +| | | | | | ['abi.encodeWithSignature()'] | ['abi.encodeWithSignature(signature,10)'] | | +| error_handling() | public | [] | [] | [] | ['assert(bool)', 'require(bool)'] | [] | 1 | +| | | | | | ['require(bool,string)', 'revert()'] | | | +| | | | | | ['revert(string)'] | | | +| math_and_crypto() | public | [] | [] | [] | ['addmod(uint256,uint256,uint256)', 'ecrecover(bytes32,uint8,bytes32,bytes32)'] | [] | 1 | +| | | | | | ['keccak256(bytes)', 'mulmod(uint256,uint256,uint256)'] | | | +| | | | | | ['ripemd160(bytes)', 'sha256(bytes)'] | | | +| address_related() | public | [] | [] | [] | ['balance(address)', 'code(address)'] | ['a.call()', 'a.delegatecall()'] | 1 | +| | | | | | ['codehash(address)'] | ['a.send(0)', 'a.staticcall()'] | | +| | | | | | | ['a.transfer(0)'] | | +| return_addr() | internal | [] | [] | [] | [] | [] | 1 | +| address_edge_case() | public | [] | [] | [] | ['balance(address)', 'code(address)'] | [] | 1 | +| | | | | | ['codehash(address)', 'return_addr'] | | | +| contract_related() | public | [] | [] | [] | ['selfdestruct(address)'] | [] | 1 | +| type_related() | public | [] | [] | [] | ['type()'] | [] | 1 | ++--------------------------+------------+-----------+------+-------+---------------------------------------------------------------------------------+--------------------------------------------------------------------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..523eb44faa --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,31 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| A | 0 | 0 | 0 | 0 | +| I | 0 | 0 | 0 | 0 | +| Test | 44 | 29 | 63 | 32 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| A | 0 | 0 | 0 | 0 | +| I | 0 | 0 | 0 | 0 | +| Test | 61 | 107 | 301 | 635 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| A | 0 | 0 | 0 | 0.000 | +| I | 0 | 0 | 0 | 0.000 | +| Test | 29 | 18116 | 1006 | 0.230 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..29ec38e483 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 3 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 92 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..92a1984671 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,18 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ A + ++ I + ++ Test + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ A + ++ I + ++ Test + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..15df949c7f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,8 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c2_A[shape="box"label=<
A
>]; + +c333_Test[shape="box"label=<
Test
Public Functions:
ether_unit()
time_unit()
block_and_transactions()
abi_encode()
error_handling()
math_and_crypto()
address_related()
address_edge_case()
contract_related()
type_related()
Private Functions:
return_addr()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..f1476cd6d1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 109 | +| sloc | 0 | 0 | 92 | +| cloc | 0 | 0 | 2 | +| Total | 0 | 0 | 203 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..5034261185 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,16 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| A | 0 | 0 | 0.00 | 0.00 | +| I | 0 | 0 | 0.00 | 0.00 | +| Test | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..4d929feb69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,27 @@ + +Contract A ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ +Contract I ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ +Contract Test ++------------------------+-----------+ +| Function | Modifiers | ++------------------------+-----------+ +| ether_unit | [] | +| time_unit | [] | +| block_and_transactions | [] | +| abi_encode | [] | +| error_handling | [] | +| math_and_crypto | [] | +| address_related | [] | +| return_addr | [] | +| address_edge_case | [] | +| contract_related | [] | +| type_related | [] | ++------------------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..98f7bcd4ea --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,30 @@ +Constructor and pure/view functions are not displayed + +A: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +I: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +Test: ++--------------------------+-------------------+ +| Name | Use whenNotPaused | ++--------------------------+-------------------+ +| ether_unit() | | +| time_unit() | | +| block_and_transactions() | | +| abi_encode() | | +| error_handling() | | +| math_and_crypto() | | +| address_related() | | +| address_edge_case() | | +| contract_related() | | +| type_related() | | ++--------------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..793e22cfe6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,29 @@ + +Contract A ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ +Contract I ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ +Contract Test ++------------------------+--------------------------------------+ +| Function | require or assert | ++------------------------+--------------------------------------+ +| ether_unit | | +| time_unit | | +| block_and_transactions | | +| abi_encode | | +| error_handling | assert(bool)(true) | +| | require(bool)(true) | +| | require(bool,string)(true,something) | +| math_and_crypto | | +| address_related | | +| return_addr | | +| address_edge_case | | +| contract_related | | +| type_related | | ++------------------------+--------------------------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..869f1ed238 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,173 @@ +Contract A +Contract I +Contract Test + Function Test.ether_unit() (*) + Expression: 1 + IRs: + Expression: 1000000000000000000 + IRs: + Function Test.time_unit() (*) + Expression: 1 + IRs: + Expression: 60 + IRs: + Expression: 3600 + IRs: + Expression: 86400 + IRs: + Expression: 604800 + IRs: + Function Test.block_and_transactions() (*) + Expression: blockhash(uint256)(0) + IRs: + TMP_0(uint256) = SOLIDITY_CALL blockhash(uint256)(0) + Expression: block.chainid + IRs: + Expression: block.coinbase + IRs: + Expression: block.difficulty + IRs: + Expression: block.gaslimit + IRs: + Expression: block.number + IRs: + Expression: block.timestamp + IRs: + Expression: gasleft()() + IRs: + TMP_1(uint256) = SOLIDITY_CALL gasleft()() + Expression: msg.data + IRs: + Expression: msg.sender + IRs: + Expression: msg.sig + IRs: + Expression: msg.value + IRs: + Expression: block.timestamp + IRs: + Expression: tx.gasprice + IRs: + Expression: tx.origin + IRs: + Function Test.abi_encode() (*) + Expression: abi.decode(m,(uint256,uint256)) + IRs: + TUPLE_0(uint256,uint256) = SOLIDITY_CALL abi.decode()(m(uint256,uint256)) + Expression: abi.encode(10) + IRs: + TMP_2(bytes) = SOLIDITY_CALL abi.encode()(10) + Expression: abi.encodePacked(uint256(10)) + IRs: + TMP_3 = CONVERT 10 to uint256 + TMP_4(bytes) = SOLIDITY_CALL abi.encodePacked()(TMP_3) + Expression: abi.encodeWithSelector(selector,10) + IRs: + TMP_5(bytes) = SOLIDITY_CALL abi.encodeWithSelector()(selector,10) + Expression: abi.encodeWithSignature(signature,10) + IRs: + TMP_6(bytes) = SOLIDITY_CALL abi.encodeWithSignature()(signature,10) + Function Test.error_handling() (*) + Expression: assert(bool)(true) + IRs: + TMP_7(None) = SOLIDITY_CALL assert(bool)(True) + Expression: require(bool)(true) + IRs: + TMP_8(None) = SOLIDITY_CALL require(bool)(True) + Expression: require(bool,string)(true,something) + IRs: + TMP_9(None) = SOLIDITY_CALL require(bool,string)(True,something) + Expression: revert()() + IRs: + TMP_10(None) = SOLIDITY_CALL revert()() + Expression: revert(string)(something) + IRs: + TMP_11(None) = SOLIDITY_CALL revert(string)(something) + Function Test.math_and_crypto() (*) + Expression: addmod(uint256,uint256,uint256)(0,0,1) + IRs: + TMP_12(uint256) = SOLIDITY_CALL addmod(uint256,uint256,uint256)(0,0,1) + Expression: mulmod(uint256,uint256,uint256)(0,0,1) + IRs: + TMP_13(uint256) = SOLIDITY_CALL mulmod(uint256,uint256,uint256)(0,0,1) + Expression: keccak256(bytes)() + IRs: + TMP_14(bytes32) = SOLIDITY_CALL keccak256(bytes)() + Expression: sha256(bytes)() + IRs: + TMP_15(bytes32) = SOLIDITY_CALL sha256(bytes)() + Expression: ripemd160(bytes)() + IRs: + TMP_16(bytes32) = SOLIDITY_CALL ripemd160(bytes)() + Expression: ecrecover(bytes32,uint8,bytes32,bytes32)(hash,v,r,s) + IRs: + TMP_17(address) = SOLIDITY_CALL ecrecover(bytes32,uint8,bytes32,bytes32)(hash,v,r,s) + Function Test.address_related() (*) + Expression: a.balance + IRs: + TMP_18(uint256) = SOLIDITY_CALL balance(address)(a) + Expression: a.code + IRs: + TMP_19(bytes) = SOLIDITY_CALL code(address)(a) + Expression: a.codehash + IRs: + TMP_20(bytes32) = SOLIDITY_CALL codehash(address)(a) + Expression: a.send(0) + IRs: + TMP_21 = SEND dest:a value:0 + Expression: a.transfer(0) + IRs: + Transfer dest:a value:0 + Expression: a.call() + IRs: + TUPLE_1(bool,bytes) = LOW_LEVEL_CALL, dest:a, function:call, arguments:[''] + Expression: a.delegatecall() + IRs: + TUPLE_2(bool,bytes) = LOW_LEVEL_CALL, dest:a, function:delegatecall, arguments:[''] + Expression: a.staticcall() + IRs: + TUPLE_3(bool,bytes) = LOW_LEVEL_CALL, dest:a, function:staticcall, arguments:[''] + Function Test.return_addr() (*) + Function Test.address_edge_case() (*) + Expression: return_addr().balance + IRs: + TMP_23(address) = INTERNAL_CALL, Test.return_addr()() + REF_10(uint256) = SOLIDITY_CALL balance(address)(TMP_23) + Expression: return_addr().code + IRs: + TMP_24(address) = INTERNAL_CALL, Test.return_addr()() + REF_11(bytes) = SOLIDITY_CALL code(address)(TMP_24) + Expression: return_addr().codehash + IRs: + TMP_25(address) = INTERNAL_CALL, Test.return_addr()() + REF_12(bytes32) = SOLIDITY_CALL codehash(address)(TMP_25) + Function Test.contract_related() (*) + Expression: this + IRs: + Expression: selfdestruct(address)(a) + IRs: + TMP_26(None) = SOLIDITY_CALL selfdestruct(address)(a) + Function Test.type_related() (*) + Expression: type()(A).name + IRs: + TMP_27(type(A)) = SOLIDITY_CALL type()(A) + REF_13(string) (->None) := A(string) + Expression: type()(A).creationCode + IRs: + TMP_28(type(A)) = SOLIDITY_CALL type()(A) + REF_14(bytes) (->None) := 6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea26469706673582212206213b9c5b8ebef4a5a16be67bf75f4031184fb4c87a046b4d24564d5efba773c64736f6c634300080c0033(string) + Expression: type()(A).runtimeCode + IRs: + TMP_29(type(A)) = SOLIDITY_CALL type()(A) + REF_15(bytes) (->None) := 6080604052600080fdfea26469706673582212206213b9c5b8ebef4a5a16be67bf75f4031184fb4c87a046b4d24564d5efba773c64736f6c634300080c0033(string) + Expression: type()(I).interfaceId + IRs: + TMP_30(type(I)) = SOLIDITY_CALL type()(I) + REF_16(bytes4) (->None) := 0(bytes4) + Expression: type()(uint256).min + IRs: + TMP_32(uint256) := 0(uint256) + Expression: type()(uint256).min + IRs: + TMP_34(uint256) := 0(uint256) + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..2d089d908f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,19 @@ + +A: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +I: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +Test: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..20b2236bb6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_units_and_global_variables_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,30 @@ + +Contract A ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract I ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract Test ++------------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++------------------------+-------------------------+--------------------------+ +| ether_unit | [] | [] | +| time_unit | [] | [] | +| block_and_transactions | [] | [] | +| abi_encode | [] | [] | +| error_handling | [] | [] | +| math_and_crypto | [] | [] | +| address_related | [] | [] | +| return_addr | [] | [] | +| address_edge_case | [] | [] | +| contract_related | [] | [] | +| type_related | [] | [] | ++------------------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..71fb17ee90 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,37 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipL1.call-graph.dot +Call Graph: tmp.zipL2.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_40_L1 { +label = "L1" +"40_f" [label="f"] +}subgraph cluster_51_L2 { +label = "L2" +"51_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_40_L1 { +label = "L1" +"40_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_51_L2 { +label = "L2" +"51_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..f63ddc32d5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,29 @@ +Export tmp.zip-L1-f(uint256).dot +Export tmp.zip-L2-f(bytes32).dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +a + +IRs: +RETURN a"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +a + +IRs: +RETURN a"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ae172f94ed --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,59 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| L1 | 0 | 0 | 0 | +| L2 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| L1 | 1 | 0 | 0 | 0 | +| L2 | 1 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| L1 | 1 | 0 | 0 | +| L2 | 1 | 0 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| L1 | 1 | 1 | 1 | +| L2 | 1 | 1 | 1 | +| C | 0 | 0 | 0 | +| TOTAL | 2 | 2 | 2 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| L1 | 0 | 1 | 0 | 0 | 0 | +| L2 | 0 | 1 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..2355e2f2ba --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,11 @@ + ++ Contract L1 (Most derived contract) + - From L1 + - f(uint256) (public) + ++ Contract L2 (Most derived contract) + - From L2 + - f(bytes32) (public) + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..2711791291 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,72 @@ + +Contract L1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| | [] | ++----------+--------------+ +Contract L1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| | [] | ++----------+--------------+ +Contract L2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| | [] | ++----------+--------------+ +Contract L1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| | [] | ++----------+--------------+ +Contract L2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..50524a2c5a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,41 @@ + +# Contracts +# L1 + - Declaration: tests/ast-parsing/using-for-0.4.1.sol#1 (9 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/using-for-0.4.1.sol#14 (11 - 13)'] + + ## Function + - L1.f(uint256) + - Declaration: tests/ast-parsing/using-for-0.4.1.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/using-for-0.4.1.sol#2-4 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# L2 + - Declaration: tests/ast-parsing/using-for-0.4.1.sol#7 (9 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/using-for-0.4.1.sol#15 (11 - 13)'] + + ## Function + - L2.f(bytes32) + - Declaration: tests/ast-parsing/using-for-0.4.1.sol#8 (14 - 16) + - Implementation(s): ['tests/ast-parsing/using-for-0.4.1.sol#8-10 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# C + - Declaration: tests/ast-parsing/using-for-0.4.1.sol#13 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..e2cf8c612f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,5 @@ +Export tmp.zip-L1-f(uint256).dot +Export tmp.zip-L2-f(bytes32).dot + +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..02b8f1b9c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,41 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "L1": [ + "f(uint256)" + ], + "L2": [ + "f(bytes32)" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "L1": { + "f(uint256)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "L2": { + "f(bytes32)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..32b58fbab4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,21 @@ + +L1: ++------------+------------+ +| Name | ID | ++------------+------------+ +| f(uint256) | 0xb3de648b | ++------------+------------+ + +L2: ++------------+------------+ +| Name | ID | ++------------+------------+ +| f(bytes32) | 0xd7da973a | ++------------+------------+ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..1a2aac59a1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,45 @@ + +Contract L1 +Contract vars: [] +Inheritance:: [] + ++------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f(uint256) | public | [] | [] | [] | [] | [] | 1 | ++------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract L2 +Contract vars: [] +Inheritance:: [] + ++------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f(bytes32) | public | [] | [] | [] | [] | [] | 1 | ++------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..485f3651b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,31 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| L1 | 1 | 1 | 1 | 1 | +| L2 | 1 | 1 | 1 | 1 | +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| L1 | 2 | 2 | 0 | 2 | +| L2 | 2 | 2 | 0 | 2 | +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| L1 | 0 | 1 | 0 | 0.000 | +| L2 | 0 | 1 | 0 | 0.000 | +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..349789d7b6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 3 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 14 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..2e67859777 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,18 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ L1 + ++ L2 + ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ L1 + ++ L2 + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..27d05ce549 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c57_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..84ddb72aeb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 16 | +| sloc | 0 | 0 | 14 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 30 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..64eeb67355 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,16 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| L1 | 0 | 0 | 0.00 | 0.00 | +| L2 | 0 | 0 | 0.00 | 0.00 | +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..3b673103bd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,18 @@ + +Contract L1 ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ +Contract L2 ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..fd9c5e06bb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,22 @@ +Constructor and pure/view functions are not displayed + +L1: ++------------+-------------------+ +| Name | Use whenNotPaused | ++------------+-------------------+ +| f(uint256) | | ++------------+-------------------+ + +L2: ++------------+-------------------+ +| Name | Use whenNotPaused | ++------------+-------------------+ +| f(bytes32) | | ++------------+-------------------+ + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..c0f7e086c3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,18 @@ + +Contract L1 ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ +Contract L2 ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..fcf1769c3b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,12 @@ +Contract L1 + Function L1.f(uint256) (*) + Expression: a + IRs: + RETURN a +Contract L2 + Function L2.f(bytes32) (*) + Expression: a + IRs: + RETURN a +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..93fae0c3f9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,19 @@ + +L1: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +L2: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..a0a0a58f74 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,21 @@ + +Contract L1 ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract L2 ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..e04c21adf6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,37 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipL1.call-graph.dot +Call Graph: tmp.zipL2.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_11_L1 { +label = "L1" +"11_f" [label="f"] +}subgraph cluster_22_L2 { +label = "L2" +"22_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_11_L1 { +label = "L1" +"11_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_22_L2 { +label = "L2" +"22_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..f63ddc32d5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,29 @@ +Export tmp.zip-L1-f(uint256).dot +Export tmp.zip-L2-f(bytes32).dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +a + +IRs: +RETURN a"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +a + +IRs: +RETURN a"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ae172f94ed --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,59 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| L1 | 0 | 0 | 0 | +| L2 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| L1 | 1 | 0 | 0 | 0 | +| L2 | 1 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| L1 | 1 | 0 | 0 | +| L2 | 1 | 0 | 0 | +| C | 0 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| L1 | 1 | 1 | 1 | +| L2 | 1 | 1 | 1 | +| C | 0 | 0 | 0 | +| TOTAL | 2 | 2 | 2 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| L1 | 0 | 1 | 0 | 0 | 0 | +| L2 | 0 | 1 | 0 | 0 | 0 | +| C | 0 | 0 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..2355e2f2ba --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,11 @@ + ++ Contract L1 (Most derived contract) + - From L1 + - f(uint256) (public) + ++ Contract L2 (Most derived contract) + - From L2 + - f(bytes32) (public) + ++ Contract C (Most derived contract) + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..2711791291 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,72 @@ + +Contract L1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| | [] | ++----------+--------------+ +Contract L1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| | [] | ++----------+--------------+ +Contract L2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| | [] | ++----------+--------------+ +Contract L1 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(uint256) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| | [] | ++----------+--------------+ +Contract L2 ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f(bytes32) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| a | [] | +| | [] | ++----------+--------------+ +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..50524a2c5a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,41 @@ + +# Contracts +# L1 + - Declaration: tests/ast-parsing/using-for-0.4.1.sol#1 (9 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/using-for-0.4.1.sol#14 (11 - 13)'] + + ## Function + - L1.f(uint256) + - Declaration: tests/ast-parsing/using-for-0.4.1.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/using-for-0.4.1.sol#2-4 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# L2 + - Declaration: tests/ast-parsing/using-for-0.4.1.sol#7 (9 - 12) + - Implementation(s): [] + - References: ['tests/ast-parsing/using-for-0.4.1.sol#15 (11 - 13)'] + + ## Function + - L2.f(bytes32) + - Declaration: tests/ast-parsing/using-for-0.4.1.sol#8 (14 - 16) + - Implementation(s): ['tests/ast-parsing/using-for-0.4.1.sol#8-10 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures +# C + - Declaration: tests/ast-parsing/using-for-0.4.1.sol#13 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..e2cf8c612f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,5 @@ +Export tmp.zip-L1-f(uint256).dot +Export tmp.zip-L2-f(bytes32).dot + +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..cc1eefb629 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,41 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "L1": [ + "f(uint256)" + ], + "L2": [ + "f(bytes32)" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "L1": { + "f(uint256)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "L2": { + "f(bytes32)": { + "impacts": [], + "is_impacted_by": [] + } + }, + "C": {} + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..32b58fbab4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,21 @@ + +L1: ++------------+------------+ +| Name | ID | ++------------+------------+ +| f(uint256) | 0xb3de648b | ++------------+------------+ + +L2: ++------------+------------+ +| Name | ID | ++------------+------------+ +| f(bytes32) | 0xd7da973a | ++------------+------------+ + +C: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..1a2aac59a1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,45 @@ + +Contract L1 +Contract vars: [] +Inheritance:: [] + ++------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f(uint256) | public | [] | [] | [] | [] | [] | 1 | ++------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract L2 +Contract vars: [] +Inheritance:: [] + ++------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f(bytes32) | public | [] | [] | [] | [] | [] | 1 | ++------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..485f3651b5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,31 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| L1 | 1 | 1 | 1 | 1 | +| L2 | 1 | 1 | 1 | 1 | +| C | 0 | 0 | 0 | 0 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| L1 | 2 | 2 | 0 | 2 | +| L2 | 2 | 2 | 0 | 2 | +| C | 0 | 0 | 0 | 0 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| L1 | 0 | 1 | 0 | 0.000 | +| L2 | 0 | 1 | 0 | 0.000 | +| C | 0 | 0 | 0 | 0.000 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..349789d7b6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 3 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 14 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..2e67859777 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,18 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ L1 + ++ L2 + ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ L1 + ++ L2 + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..3a5b27a415 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c28_C[shape="box"label=<
C
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..84ddb72aeb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 16 | +| sloc | 0 | 0 | 14 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 30 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..64eeb67355 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,16 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| L1 | 0 | 0 | 0.00 | 0.00 | +| L2 | 0 | 0 | 0.00 | 0.00 | +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..3b673103bd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,18 @@ + +Contract L1 ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ +Contract L2 ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..fd9c5e06bb --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,22 @@ +Constructor and pure/view functions are not displayed + +L1: ++------------+-------------------+ +| Name | Use whenNotPaused | ++------------+-------------------+ +| f(uint256) | | ++------------+-------------------+ + +L2: ++------------+-------------------+ +| Name | Use whenNotPaused | ++------------+-------------------+ +| f(bytes32) | | ++------------+-------------------+ + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..c0f7e086c3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,18 @@ + +Contract L1 ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ +Contract L2 ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..fcf1769c3b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,12 @@ +Contract L1 + Function L1.f(uint256) (*) + Expression: a + IRs: + RETURN a +Contract L2 + Function L2.f(bytes32) (*) + Expression: a + IRs: + RETURN a +Contract C + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..93fae0c3f9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,19 @@ + +L1: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +L2: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..a0a0a58f74 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_using_for_0_4_1_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,21 @@ + +Contract L1 ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract L2 ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..644d301fbf --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,21 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_307_C { +label = "C" +"307_basic" [label="basic"] +"307_basic2" [label="basic2"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_307_C { +label = "C" +"307_basic" [label="basic"] +"307_basic2" [label="basic2"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..de2e5884bf --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,131 @@ +Export tmp.zip-C-basic().dot +Export tmp.zip-C-basic2().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: NEW VARIABLE 3 +"]; +3->4; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +stringStorage_ = s + +IRs: +stringStorage_(string) := s(string)"]; +4->5; +5[label="Node Type: NEW VARIABLE 5 +"]; +5->6; +6[label="Node Type: NEW VARIABLE 6 +"]; +6->7; +7[label="Node Type: NEW VARIABLE 7 +"]; +7->8; +8[label="Node Type: NEW VARIABLE 8 +"]; +8->9; +9[label="Node Type: NEW VARIABLE 9 +"]; +9->10; +10[label="Node Type: NEW VARIABLE 10 +"]; +10->11; +11[label="Node Type: NEW VARIABLE 11 +"]; +11->12; +12[label="Node Type: NEW VARIABLE 12 +"]; +12->13; +13[label="Node Type: NEW VARIABLE 13 + +EXPRESSION: +bytesStorage_ = b + +IRs: +bytesStorage_(bytes) := b(bytes)"]; +13->14; +14[label="Node Type: NEW VARIABLE 14 +"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: NEW VARIABLE 3 +"]; +3->4; +4[label="Node Type: NEW VARIABLE 4 +"]; +4->5; +5[label="Node Type: NEW VARIABLE 5 +"]; +5->6; +6[label="Node Type: NEW VARIABLE 6 +"]; +6->7; +7[label="Node Type: NEW VARIABLE 7 +"]; +7->8; +8[label="Node Type: NEW VARIABLE 8 + +EXPRESSION: +sStorage_ = t + +IRs: +sStorage_(C.S) := t(C.S)"]; +8->9; +9[label="Node Type: NEW VARIABLE 9 + +EXPRESSION: +mappingStorage_ = m + +IRs: +mappingStorage_(mapping(uint256 => uint256)) := m(mapping(uint256 => uint256))"]; +9->10; +10[label="Node Type: NEW VARIABLE 10 +"]; +10->11; +11[label="Node Type: NEW VARIABLE 11 + +EXPRESSION: +arrayStorage_ = a + +IRs: +arrayStorage_(uint256[]) := a(uint256[])"]; +11->12; +12[label="Node Type: NEW VARIABLE 12 +"]; +12->13; +13[label="Node Type: NEW VARIABLE 13 +"]; +13->14; +14[label="Node Type: NEW VARIABLE 14 +"]; +14->15; +15[label="Node Type: NEW VARIABLE 15 +"]; +15->16; +16[label="Node Type: NEW VARIABLE 16 +"]; +16->17; +17[label="Node Type: NEW VARIABLE 17 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..b6475ed811 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 5 | 0 | 0 | +| TOTAL | 5 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 2 | 0 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 2 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 2 | 2 | 2 | +| TOTAL | 2 | 2 | 2 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 2 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..502ce42452 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,6 @@ + ++ Contract C (Most derived contract) + - From C + - basic() (public) + - basic2() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..63d43a2772 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,63 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| m | ['m'] | +| s | ['s'] | +| b | ['b'] | +| t | ['t'] | +| a | ['a'] | ++----------+--------------+ + +Function basic() ++----------------+--------------+ +| Variable | Dependencies | ++----------------+--------------+ +| address_ | [] | +| bool_ | [] | +| stringMemory_ | [] | +| stringStorage_ | [] | +| int_ | [] | +| int256_ | [] | +| int8_ | [] | +| uint_ | [] | +| uint256_ | [] | +| uint8_ | [] | +| byte_ | [] | +| bytesMemory_ | [] | +| bytesStorage_ | [] | +| byte32_ | [] | +| C.m | [] | +| C.s | ['s'] | +| C.b | ['b'] | +| C.t | [] | +| C.a | [] | ++----------------+--------------+ +Function basic2() ++------------------------------+--------------+ +| Variable | Dependencies | ++------------------------------+--------------+ +| fixed_ | [] | +| fixed128x18_ | [] | +| fixed8x0_ | [] | +| ufixed_ | [] | +| ufixed128x18_ | [] | +| ufixed8x0_ | [] | +| sMemory_ | [] | +| sStorage_ | [] | +| mappingStorage_ | [] | +| arrayMemory_ | [] | +| arrayStorage_ | [] | +| funcEmptyInternalEmpty_ | [] | +| funcUintInternalEmpty_ | [] | +| funcUintInternalUint_ | [] | +| funcUintExternalPayableUint_ | [] | +| funcUintExternalViewUint_ | [] | +| addressPayable_ | [] | +| C.m | ['m'] | +| C.s | [] | +| C.b | [] | +| C.t | ['t'] | +| C.a | ['a'] | ++------------------------------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..33494a8366 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,47 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/variable-0.5.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.basic() + - Declaration: tests/ast-parsing/variable-0.5.0.sol#12 (14 - 20) + - Implementation(s): ['tests/ast-parsing/variable-0.5.0.sol#12-27 (5 - 6)'] + - References: [] + - C.basic2() + - Declaration: tests/ast-parsing/variable-0.5.0.sol#29 (14 - 21) + - Implementation(s): ['tests/ast-parsing/variable-0.5.0.sol#29-52 (5 - 6)'] + - References: [] + + ## State variables + - m + - Declaration: tests/ast-parsing/variable-0.5.0.sol#6 (27 - 29) + - Implementation: tests/ast-parsing/variable-0.5.0.sol#6 (5 - 28) + - References: ['tests/ast-parsing/variable-0.5.0.sol#40 (55 - 56)'] + - s + - Declaration: tests/ast-parsing/variable-0.5.0.sol#7 (12 - 14) + - Implementation: tests/ast-parsing/variable-0.5.0.sol#7 (5 - 13) + - References: ['tests/ast-parsing/variable-0.5.0.sol#16 (41 - 42)'] + - b + - Declaration: tests/ast-parsing/variable-0.5.0.sol#8 (11 - 13) + - Implementation: tests/ast-parsing/variable-0.5.0.sol#8 (5 - 12) + - References: ['tests/ast-parsing/variable-0.5.0.sol#25 (39 - 40)'] + - t + - Declaration: tests/ast-parsing/variable-0.5.0.sol#9 (7 - 9) + - Implementation: tests/ast-parsing/variable-0.5.0.sol#9 (5 - 8) + - References: ['tests/ast-parsing/variable-0.5.0.sol#38 (31 - 32)'] + - a + - Declaration: tests/ast-parsing/variable-0.5.0.sol#10 (12 - 14) + - Implementation: tests/ast-parsing/variable-0.5.0.sol#10 (5 - 13) + - References: ['tests/ast-parsing/variable-0.5.0.sol#43 (40 - 41)'] + + ## Structures + - S + - Declaration: struct S { + uint a; + } + - Implementation: tests/ast-parsing/variable-0.5.0.sol#2-4 (5 - 6) + - References: ['tests/ast-parsing/variable-0.5.0.sol#9 (5 - 6)', 'tests/ast-parsing/variable-0.5.0.sol#37 (9 - 10)', 'tests/ast-parsing/variable-0.5.0.sol#38 (9 - 10)'] + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..d6642b93dc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,5 @@ +Export tmp.zip-C-basic().dot +Export tmp.zip-C-basic2().dot + +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..a1ceb61acc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,36 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "basic()", + "basic2()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "basic()": { + "impacts": [], + "is_impacted_by": [] + }, + "basic2()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..b6f0b22828 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,9 @@ + +C: ++----------+------------+ +| Name | ID | ++----------+------------+ +| basic() | 0x15e8b345 | +| basic2() | 0xa6ad21ab | ++----------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..7fd3d86924 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,18 @@ + +Contract C +Contract vars: ['m', 's', 'b', 't', 'a'] +Inheritance:: [] + ++----------+------------+-----------+------------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------------+-------+----------------+----------------+-----------------------+ +| basic() | public | [] | ['b', 's'] | [] | [] | [] | 1 | +| basic2() | public | [] | ['a', 'm'] | [] | [] | [] | 1 | +| | | | ['t'] | | | | | ++----------+------------+-----------+------------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..7a0881dade --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 5 | 1 | 10 | 10 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 11 | 15 | 33 | 52 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 26 | 1 | 0.003 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..4461892700 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 45 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..259bddc2f1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c307_C[shape="box"label=<
C
Public Functions:
basic()
basic2()
Private Variables:
m
s
b
t
a
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..6dd00c0b5d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 53 | +| sloc | 0 | 0 | 45 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 98 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..8fbb617b0f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| basic | [] | +| basic2 | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..0cc3090cf4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,10 @@ +Constructor and pure/view functions are not displayed + +C: ++----------+-------------------+ +| Name | Use whenNotPaused | ++----------+-------------------+ +| basic() | | +| basic2() | | ++----------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..824a692745 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| basic | | +| basic2 | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..2c2733b2de --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,19 @@ +Contract C + Function C.basic() (*) + Expression: stringStorage_ = s + IRs: + stringStorage_(string) := s(string) + Expression: bytesStorage_ = b + IRs: + bytesStorage_(bytes) := b(bytes) + Function C.basic2() (*) + Expression: sStorage_ = t + IRs: + sStorage_(C.S) := t(C.S) + Expression: mappingStorage_ = m + IRs: + mappingStorage_(mapping(uint256 => uint256)) := m(mapping(uint256 => uint256)) + Expression: arrayStorage_ = a + IRs: + arrayStorage_(uint256[]) := a(uint256[]) + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..6a2724ecd6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,12 @@ + +C: ++------+-----------------------------+------+--------+ +| Name | Type | Slot | Offset | ++------+-----------------------------+------+--------+ +| C.m | mapping(uint256 => uint256) | 0 | 0 | +| C.s | string | 1 | 0 | +| C.b | bytes | 2 | 0 | +| C.t | C.S | 3 | 0 | +| C.a | uint256[] | 4 | 0 | ++------+-----------------------------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..6e696297d5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,9 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| basic | [] | [] | +| basic2 | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..95fe85a0be --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,20 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_173_C { +label = "C" +"173_basic" [label="basic"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_173_C { +label = "C" +"173_basic" [label="basic"] +"173_slitherConstructorVariables" [label="slitherConstructorVariables"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..ff4370bdbd --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,148 @@ +Export tmp.zip-C-basic().dot +Export tmp.zip-C-slitherConstructorVariables().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: NEW VARIABLE 3 +"]; +3->4; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +stringStorage_ = s + +IRs: +stringStorage_(string) := s(string)"]; +4->5; +5[label="Node Type: NEW VARIABLE 5 +"]; +5->6; +6[label="Node Type: NEW VARIABLE 6 +"]; +6->7; +7[label="Node Type: NEW VARIABLE 7 +"]; +7->8; +8[label="Node Type: NEW VARIABLE 8 +"]; +8->9; +9[label="Node Type: NEW VARIABLE 9 +"]; +9->10; +10[label="Node Type: NEW VARIABLE 10 +"]; +10->11; +11[label="Node Type: NEW VARIABLE 11 +"]; +11->12; +12[label="Node Type: NEW VARIABLE 12 +"]; +12->13; +13[label="Node Type: NEW VARIABLE 13 +"]; +13->14; +14[label="Node Type: NEW VARIABLE 14 + +EXPRESSION: +bytesStorage_ = b + +IRs: +bytesStorage_(bytes) := b(bytes)"]; +14->15; +15[label="Node Type: NEW VARIABLE 15 +"]; +15->16; +16[label="Node Type: NEW VARIABLE 16 +"]; +16->17; +17[label="Node Type: NEW VARIABLE 17 +"]; +17->18; +18[label="Node Type: NEW VARIABLE 18 +"]; +18->19; +19[label="Node Type: NEW VARIABLE 19 +"]; +19->20; +20[label="Node Type: NEW VARIABLE 20 +"]; +20->21; +21[label="Node Type: NEW VARIABLE 21 +"]; +21->22; +22[label="Node Type: NEW VARIABLE 22 +"]; +22->23; +23[label="Node Type: NEW VARIABLE 23 +"]; +23->24; +24[label="Node Type: NEW VARIABLE 24 + +EXPRESSION: +sStorage_ = t + +IRs: +sStorage_(C.S) := t(C.S)"]; +24->25; +25[label="Node Type: NEW VARIABLE 25 +"]; +25->26; +26[label="Node Type: NEW VARIABLE 26 + +EXPRESSION: +mappingStorage_ = m + +IRs: +mappingStorage_(mapping(uint256 => uint256)) := m(mapping(uint256 => uint256))"]; +26->27; +27[label="Node Type: NEW VARIABLE 27 +"]; +27->28; +28[label="Node Type: NEW VARIABLE 28 + +EXPRESSION: +arrayStorage_ = a + +IRs: +arrayStorage_(uint256[]) := a(uint256[])"]; +28->29; +29[label="Node Type: NEW VARIABLE 29 +"]; +29->30; +30[label="Node Type: NEW VARIABLE 30 +"]; +30->31; +31[label="Node Type: NEW VARIABLE 31 +"]; +31->32; +32[label="Node Type: NEW VARIABLE 32 +"]; +32->33; +33[label="Node Type: NEW VARIABLE 33 +"]; +33->34; +34[label="Node Type: NEW VARIABLE 34 +"]; +34->35; +35[label="Node Type: NEW VARIABLE 35 +"]; +} + +digraph{ +0[label="Node Type: OTHER_ENTRYPOINT 0 + +EXPRESSION: +immutableInt = 1 + +IRs: +immutableInt(uint256) := 1(uint256)"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..4beba829c8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 5 | 0 | 1 | +| TOTAL | 5 | 0 | 1 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 1 | 0 | +| TOTAL | 1 | 0 | 1 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 2 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..d3a689a723 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - basic() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..158f4146ee --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,70 @@ + +Contract C ++--------------+--------------+ +| Variable | Dependencies | ++--------------+--------------+ +| m | ['m'] | +| s | ['s'] | +| b | ['b'] | +| t | ['t'] | +| a | ['a'] | +| immutableInt | [] | ++--------------+--------------+ + +Function basic() ++------------------------------+--------------+ +| Variable | Dependencies | ++------------------------------+--------------+ +| address_ | [] | +| bool_ | [] | +| stringMemory_ | [] | +| stringStorage_ | [] | +| stringCalldata_ | [] | +| int_ | [] | +| int256_ | [] | +| int8_ | [] | +| uint_ | [] | +| uint256_ | [] | +| uint8_ | [] | +| byte_ | [] | +| bytesMemory_ | [] | +| bytesStorage_ | [] | +| bytesCalldata_ | [] | +| byte32_ | [] | +| fixed_ | [] | +| fixed128x18_ | [] | +| fixed8x0_ | [] | +| ufixed_ | [] | +| ufixed128x18_ | [] | +| ufixed8x0_ | [] | +| sMemory_ | [] | +| sStorage_ | [] | +| sCalldata_ | [] | +| mappingStorage_ | [] | +| arrayMemory_ | [] | +| arrayStorage_ | [] | +| arrayCalldata_ | [] | +| funcEmptyInternalEmpty_ | [] | +| funcUintInternalEmpty_ | [] | +| funcUintInternalUint_ | [] | +| funcUintExternalPayableUint_ | [] | +| funcUintExternalViewUint_ | [] | +| addressPayable_ | [] | +| C.m | ['m'] | +| C.s | ['s'] | +| C.b | ['b'] | +| C.t | ['t'] | +| C.a | ['a'] | +| C.immutableInt | [] | ++------------------------------+--------------+ +Function slitherConstructorVariables() ++----------------+--------------+ +| Variable | Dependencies | ++----------------+--------------+ +| C.m | [] | +| C.s | [] | +| C.b | [] | +| C.t | [] | +| C.a | [] | +| C.immutableInt | [] | ++----------------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..96ec1b6956 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,51 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/variable-0.8.0.sol#1 (10 - 12) + - Implementation(s): ['tests/ast-parsing/variable-0.8.0.sol#1-56 (1 - 2)'] + - References: [] + + ## Function + - C.basic() + - Declaration: tests/ast-parsing/variable-0.8.0.sol#14 (14 - 20) + - Implementation(s): ['tests/ast-parsing/variable-0.8.0.sol#14-55 (5 - 6)'] + - References: [] + - C.slitherConstructorVariables() + - Declaration: tests/ast-parsing/variable-0.8.0.sol#1-3 (1 - 1) + - Implementation(s): ['tests/ast-parsing/variable-0.8.0.sol#1-56 (1 - 2)'] + - References: [] + + ## State variables + - m + - Declaration: tests/ast-parsing/variable-0.8.0.sol#6 (27 - 29) + - Implementation: tests/ast-parsing/variable-0.8.0.sol#6 (5 - 28) + - References: ['tests/ast-parsing/variable-0.8.0.sol#42 (55 - 56)'] + - s + - Declaration: tests/ast-parsing/variable-0.8.0.sol#7 (12 - 14) + - Implementation: tests/ast-parsing/variable-0.8.0.sol#7 (5 - 13) + - References: ['tests/ast-parsing/variable-0.8.0.sol#18 (41 - 42)'] + - b + - Declaration: tests/ast-parsing/variable-0.8.0.sol#8 (11 - 13) + - Implementation: tests/ast-parsing/variable-0.8.0.sol#8 (5 - 12) + - References: ['tests/ast-parsing/variable-0.8.0.sol#28 (39 - 40)'] + - t + - Declaration: tests/ast-parsing/variable-0.8.0.sol#9 (7 - 9) + - Implementation: tests/ast-parsing/variable-0.8.0.sol#9 (5 - 8) + - References: ['tests/ast-parsing/variable-0.8.0.sol#39 (31 - 32)'] + - a + - Declaration: tests/ast-parsing/variable-0.8.0.sol#10 (12 - 14) + - Implementation: tests/ast-parsing/variable-0.8.0.sol#10 (5 - 13) + - References: ['tests/ast-parsing/variable-0.8.0.sol#45 (40 - 41)'] + - immutableInt + - Declaration: tests/ast-parsing/variable-0.8.0.sol#12 (20 - 33) + - Implementation: tests/ast-parsing/variable-0.8.0.sol#12 (5 - 36) + - References: [] + + ## Structures + - S + - Declaration: struct S { + uint a; + } + - Implementation: tests/ast-parsing/variable-0.8.0.sol#2-4 (5 - 6) + - References: ['tests/ast-parsing/variable-0.8.0.sol#9 (5 - 6)', 'tests/ast-parsing/variable-0.8.0.sol#38 (9 - 10)', 'tests/ast-parsing/variable-0.8.0.sol#39 (9 - 10)', 'tests/ast-parsing/variable-0.8.0.sol#40 (9 - 10)'] + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..24043e3238 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,5 @@ +Export tmp.zip-C-basic().dot +Export tmp.zip-C-slitherConstructorVariables().dot + +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..9b992b44bc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,31 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "basic()" + ] + }, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "basic()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..1e452dbead --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++---------+------------+ +| Name | ID | ++---------+------------+ +| basic() | 0x15e8b345 | ++---------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..de532c26b0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,19 @@ + +Contract C +Contract vars: ['m', 's', 'b', 't', 'a', 'immutableInt'] +Inheritance:: [] + ++-------------------------------+------------+-----------+------------+------------------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-------------------------------+------------+-----------+------------+------------------+----------------+----------------+-----------------------+ +| basic() | public | [] | ['a', 'b'] | [] | [] | [] | 1 | +| | | | ['m', 's'] | | | | | +| | | | ['t'] | | | | | +| slitherConstructorVariables() | internal | [] | [] | ['immutableInt'] | [] | [] | 1 | ++-------------------------------+------------+-----------+------------+------------------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..5426d80189 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 6 | 1 | 12 | 12 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 13 | 18 | 43 | 67 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 0 | 33 | 2 | 0.003 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..ce3a2fd440 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 48 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..0eede98e3f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c173_C[shape="box"label=<
C
Public Functions:
basic()
Private Variables:
m
s
b
t
a
immutableInt
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..e679b5506f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 56 | +| sloc | 0 | 0 | 48 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 104 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..a553add559 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,8 @@ + +Contract C ++-----------------------------+-----------+ +| Function | Modifiers | ++-----------------------------+-----------+ +| basic | [] | +| slitherConstructorVariables | [] | ++-----------------------------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..8becf0d8a9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++---------+-------------------+ +| Name | Use whenNotPaused | ++---------+-------------------+ +| basic() | | ++---------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..ac123e3a86 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,8 @@ + +Contract C ++-----------------------------+-------------------+ +| Function | require or assert | ++-----------------------------+-------------------+ +| basic | | +| slitherConstructorVariables | | ++-----------------------------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..e5f5f9f78b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,22 @@ +Contract C + Function C.basic() (*) + Expression: stringStorage_ = s + IRs: + stringStorage_(string) := s(string) + Expression: bytesStorage_ = b + IRs: + bytesStorage_(bytes) := b(bytes) + Expression: sStorage_ = t + IRs: + sStorage_(C.S) := t(C.S) + Expression: mappingStorage_ = m + IRs: + mappingStorage_(mapping(uint256 => uint256)) := m(mapping(uint256 => uint256)) + Expression: arrayStorage_ = a + IRs: + arrayStorage_(uint256[]) := a(uint256[]) + Function C.slitherConstructorVariables() (*) + Expression: immutableInt = 1 + IRs: + immutableInt(uint256) := 1(uint256) + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..6a2724ecd6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,12 @@ + +C: ++------+-----------------------------+------+--------+ +| Name | Type | Slot | Offset | ++------+-----------------------------+------+--------+ +| C.m | mapping(uint256 => uint256) | 0 | 0 | +| C.s | string | 1 | 0 | +| C.b | bytes | 2 | 0 | +| C.t | C.S | 3 | 0 | +| C.a | uint256[] | 4 | 0 | ++------+-----------------------------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..2d825217ba --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variable_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,9 @@ + +Contract C ++-----------------------------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++-----------------------------+-------------------------+--------------------------+ +| basic | [] | [] | +| slitherConstructorVariables | ['immutableInt'] | [] | ++-----------------------------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..2544753a74 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,23 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_139_C { +label = "C" +"139_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +"balance(address)" +"139_f" -> "balance(address)" +} +} +strict digraph { +subgraph cluster_139_C { +label = "C" +"139_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +"balance(address)" +"139_f" -> "balance(address)" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..7db0c9f8f5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,108 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +explicitUint8 = 0 + +IRs: +explicitUint8(uint8) := 0(uint256)"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +explicitUint16 = 256 + +IRs: +explicitUint16(uint16) := 256(uint256)"]; +2->3; +3[label="Node Type: NEW VARIABLE 3 +"]; +3->4; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +tuplea1 = 1 + +IRs: +tuplea1(uint256) := 1(uint256)"]; +4->5; +5[label="Node Type: NEW VARIABLE 5 + +EXPRESSION: +tuplea2 = 2 + +IRs: +tuplea2(uint256) := 2(uint256)"]; +5->6; +6[label="Node Type: NEW VARIABLE 6 + +EXPRESSION: +tupleb1 = 1 + +IRs: +tupleb1(uint256) := 1(uint256)"]; +6->7; +7[label="Node Type: NEW VARIABLE 7 + +EXPRESSION: +tupleb3 = 2 + +IRs: +tupleb3(uint256) := 2(uint256)"]; +7->8; +8[label="Node Type: NEW VARIABLE 8 + +EXPRESSION: +tuplec6 = 1 + +IRs: +tuplec6(uint256) := 1(uint256)"]; +8->12; +10[label="Node Type: NEW VARIABLE 10 +"]; +10->11; +11[label="Node Type: NEW VARIABLE 11 + +EXPRESSION: +overwritten1 = overwritten = 10 + +IRs: +overwritten(uint256) := 10(uint256) +overwritten1(uint256) := overwritten(uint256)"]; +12[label="Node Type: IF 12 + +EXPRESSION: +msg.sender.balance > 0 + +IRs: +REF_0(uint256) = SOLIDITY_CALL balance(address)(msg.sender) +TMP_0(bool) = REF_0 > 0 +CONDITION TMP_0"]; +12->13[label="True"]; +12->14[label="False"]; +13[label="Node Type: EXPRESSION 13 + +EXPRESSION: +ternaryInit = msg.sender + +IRs: +ternaryInit(address) := msg.sender(address)"]; +13->15; +14[label="Node Type: EXPRESSION 14 + +EXPRESSION: +ternaryInit = block.coinbase + +IRs: +ternaryInit(address) := block.coinbase(address)"]; +14->15; +15[label="Node Type: END_IF 15 +"]; +15->10; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..028a7f68ec --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,23 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------------+----------------------------------+ +| Variable | Dependencies | ++----------------+----------------------------------+ +| explicitUint8 | [] | +| explicitUint16 | [] | +| uintArr | [] | +| tuplea1 | [] | +| tuplea2 | [] | +| tupleb1 | [] | +| tupleb3 | [] | +| tuplec6 | [] | +| ternaryInit | ['block.coinbase', 'msg.sender'] | +| overwritten | [] | +| overwritten1 | ['overwritten'] | ++----------------+----------------------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..e1113c8427 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/variabledeclaration-0.5.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/variabledeclaration-0.5.0.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/variabledeclaration-0.5.0.sol#2-18 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..d0037a30f7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,87 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": { + "C": [ + "f()" + ] + }, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "256", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.GREATER": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": { + "C": [ + "f()" + ] + }, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..6b0bd07199 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+----------------------------------+-------+----------------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+----------------------------------+-------+----------------------+----------------+-----------------------+ +| f() | public | [] | ['block.coinbase', 'msg.sender'] | [] | ['balance(address)'] | [] | 2 | ++----------+------------+-----------+----------------------------------+-------+----------------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..71fa3514fe --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 14 | 4 | 26 | 18 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 22 | 40 | 83 | 178 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 3 | 515 | 29 | 0.021 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..1124fd063f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 13 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..84651fa112 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c139_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..405969472a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 19 | +| sloc | 0 | 0 | 13 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 32 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..b1b8a11b60 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,39 @@ +Contract C + Function C.f() (*) + Expression: explicitUint8 = 0 + IRs: + explicitUint8(uint8) := 0(uint256) + Expression: explicitUint16 = 256 + IRs: + explicitUint16(uint16) := 256(uint256) + Expression: tuplea1 = 1 + IRs: + tuplea1(uint256) := 1(uint256) + Expression: tuplea2 = 2 + IRs: + tuplea2(uint256) := 2(uint256) + Expression: tupleb1 = 1 + IRs: + tupleb1(uint256) := 1(uint256) + Expression: tupleb3 = 2 + IRs: + tupleb3(uint256) := 2(uint256) + Expression: tuplec6 = 1 + IRs: + tuplec6(uint256) := 1(uint256) + Expression: overwritten1 = overwritten = 10 + IRs: + overwritten(uint256) := 10(uint256) + overwritten1(uint256) := overwritten(uint256) + Expression: msg.sender.balance > 0 + IRs: + REF_0(uint256) = SOLIDITY_CALL balance(address)(msg.sender) + TMP_0(bool) = REF_0 > 0 + CONDITION TMP_0 + Expression: ternaryInit = msg.sender + IRs: + ternaryInit(address) := msg.sender(address) + Expression: ternaryInit = block.coinbase + IRs: + ternaryInit(address) := block.coinbase(address) + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..15b69ead81 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+----------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+----------------------------+ +| f | [] | ['msg.sender.balance > 0'] | ++----------+-------------------------+----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..074df3e51b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,23 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_70_C { +label = "C" +"70_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +"balance(address)" +"70_f" -> "balance(address)" +} +} +strict digraph { +subgraph cluster_70_C { +label = "C" +"70_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +"balance(address)" +"70_f" -> "balance(address)" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..7db0c9f8f5 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,108 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +explicitUint8 = 0 + +IRs: +explicitUint8(uint8) := 0(uint256)"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +explicitUint16 = 256 + +IRs: +explicitUint16(uint16) := 256(uint256)"]; +2->3; +3[label="Node Type: NEW VARIABLE 3 +"]; +3->4; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +tuplea1 = 1 + +IRs: +tuplea1(uint256) := 1(uint256)"]; +4->5; +5[label="Node Type: NEW VARIABLE 5 + +EXPRESSION: +tuplea2 = 2 + +IRs: +tuplea2(uint256) := 2(uint256)"]; +5->6; +6[label="Node Type: NEW VARIABLE 6 + +EXPRESSION: +tupleb1 = 1 + +IRs: +tupleb1(uint256) := 1(uint256)"]; +6->7; +7[label="Node Type: NEW VARIABLE 7 + +EXPRESSION: +tupleb3 = 2 + +IRs: +tupleb3(uint256) := 2(uint256)"]; +7->8; +8[label="Node Type: NEW VARIABLE 8 + +EXPRESSION: +tuplec6 = 1 + +IRs: +tuplec6(uint256) := 1(uint256)"]; +8->12; +10[label="Node Type: NEW VARIABLE 10 +"]; +10->11; +11[label="Node Type: NEW VARIABLE 11 + +EXPRESSION: +overwritten1 = overwritten = 10 + +IRs: +overwritten(uint256) := 10(uint256) +overwritten1(uint256) := overwritten(uint256)"]; +12[label="Node Type: IF 12 + +EXPRESSION: +msg.sender.balance > 0 + +IRs: +REF_0(uint256) = SOLIDITY_CALL balance(address)(msg.sender) +TMP_0(bool) = REF_0 > 0 +CONDITION TMP_0"]; +12->13[label="True"]; +12->14[label="False"]; +13[label="Node Type: EXPRESSION 13 + +EXPRESSION: +ternaryInit = msg.sender + +IRs: +ternaryInit(address) := msg.sender(address)"]; +13->15; +14[label="Node Type: EXPRESSION 14 + +EXPRESSION: +ternaryInit = block.coinbase + +IRs: +ternaryInit(address) := block.coinbase(address)"]; +14->15; +15[label="Node Type: END_IF 15 +"]; +15->10; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..028a7f68ec --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,23 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------------+----------------------------------+ +| Variable | Dependencies | ++----------------+----------------------------------+ +| explicitUint8 | [] | +| explicitUint16 | [] | +| uintArr | [] | +| tuplea1 | [] | +| tuplea2 | [] | +| tupleb1 | [] | +| tupleb3 | [] | +| tuplec6 | [] | +| ternaryInit | ['block.coinbase', 'msg.sender'] | +| overwritten | [] | +| overwritten1 | ['overwritten'] | ++----------------+----------------------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..e1113c8427 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/variabledeclaration-0.5.0.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/variabledeclaration-0.5.0.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/variabledeclaration-0.5.0.sol#2-18 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..6a07bbe021 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,87 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": { + "C": [ + "f()" + ] + }, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "0", + "type": "uint256" + } + ], + [ + { + "value": "1", + "type": "uint256" + } + ], + [ + { + "value": "10", + "type": "uint256" + } + ], + [ + { + "value": "2", + "type": "uint256" + } + ], + [ + { + "value": "256", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": { + "C": { + "f()": { + "BinaryType.GREATER": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + } + } + }, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": { + "C": [ + "f()" + ] + }, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..6b0bd07199 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+----------------------------------+-------+----------------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+----------------------------------+-------+----------------------+----------------+-----------------------+ +| f() | public | [] | ['block.coinbase', 'msg.sender'] | [] | ['balance(address)'] | [] | 2 | ++----------+------------+-----------+----------------------------------+-------+----------------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..71fa3514fe --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 14 | 4 | 26 | 18 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 22 | 40 | 83 | 178 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 3 | 515 | 29 | 0.021 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..1124fd063f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 13 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..ed6fd2ce70 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c70_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..405969472a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 19 | +| sloc | 0 | 0 | 13 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 32 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..b1b8a11b60 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,39 @@ +Contract C + Function C.f() (*) + Expression: explicitUint8 = 0 + IRs: + explicitUint8(uint8) := 0(uint256) + Expression: explicitUint16 = 256 + IRs: + explicitUint16(uint16) := 256(uint256) + Expression: tuplea1 = 1 + IRs: + tuplea1(uint256) := 1(uint256) + Expression: tuplea2 = 2 + IRs: + tuplea2(uint256) := 2(uint256) + Expression: tupleb1 = 1 + IRs: + tupleb1(uint256) := 1(uint256) + Expression: tupleb3 = 2 + IRs: + tupleb3(uint256) := 2(uint256) + Expression: tuplec6 = 1 + IRs: + tuplec6(uint256) := 1(uint256) + Expression: overwritten1 = overwritten = 10 + IRs: + overwritten(uint256) := 10(uint256) + overwritten1(uint256) := overwritten(uint256) + Expression: msg.sender.balance > 0 + IRs: + REF_0(uint256) = SOLIDITY_CALL balance(address)(msg.sender) + TMP_0(bool) = REF_0 > 0 + CONDITION TMP_0 + Expression: ternaryInit = msg.sender + IRs: + ternaryInit(address) := msg.sender(address) + Expression: ternaryInit = block.coinbase + IRs: + ternaryInit(address) := block.coinbase(address) + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..15b69ead81 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_variabledeclaration_0_5_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+----------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+----------------------------+ +| f | [] | ['msg.sender.balance > 0'] | ++----------+-------------------------+----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..351ba9a906 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_53_C { +label = "C" +"53_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_53_C { +label = "C" +"53_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..7d55f21065 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,69 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +go = true + +IRs: +go(bool) := True(bool)"]; +1->2; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->3; +3[label="Node Type: IF_LOOP 3 + +EXPRESSION: +go + +IRs: +CONDITION go"]; +3->4[label="True"]; +3->5[label="False"]; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +go = false + +IRs: +go(bool) := False(bool)"]; +4->3; +5[label="Node Type: END_LOOP 5 +"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +go = true + +IRs: +go(bool) := True(bool)"]; +6->7; +7[label="Node Type: BEGIN_LOOP 7 +"]; +7->8; +8[label="Node Type: IF_LOOP 8 + +EXPRESSION: +go + +IRs: +CONDITION go"]; +8->9[label="True"]; +8->10[label="False"]; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +go = false + +IRs: +go(bool) := False(bool)"]; +9->8; +10[label="Node Type: END_LOOP 10 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..f62c5990f0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,13 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| go | ['go'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..57e3e538f4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/while-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/while-all.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/while-all.sol#2-10 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..a50f23c780 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,48 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "False", + "type": "bool" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..4d7b7ca36e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 3 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..a32adce360 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 6 | 2 | 10 | 3 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 5 | 16 | 7 | 37 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 3 | 124 | 7 | 0.008 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..45060c9912 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 10 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..e9395c94e6 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c53_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..f8db37c75e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 11 | +| sloc | 0 | 0 | 10 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 21 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..826a2ac156 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,21 @@ +Contract C + Function C.f() (*) + Expression: go = true + IRs: + go(bool) := True(bool) + Expression: go + IRs: + CONDITION go + Expression: go = false + IRs: + go(bool) := False(bool) + Expression: go = true + IRs: + go(bool) := True(bool) + Expression: go + IRs: + CONDITION go + Expression: go = false + IRs: + go(bool) := False(bool) + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..3c958edb1b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,19 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_26_C { +label = "C" +"26_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_26_C { +label = "C" +"26_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..7d55f21065 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,69 @@ +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +go = true + +IRs: +go(bool) := True(bool)"]; +1->2; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->3; +3[label="Node Type: IF_LOOP 3 + +EXPRESSION: +go + +IRs: +CONDITION go"]; +3->4[label="True"]; +3->5[label="False"]; +4[label="Node Type: EXPRESSION 4 + +EXPRESSION: +go = false + +IRs: +go(bool) := False(bool)"]; +4->3; +5[label="Node Type: END_LOOP 5 +"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +go = true + +IRs: +go(bool) := True(bool)"]; +6->7; +7[label="Node Type: BEGIN_LOOP 7 +"]; +7->8; +8[label="Node Type: IF_LOOP 8 + +EXPRESSION: +go + +IRs: +CONDITION go"]; +8->9[label="True"]; +8->10[label="False"]; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +go = false + +IRs: +go(bool) := False(bool)"]; +9->8; +10[label="Node Type: END_LOOP 10 +"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..ff0c0bdd03 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,49 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| C | 0 | 0 | 0 | +| TOTAL | 0 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..aab9458c69 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,5 @@ + ++ Contract C (Most derived contract) + - From C + - f() (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..f62c5990f0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,13 @@ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| go | ['go'] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..57e3e538f4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,17 @@ + +# Contracts +# C + - Declaration: tests/ast-parsing/while-all.sol#1 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f() + - Declaration: tests/ast-parsing/while-all.sol#2 (14 - 16) + - Implementation(s): ['tests/ast-parsing/while-all.sol#2-10 (5 - 6)'] + - References: [] + + ## State variables + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..ab31fe290a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f().dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..acd650cdce --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,48 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": { + "C": [ + "f()" + ] + }, + "constants_used": { + "C": { + "f()": [ + [ + { + "value": "False", + "type": "bool" + } + ], + [ + { + "value": "True", + "type": "bool" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "C": { + "f()": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..bc2a95293c --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,8 @@ + +C: ++------+------------+ +| Name | ID | ++------+------------+ +| f() | 0x26121ff0 | ++------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..4d7b7ca36e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,16 @@ + +Contract C +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f() | public | [] | [] | [] | [] | [] | 3 | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..a32adce360 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,25 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| C | 6 | 2 | 10 | 3 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| C | 5 | 16 | 7 | 37 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| C | 3 | 124 | 7 | 0.008 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..45060c9912 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 1 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 10 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..1ea79c2e14 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,10 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..9a547498e7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c26_C[shape="box"label=<
C
Public Functions:
f()
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..f8db37c75e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 11 | +| sloc | 0 | 0 | 10 | +| cloc | 0 | 0 | 0 | +| Total | 0 | 0 | 21 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..dd127f353e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,14 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..93ff6c9e2b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..f66b00b78d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,9 @@ +Constructor and pure/view functions are not displayed + +C: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ +| f() | | ++------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..f4933d3a33 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,7 @@ + +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..826a2ac156 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,21 @@ +Contract C + Function C.f() (*) + Expression: go = true + IRs: + go(bool) := True(bool) + Expression: go + IRs: + CONDITION go + Expression: go = false + IRs: + go(bool) := False(bool) + Expression: go = true + IRs: + go(bool) := True(bool) + Expression: go + IRs: + CONDITION go + Expression: go = false + IRs: + go(bool) := False(bool) + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..e33778c548 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,7 @@ + +C: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..09ba0e73c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_while_all_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,8 @@ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..ed18bb9101 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_call_graph__0.txt @@ -0,0 +1,25 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipL.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_65_C { +label = "C" +"65_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_65_C { +label = "C" +"65_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..fd3e149b6f --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_cfg__0.txt @@ -0,0 +1,27 @@ +Export tmp.zip-C-f(uint256,uint256[]).dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: INLINE ASM 3 +"]; +3->4; +4[label="Node Type: END INLINE ASM 4 +"]; +4->5; +5[label="Node Type: RETURN 5 + +EXPRESSION: +(retA,retB) + +IRs: +RETURN retA,retB"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_ck__0.txt new file mode 100644 index 0000000000..45624bcea0 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| L | 0 | 0 | 0 | +| C | 3 | 0 | 0 | +| TOTAL | 3 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| L | 0 | 0 | 0 | 0 | +| C | 1 | 0 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| L | 0 | 0 | 0 | +| C | 1 | 0 | 0 | +| TOTAL | 1 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| L | 0 | 0 | 0 | +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| L | 0 | 0 | 0 | 0 | 0 | +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..0f42e7eac3 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_contract_summary__0.txt @@ -0,0 +1,7 @@ + ++ Contract L (Most derived contract) + ++ Contract C (Most derived contract) + - From C + - f(uint256,uint256[]) (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..ea0ca69490 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_data_dependency__0.txt @@ -0,0 +1,36 @@ + +Contract L ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract L ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| storA | [] | +| storB | [] | +| storC | [] | ++----------+--------------+ + +Function f(uint256,uint256[]) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| paramA | [] | +| paramB | [] | +| retA | [] | +| retB | [] | +| localA | [] | +| localB | [] | +| C.storA | [] | +| C.storB | [] | +| C.storC | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..d1dfc79553 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_declaration__0.txt @@ -0,0 +1,39 @@ + +# Contracts +# L + - Declaration: tests/ast-parsing/yul-0.4.11.sol#1 (9 - 11) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures +# C + - Declaration: tests/ast-parsing/yul-0.4.11.sol#5 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f(uint256,uint256[]) + - Declaration: tests/ast-parsing/yul-0.4.11.sol#10 (14 - 16) + - Implementation(s): ['tests/ast-parsing/yul-0.4.11.sol#10-39 (5 - 6)'] + - References: [] + + ## State variables + - storA + - Declaration: tests/ast-parsing/yul-0.4.11.sol#6 (10 - 16) + - Implementation: tests/ast-parsing/yul-0.4.11.sol#6 (5 - 15) + - References: [] + - storB + - Declaration: tests/ast-parsing/yul-0.4.11.sol#7 (12 - 18) + - Implementation: tests/ast-parsing/yul-0.4.11.sol#7 (5 - 17) + - References: [] + - storC + - Declaration: tests/ast-parsing/yul-0.4.11.sol#8 (10 - 16) + - Implementation: tests/ast-parsing/yul-0.4.11.sol#8 (5 - 15) + - References: [] + + ## Structures + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..fa378b8a0b --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_dominator__0.txt @@ -0,0 +1,3 @@ +Export tmp.zip-C-f(uint256,uint256[]).dot + +None diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..96f4fdffef --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_echidna__0.txt @@ -0,0 +1,28 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": {}, + "constants_used_in_binary": {}, + "functions_relations": { + "L": {}, + "C": { + "f(uint256,uint256[])": { + "impacts": [], + "is_impacted_by": [] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.5.17" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..a1855c3302 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_function_id__0.txt @@ -0,0 +1,14 @@ + +L: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +C: ++----------------------+------------+ +| Name | ID | ++----------------------+------------+ +| f(uint256,uint256[]) | 0xbfda4ee2 | ++----------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..0d3bcf2aec --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_function_summary__0.txt @@ -0,0 +1,30 @@ + +Contract L +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: ['storA', 'storB', 'storC'] +Inheritance:: [] + ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| f(uint256,uint256[]) | public | [] | [] | [] | [] | [] | 1 | ++----------------------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..f0d5ac4a17 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| L | 0 | 0 | 0 | 0 | +| C | 1 | 1 | 2 | 2 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| L | 0 | 0 | 0 | 0 | +| C | 3 | 3 | 2 | 5 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| L | 0 | 0 | 0 | 0.000 | +| C | 0 | 2 | 0 | 0.001 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..412bbc64cc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 30 +Number of assembly lines: 19 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..4574203b9d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ L + ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ L + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..ba40178d30 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c65_C[shape="box"label=<
C
Public Functions:
f(uint256,uint256[])
Private Variables:
storA
storB
storC
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_loc__0.txt new file mode 100644 index 0000000000..baebc0488a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 40 | +| sloc | 0 | 0 | 30 | +| cloc | 0 | 0 | 1 | +| Total | 0 | 0 | 71 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_martin__0.txt new file mode 100644 index 0000000000..d6b6a29443 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| L | 0 | 0 | 0.00 | 0.00 | +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..68620a1491 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_modifiers__0.txt @@ -0,0 +1,12 @@ + +Contract L ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..cd3e0a73e1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_not_pausable__0.txt @@ -0,0 +1,15 @@ +Constructor and pure/view functions are not displayed + +L: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +C: ++----------------------+-------------------+ +| Name | Use whenNotPaused | ++----------------------+-------------------+ +| f(uint256,uint256[]) | | ++----------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_require__0.txt new file mode 100644 index 0000000000..d5512d4585 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_require__0.txt @@ -0,0 +1,12 @@ + +Contract L ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..f96acc44ed --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_slithir__0.txt @@ -0,0 +1,7 @@ +Contract L +Contract C + Function C.f(uint256,uint256[]) (*) + Expression: (retA,retB) + IRs: + RETURN retA,retB + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..8df5d82ab8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_variable_order__0.txt @@ -0,0 +1,16 @@ + +L: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C: ++---------+-----------+------+--------+ +| Name | Type | Slot | Offset | ++---------+-----------+------+--------+ +| C.storA | uint256 | 0 | 0 | +| C.storB | uint256[] | 1 | 0 | +| C.storC | bool | 2 | 0 | ++---------+-----------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..194cd000b7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_4_11_sol_0_5_17_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,14 @@ + +Contract L ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt new file mode 100644 index 0000000000..f7518025fe --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_call_graph__0.txt @@ -0,0 +1,41 @@ +Call Graph: tmp.zip.all_contracts.call-graph.dot +Call Graph: tmp.zipL.call-graph.dot +Call Graph: tmp.zipC.call-graph.dot + +strict digraph { +subgraph cluster_47_C { +label = "C" +"47_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +"mload(uint256)" +"mstore(uint256,uint256)" +"sload(uint256)" +"sstore(uint256,uint256)" +"47_f" -> "mload(uint256)" +"47_f" -> "mstore(uint256,uint256)" +"47_f" -> "sload(uint256)" +"47_f" -> "sstore(uint256,uint256)" +} +} +strict digraph { +subgraph cluster_solidity { +label = "[Solidity]" +} +} +strict digraph { +subgraph cluster_47_C { +label = "C" +"47_f" [label="f"] +}subgraph cluster_solidity { +label = "[Solidity]" +"mload(uint256)" +"mstore(uint256,uint256)" +"sload(uint256)" +"sstore(uint256,uint256)" +"47_f" -> "mload(uint256)" +"47_f" -> "mstore(uint256,uint256)" +"47_f" -> "sload(uint256)" +"47_f" -> "sstore(uint256,uint256)" +} +} diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt new file mode 100644 index 0000000000..cf1d09b9c2 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_cfg__0.txt @@ -0,0 +1,241 @@ +Export tmp.zip-C-f(uint256,uint256[]).dot +Export tmp.zip-C-f().dot + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 +"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 +"]; +2->3; +3[label="Node Type: INLINE ASM 3 +"]; +3->4; +4[label="Node Type: NEW VARIABLE 4 +"]; +4->5; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +aStorA_f_asm_0 = sload(uint256)(storA) + +IRs: +TMP_0(uint256) = SOLIDITY_CALL sload(uint256)(storA) +aStorA_f_asm_0(uint256) := TMP_0(uint256)"]; +5->6; +6[label="Node Type: NEW VARIABLE 6 +"]; +6->7; +7[label="Node Type: EXPRESSION 7 + +EXPRESSION: +aParamA_f_asm_0 = paramA + +IRs: +aParamA_f_asm_0(uint256) := paramA(uint256)"]; +7->8; +8[label="Node Type: NEW VARIABLE 8 +"]; +8->9; +9[label="Node Type: EXPRESSION 9 + +EXPRESSION: +aRetA_f_asm_0 = retA + +IRs: +aRetA_f_asm_0(uint256) := retA(uint256)"]; +9->10; +10[label="Node Type: NEW VARIABLE 10 +"]; +10->11; +11[label="Node Type: EXPRESSION 11 + +EXPRESSION: +aLocalA_f_asm_0 = localA + +IRs: +aLocalA_f_asm_0(uint256) := localA(uint256)"]; +11->12; +12[label="Node Type: EXPRESSION 12 + +EXPRESSION: +sstore(uint256,uint256)(storA,0) + +IRs: +TMP_1(None) = SOLIDITY_CALL sstore(uint256,uint256)(storA,0)"]; +12->13; +13[label="Node Type: EXPRESSION 13 + +EXPRESSION: +sstore(uint256,uint256)(offset,0) + +IRs: +TMP_2(None) = SOLIDITY_CALL sstore(uint256,uint256)(offset,0)"]; +13->14; +14[label="Node Type: EXPRESSION 14 + +EXPRESSION: +paramA = 0 + +IRs: +paramA(uint256) := 0(uint256)"]; +14->15; +15[label="Node Type: EXPRESSION 15 + +EXPRESSION: +retA = 0 + +IRs: +retA(uint256) := 0(uint256)"]; +15->16; +16[label="Node Type: EXPRESSION 16 + +EXPRESSION: +localA = 0 + +IRs: +localA(uint256) := 0(uint256)"]; +16->17; +17[label="Node Type: NEW VARIABLE 17 +"]; +17->18; +18[label="Node Type: EXPRESSION 18 + +EXPRESSION: +aStorB_f_asm_0 = sload(uint256)(storB) + +IRs: +TMP_3(uint256) = SOLIDITY_CALL sload(uint256)(storB) +aStorB_f_asm_0(uint256) := TMP_3(uint256)"]; +18->19; +19[label="Node Type: NEW VARIABLE 19 +"]; +19->20; +20[label="Node Type: EXPRESSION 20 + +EXPRESSION: +aParamB_f_asm_0 = mload(uint256)(paramB) + +IRs: +TMP_4(uint256) = SOLIDITY_CALL mload(uint256)(paramB) +aParamB_f_asm_0(uint256) := TMP_4(uint256)"]; +20->21; +21[label="Node Type: NEW VARIABLE 21 +"]; +21->22; +22[label="Node Type: EXPRESSION 22 + +EXPRESSION: +aRetB_f_asm_0 = mload(uint256)(retB) + +IRs: +TMP_5(uint256) = SOLIDITY_CALL mload(uint256)(retB) +aRetB_f_asm_0(uint256) := TMP_5(uint256)"]; +22->23; +23[label="Node Type: NEW VARIABLE 23 +"]; +23->24; +24[label="Node Type: EXPRESSION 24 + +EXPRESSION: +aLocalB_f_asm_0 = mload(uint256)(localB) + +IRs: +TMP_6(uint256) = SOLIDITY_CALL mload(uint256)(localB) +aLocalB_f_asm_0(uint256) := TMP_6(uint256)"]; +24->25; +25[label="Node Type: EXPRESSION 25 + +EXPRESSION: +sstore(uint256,uint256)(storB,0) + +IRs: +TMP_7(None) = SOLIDITY_CALL sstore(uint256,uint256)(storB,0)"]; +25->26; +26[label="Node Type: EXPRESSION 26 + +EXPRESSION: +mstore(uint256,uint256)(paramB,0) + +IRs: +TMP_8(None) = SOLIDITY_CALL mstore(uint256,uint256)(paramB,0)"]; +26->27; +27[label="Node Type: EXPRESSION 27 + +EXPRESSION: +mstore(uint256,uint256)(retB,0) + +IRs: +TMP_9(None) = SOLIDITY_CALL mstore(uint256,uint256)(retB,0)"]; +27->28; +28[label="Node Type: EXPRESSION 28 + +EXPRESSION: +mstore(uint256,uint256)(localB,0) + +IRs: +TMP_10(None) = SOLIDITY_CALL mstore(uint256,uint256)(localB,0)"]; +28->29; +29[label="Node Type: EXPRESSION 29 + +EXPRESSION: +mstore(uint256,uint256)(offset,0) + +IRs: +TMP_11(None) = SOLIDITY_CALL mstore(uint256,uint256)(offset,0)"]; +29->30; +30[label="Node Type: NEW VARIABLE 30 +"]; +30->31; +31[label="Node Type: EXPRESSION 31 + +EXPRESSION: +aStoreC_f_asm_0 = sload(uint256)(storC) * storC + +IRs: +TMP_12(uint256) = SOLIDITY_CALL sload(uint256)(storC) +TMP_13(uint256) = TMP_12 * storC +aStoreC_f_asm_0(uint256) := TMP_13(uint256)"]; +31->32; +32[label="Node Type: END INLINE ASM 32 +"]; +32->33; +33[label="Node Type: RETURN 33 + +EXPRESSION: +(retA,retB) + +IRs: +RETURN retA,retB"]; +} + +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: INLINE ASM 1 +"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +st = 0x0000000000000000000000000000000000000000000000000000000000000000 + +IRs: +st(C.St) := 0(uint256)"]; +2->3; +3[label="Node Type: END INLINE ASM 3 +"]; +3->4; +4[label="Node Type: RETURN 4 + +EXPRESSION: +st + +IRs: +RETURN st"]; +} + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_ck__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_ck__0.txt new file mode 100644 index 0000000000..dae1f668fe --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_ck__0.txt @@ -0,0 +1,54 @@ + + +CK complexity metrics (Variables): ++----------+-----------------+-----------+------------+ +| Contract | State variables | Constants | Immutables | ++----------+-----------------+-----------+------------+ +| L | 0 | 0 | 0 | +| C | 3 | 0 | 0 | +| TOTAL | 3 | 0 | 0 | ++----------+-----------------+-----------+------------+ + + +CK complexity metrics (Function visibility): ++----------+--------+----------+----------+---------+ +| Contract | Public | External | Internal | Private | ++----------+--------+----------+----------+---------+ +| L | 0 | 0 | 0 | 0 | +| C | 1 | 0 | 1 | 0 | +| TOTAL | 1 | 0 | 1 | 0 | ++----------+--------+----------+----------+---------+ + + +CK complexity metrics (State mutability): ++----------+----------+------+------+ +| Contract | Mutating | View | Pure | ++----------+----------+------+------+ +| L | 0 | 0 | 0 | +| C | 2 | 0 | 0 | +| TOTAL | 2 | 0 | 0 | ++----------+----------+------+------+ + + +CK complexity metrics (External mutating functions): ++----------+-------------------+----------------------+--------------+ +| Contract | External mutating | No auth or onlyOwner | No modifiers | ++----------+-------------------+----------------------+--------------+ +| L | 0 | 0 | 0 | +| C | 1 | 1 | 1 | +| TOTAL | 1 | 1 | 1 | ++----------+-------------------+----------------------+--------------+ + + +CK complexity metrics (Core): +RFC: Response For a Class +NOC: Number of Children +DIT: Depth of Inheritance Tree +CBO: Coupling Between Object Classes ++----------+-----------+-----+-----+-----+-----+ +| Contract | Ext calls | RFC | NOC | DIT | CBO | ++----------+-----------+-----+-----+-----+-----+ +| L | 0 | 0 | 0 | 0 | 0 | +| C | 0 | 1 | 0 | 0 | 0 | ++----------+-----------+-----+-----+-----+-----+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_constructor_calls__0.txt @@ -0,0 +1 @@ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt new file mode 100644 index 0000000000..a3f07028a4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_contract_summary__0.txt @@ -0,0 +1,8 @@ + ++ Contract L (Most derived contract) + ++ Contract C (Most derived contract) + - From C + - f() (internal) + - f(uint256,uint256[]) (public) + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt new file mode 100644 index 0000000000..8c334493f8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_data_dependency__0.txt @@ -0,0 +1,45 @@ + +Contract L ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract L ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ ++----------+--------------+ + +Contract C ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| storA | ['storA'] | +| storB | ['storB'] | +| storC | ['storC'] | ++----------+--------------+ + +Function f(uint256,uint256[]) ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| paramA | [] | +| paramB | [] | +| retA | [] | +| retB | [] | +| localA | [] | +| localB | [] | +| C.storA | ['storA'] | +| C.storB | ['storB'] | +| C.storC | ['storC'] | ++----------+--------------+ +Function f() ++----------+--------------+ +| Variable | Dependencies | ++----------+--------------+ +| st | [] | +| C.storA | [] | +| C.storB | [] | +| C.storC | [] | ++----------+--------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt new file mode 100644 index 0000000000..f0cb38d91e --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_declaration__0.txt @@ -0,0 +1,49 @@ + +# Contracts +# L + - Declaration: tests/ast-parsing/yul-0.8.0.sol#1 (9 - 11) + - Implementation(s): [] + - References: [] + + ## Function + + ## State variables + + ## Structures +# C + - Declaration: tests/ast-parsing/yul-0.8.0.sol#6 (10 - 12) + - Implementation(s): [] + - References: [] + + ## Function + - C.f(uint256,uint256[]) + - Declaration: tests/ast-parsing/yul-0.8.0.sol#11 (14 - 16) + - Implementation(s): ['tests/ast-parsing/yul-0.8.0.sol#11-42 (5 - 6)'] + - References: [] + - C.f() + - Declaration: tests/ast-parsing/yul-0.8.0.sol#49 (14 - 16) + - Implementation(s): ['tests/ast-parsing/yul-0.8.0.sol#49-53 (5 - 6)'] + - References: [] + + ## State variables + - storA + - Declaration: tests/ast-parsing/yul-0.8.0.sol#7 (10 - 16) + - Implementation: tests/ast-parsing/yul-0.8.0.sol#7 (5 - 15) + - References: [] + - storB + - Declaration: tests/ast-parsing/yul-0.8.0.sol#8 (12 - 18) + - Implementation: tests/ast-parsing/yul-0.8.0.sol#8 (5 - 17) + - References: [] + - storC + - Declaration: tests/ast-parsing/yul-0.8.0.sol#9 (10 - 16) + - Implementation: tests/ast-parsing/yul-0.8.0.sol#9 (5 - 15) + - References: [] + + ## Structures + - St + - Declaration: struct St{ + uint a; + } + - Implementation: tests/ast-parsing/yul-0.8.0.sol#45-47 (5 - 6) + - References: ['tests/ast-parsing/yul-0.8.0.sol#49 (35 - 37)'] + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt new file mode 100644 index 0000000000..1b249ab8c7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_dominator__0.txt @@ -0,0 +1,5 @@ +Export tmp.zip-C-f(uint256,uint256[]).dot +Export tmp.zip-C-f().dot + +None +None diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt new file mode 100644 index 0000000000..147148ff13 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_echidna__0.txt @@ -0,0 +1,43 @@ +{ + "payable": {}, + "timestamp": {}, + "block_number": {}, + "msg_sender": {}, + "msg_gas": {}, + "assert": {}, + "constant_functions": {}, + "constants_used": { + "C": { + "f(uint256,uint256[])": [ + [ + { + "value": "0", + "type": "uint256" + } + ] + ] + } + }, + "constants_used_in_binary": {}, + "functions_relations": { + "L": {}, + "C": { + "f(uint256,uint256[])": { + "impacts": [ + "f(uint256,uint256[])" + ], + "is_impacted_by": [ + "f(uint256,uint256[])" + ] + } + } + }, + "constructors": {}, + "have_external_calls": {}, + "use_balance": {}, + "solc_versions": [ + "0.8.12" + ], + "with_fallback": [], + "with_receive": [] +} diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt new file mode 100644 index 0000000000..a1855c3302 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_function_id__0.txt @@ -0,0 +1,14 @@ + +L: ++------+----+ +| Name | ID | ++------+----+ ++------+----+ + +C: ++----------------------+------------+ +| Name | ID | ++----------------------+------------+ +| f(uint256,uint256[]) | 0xbfda4ee2 | ++----------------------+------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt new file mode 100644 index 0000000000..008a2f74e4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_function_summary__0.txt @@ -0,0 +1,32 @@ + +Contract L +Contract vars: [] +Inheritance:: [] + ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ ++----------+------------+-----------+------+-------+----------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + +Contract C +Contract vars: ['storA', 'storB', 'storC'] +Inheritance:: [] + ++----------------------+------------+-----------+--------------------+--------------------+-----------------------------------------------+----------------+-----------------------+ +| Function | Visibility | Modifiers | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++----------------------+------------+-----------+--------------------+--------------------+-----------------------------------------------+----------------+-----------------------+ +| f(uint256,uint256[]) | public | [] | ['storA', 'storB'] | ['storA', 'storB'] | ['mload(uint256)', 'mstore(uint256,uint256)'] | [] | 1 | +| | | | ['storC'] | | ['sload(uint256)', 'sstore(uint256,uint256)'] | | | +| f() | internal | [] | [] | [] | [] | [] | 1 | ++----------------------+------------+-----------+--------------------+--------------------+-----------------------------------------------+----------------+-----------------------+ + ++-----------+------------+------+-------+----------------+----------------+-----------------------+ +| Modifiers | Visibility | Read | Write | Internal Calls | External Calls | Cyclomatic Complexity | ++-----------+------------+------+-------+----------------+----------------+-----------------------+ ++-----------+------------+------+-------+----------------+----------------+-----------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt new file mode 100644 index 0000000000..0de859f9f7 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_halstead__0.txt @@ -0,0 +1,28 @@ + + +Halstead complexity metrics (Core): ++----------+-----------------+------------------+----------------+-----------------+ +| Contract | Total Operators | Unique Operators | Total Operands | Unique Operands | ++----------+-----------------+------------------+----------------+-----------------+ +| L | 0 | 0 | 0 | 0 | +| C | 29 | 7 | 44 | 21 | ++----------+-----------------+------------------+----------------+-----------------+ + + +Halstead complexity metrics (Extended 1/2): ++----------+------------+----------------+------------------+--------+ +| Contract | Vocabulary | Program Length | Estimated Length | Volume | ++----------+------------+----------------+------------------+--------+ +| L | 0 | 0 | 0 | 0 | +| C | 28 | 73 | 112 | 351 | ++----------+------------+----------------+------------------+--------+ + + +Halstead complexity metrics (Extended 2/2): ++----------+------------+--------+------+----------------+ +| Contract | Difficulty | Effort | Time | Estimated Bugs | ++----------+------------+--------+------+----------------+ +| L | 0 | 0 | 0 | 0.000 | +| C | 7 | 2574 | 143 | 0.063 | ++----------+------------+--------+------+----------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt new file mode 100644 index 0000000000..116b8413c4 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_human_summary__0.txt @@ -0,0 +1,14 @@ + +Compiled with Archive +Total number of contracts in source files: 0 +Number of contracts in tests : 2 +Source lines of code (SLOC) in source files: 0 +Source lines of code (SLOC) in tests : 58 +Number of assembly lines: 0 +Number of optimization issues: 0 +Number of informational issues: 0 +Number of low issues: 0 +Number of medium issues: 0 +Number of high issues: 0 + + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt new file mode 100644 index 0000000000..4574203b9d --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_inheritance__0.txt @@ -0,0 +1,14 @@ +Inheritance +Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts] ++ L + ++ C + + +Base_Contract -> Immediate_Child_Contracts + [Not_Immediate_Child_Contracts] + ++ L + ++ C + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt new file mode 100644 index 0000000000..c0ee702860 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_inheritance_graph__0.txt @@ -0,0 +1,6 @@ +Inheritance Graph: tmp.zip.inheritance-graph.dot + +digraph "" { +c47_C[shape="box"label=<
C
Public Functions:
f(uint256,uint256[])
Private Functions:
f()
Private Variables:
storA
storB
storC
>]; + +} diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_loc__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_loc__0.txt new file mode 100644 index 0000000000..db776988bc --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_loc__0.txt @@ -0,0 +1,9 @@ +Lines of Code ++-------+-----+-----+------+ +| | src | dep | test | ++-------+-----+-----+------+ +| loc | 0 | 0 | 86 | +| sloc | 0 | 0 | 58 | +| cloc | 0 | 0 | 8 | +| Total | 0 | 0 | 152 | ++-------+-----+-----+------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_martin__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_martin__0.txt new file mode 100644 index 0000000000..d6b6a29443 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_martin__0.txt @@ -0,0 +1,15 @@ +Martin agile software metrics +Efferent Coupling (Ce) - Number of contracts that a contract depends on +Afferent Coupling (Ca) - Number of contracts that depend on the contract +Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca)) +Abstractness (A) - Number of abstract contracts / total number of contracts +Distance from the Main Sequence (D) - abs(A + I - 1) + +Abstractness (overall): 0.0 ++----------+------------+--------------+-------------+-----------------------------+ +| Contract | Dependents | Dependencies | Instability | Distance from main sequence | ++----------+------------+--------------+-------------+-----------------------------+ +| L | 0 | 0 | 0.00 | 0.00 | +| C | 0 | 0 | 0.00 | 0.00 | ++----------+------------+--------------+-------------+-----------------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt new file mode 100644 index 0000000000..fc89609d30 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_modifiers__0.txt @@ -0,0 +1,13 @@ + +Contract L ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ ++----------+-----------+ +Contract C ++----------+-----------+ +| Function | Modifiers | ++----------+-----------+ +| f | [] | +| f | [] | ++----------+-----------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt new file mode 100644 index 0000000000..cd3e0a73e1 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_not_pausable__0.txt @@ -0,0 +1,15 @@ +Constructor and pure/view functions are not displayed + +L: ++------+-------------------+ +| Name | Use whenNotPaused | ++------+-------------------+ ++------+-------------------+ + +C: ++----------------------+-------------------+ +| Name | Use whenNotPaused | ++----------------------+-------------------+ +| f(uint256,uint256[]) | | ++----------------------+-------------------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_require__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_require__0.txt new file mode 100644 index 0000000000..a415163f3a --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_require__0.txt @@ -0,0 +1,13 @@ + +Contract L ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ ++----------+-------------------+ +Contract C ++----------+-------------------+ +| Function | require or assert | ++----------+-------------------+ +| f | | +| f | | ++----------+-------------------+ diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt new file mode 100644 index 0000000000..572caaaa34 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_slithir__0.txt @@ -0,0 +1,110 @@ +Contract L +Contract C + Function C.f(uint256,uint256[]) (*) + Expression: aStorA_f_asm_0 = sload(uint256)(storA) + IRs: + TMP_0(uint256) = SOLIDITY_CALL sload(uint256)(storA) + aStorA_f_asm_0(uint256) := TMP_0(uint256) + Expression: aParamA_f_asm_0 = paramA + IRs: + aParamA_f_asm_0(uint256) := paramA(uint256) + Expression: aRetA_f_asm_0 = retA + IRs: + aRetA_f_asm_0(uint256) := retA(uint256) + Expression: aLocalA_f_asm_0 = localA + IRs: + aLocalA_f_asm_0(uint256) := localA(uint256) + Expression: sstore(uint256,uint256)(storA,0) + IRs: + TMP_1(None) = SOLIDITY_CALL sstore(uint256,uint256)(storA,0) + Expression: sstore(uint256,uint256)(offset,0) + IRs: + TMP_2(None) = SOLIDITY_CALL sstore(uint256,uint256)(offset,0) + Expression: paramA = 0 + IRs: + paramA(uint256) := 0(uint256) + Expression: retA = 0 + IRs: + retA(uint256) := 0(uint256) + Expression: localA = 0 + IRs: + localA(uint256) := 0(uint256) + Expression: aStorB_f_asm_0 = sload(uint256)(storB) + IRs: + TMP_3(uint256) = SOLIDITY_CALL sload(uint256)(storB) + aStorB_f_asm_0(uint256) := TMP_3(uint256) + Expression: aParamB_f_asm_0 = mload(uint256)(paramB) + IRs: + TMP_4(uint256) = SOLIDITY_CALL mload(uint256)(paramB) + aParamB_f_asm_0(uint256) := TMP_4(uint256) + Expression: aRetB_f_asm_0 = mload(uint256)(retB) + IRs: + TMP_5(uint256) = SOLIDITY_CALL mload(uint256)(retB) + aRetB_f_asm_0(uint256) := TMP_5(uint256) + Expression: aLocalB_f_asm_0 = mload(uint256)(localB) + IRs: + TMP_6(uint256) = SOLIDITY_CALL mload(uint256)(localB) + aLocalB_f_asm_0(uint256) := TMP_6(uint256) + Expression: sstore(uint256,uint256)(storB,0) + IRs: + TMP_7(None) = SOLIDITY_CALL sstore(uint256,uint256)(storB,0) + Expression: mstore(uint256,uint256)(paramB,0) + IRs: + TMP_8(None) = SOLIDITY_CALL mstore(uint256,uint256)(paramB,0) + Expression: mstore(uint256,uint256)(retB,0) + IRs: + TMP_9(None) = SOLIDITY_CALL mstore(uint256,uint256)(retB,0) + Expression: mstore(uint256,uint256)(localB,0) + IRs: + TMP_10(None) = SOLIDITY_CALL mstore(uint256,uint256)(localB,0) + Expression: mstore(uint256,uint256)(offset,0) + IRs: + TMP_11(None) = SOLIDITY_CALL mstore(uint256,uint256)(offset,0) + Expression: aStoreC_f_asm_0 = sload(uint256)(storC) * storC + IRs: + TMP_12(uint256) = SOLIDITY_CALL sload(uint256)(storC) + TMP_13(uint256) = TMP_12 * storC + aStoreC_f_asm_0(uint256) := TMP_13(uint256) + Expression: (retA,retB) + IRs: + RETURN retA,retB + Function C.f() (*) + Expression: st = 0x0000000000000000000000000000000000000000000000000000000000000000 + IRs: + st(C.St) := 0(uint256) + Expression: st + IRs: + RETURN st +Top level functions + Function at(address) + Expression: size_at_asm_0 = extcodesize(uint256)(_addr) + IRs: + REF_0 -> CODESIZE _addr + size_at_asm_0(uint256) := REF_0(uint256) + Expression: o_code = mload(uint256)(0x40) + IRs: + TMP_14(uint256) = SOLIDITY_CALL mload(uint256)(64) + o_code(bytes) := TMP_14(uint256) + Expression: mstore(uint256,uint256)(0x40,o_code + size_at_asm_0 + 0x20 + 0x1f & ~ 0x1f) + IRs: + TMP_15(uint256) = size_at_asm_0 + 32 + TMP_16(uint256) = TMP_15 + 31 + TMP_17 = UnaryType.TILD 31 + TMP_18(uint256) = TMP_16 & TMP_17 + TMP_19(bytes) = o_code + TMP_18 + TMP_20(None) = SOLIDITY_CALL mstore(uint256,uint256)(64,TMP_19) + Expression: mstore(uint256,uint256)(o_code,size_at_asm_0) + IRs: + TMP_21(None) = SOLIDITY_CALL mstore(uint256,uint256)(o_code,size_at_asm_0) + Expression: extcodecopy(uint256,uint256,uint256,uint256)(_addr,o_code + 0x20,0,size_at_asm_0) + IRs: + TMP_22(bytes) = o_code + 32 + TMP_23(None) = SOLIDITY_CALL extcodecopy(uint256,uint256,uint256,uint256)(_addr,TMP_22,0,size_at_asm_0) + Expression: o_code + IRs: + RETURN o_code + Function test() + Expression: v_test_asm_1 = test + IRs: + v_test_asm_1(uint256) := test(string) + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt new file mode 100644 index 0000000000..8df5d82ab8 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_variable_order__0.txt @@ -0,0 +1,16 @@ + +L: ++------+------+------+--------+ +| Name | Type | Slot | Offset | ++------+------+------+--------+ ++------+------+------+--------+ + +C: ++---------+-----------+------+--------+ +| Name | Type | Slot | Offset | ++---------+-----------+------+--------+ +| C.storA | uint256 | 0 | 0 | +| C.storB | uint256[] | 1 | 0 | +| C.storC | bool | 2 | 0 | ++---------+-----------+------+--------+ + diff --git a/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt new file mode 100644 index 0000000000..455da17cd9 --- /dev/null +++ b/tests/e2e/printers/snapshots/printers__printer_yul_0_8_0_sol_0_8_12_compact_zip_vars_and_auth__0.txt @@ -0,0 +1,15 @@ + +Contract L ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ ++----------+-------------------------+--------------------------+ + +Contract C ++----------+-------------------------+--------------------------+ +| Function | State variables written | Conditions on msg.sender | ++----------+-------------------------+--------------------------+ +| f | ['storA', 'storB'] | [] | +| f | [] | [] | ++----------+-------------------------+--------------------------+ + diff --git a/tests/e2e/printers/test_printers.py b/tests/e2e/printers/test_printers.py index 3dea8b74a4..68c7161931 100644 --- a/tests/e2e/printers/test_printers.py +++ b/tests/e2e/printers/test_printers.py @@ -1,16 +1,25 @@ +import itertools import re from collections import Counter +from fnmatch import fnmatch from pathlib import Path +from typing import List, Tuple, Type +import pytest from crytic_compile import CryticCompile from crytic_compile.platform.solc_standard_json import SolcStandardJson +from crytic_compile.utils.zip import load_from_zip from slither import Slither from slither.printers.inheritance.inheritance_graph import PrinterInheritanceGraph +from slither.printers import all_printers +from slither.printers.abstract_printer import AbstractPrinter TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" +PRINTER_DATA_DIR = Path(__file__).resolve().parent.parent / "solc_parsing" / "test_data" / "compile" + def test_inheritance_printer(solc_binary_path) -> None: solc_path = solc_binary_path("0.8.0") @@ -35,7 +44,7 @@ def test_inheritance_printer(solc_binary_path) -> None: assert counter["B -> A"] == 2 assert counter["C -> A"] == 1 - # Lets also test the include/exclude interface behavior + # Let also test the include/exclude interface behavior # Check that the interface is not included assert "MyInterfaceX" not in content @@ -46,3 +55,75 @@ def test_inheritance_printer(solc_binary_path) -> None: # Remove test generated files Path("test_printer.dot").unlink(missing_ok=True) + + +known_failures = { + all_printers.Halstead: [ + "top_level_variable-0.8.0.sol-0.8.12-compact.zip", + "top_level_variable2-0.8.0.sol-0.8.12-compact.zip", + "custom_error_with_state_variable.sol-0.8.12-compact.zip", + ], + all_printers.PrinterSlithIRSSA: [ + "*", + ], +} + + +def generate_all_tests() -> List[Tuple[Path, Type[AbstractPrinter]]]: + """Generates tests cases for all printers.""" + printers = [] + for printer_name in dir(all_printers): + obj = getattr(all_printers, printer_name) + if ( + isinstance(obj, type) + and issubclass(obj, AbstractPrinter) + and printer_name != "PrinterEVM" + ): + printers.append(obj) + + tests = [] + for version in ["*0.5.17-compact.zip", "*0.8.12-compact.zip"]: + for test_file, printer in itertools.product(PRINTER_DATA_DIR.glob(version), printers): + + known_errors = known_failures.get(printer, []) + if not any(fnmatch(test_file.name, pattern) for pattern in known_errors): + tests.append((test_file, printer)) + + return tests + + +ALL_TESTS = generate_all_tests() + + +def id_test(test_item: Tuple[Path, Type[AbstractPrinter]]) -> str: + """Returns the ID of the test.""" + return f"{test_item[0].name}-{test_item[1].ARGUMENT}" + + +@pytest.mark.parametrize("test_item", ALL_TESTS, ids=id_test) +def test_printer(test_item: Tuple[Path, Type[AbstractPrinter]], snapshot): + + test_file, printer = test_item + + crytic_compile = load_from_zip(test_file.as_posix())[0] + + sl = Slither(crytic_compile) + sl.register_printer(printer) + + results = sl.run_printers() + + actual_output = "" + for printer_results in results: + actual_output += f"{printer_results['description']}\n" + + # Some printers also create files, so lets compare their output too + for element in printer_results["elements"]: + if element["type"] == "file": + actual_output += f"{element['name']['content']}\n" + + try: + Path(element["name"]["filename"]).unlink() + except FileNotFoundError: + pass + + assert snapshot() == actual_output