diff --git a/slither/solc_parsing/yul/parse_yul.py b/slither/solc_parsing/yul/parse_yul.py index 7f31399c5..3c4768d09 100644 --- a/slither/solc_parsing/yul/parse_yul.py +++ b/slither/solc_parsing/yul/parse_yul.py @@ -773,6 +773,14 @@ def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[ variable_found = _check_for_state_variable_name(root, potential_name) if variable_found: return variable_found + var = root.function.get_local_variable_from_name(potential_name) + if var and var.location == "calldata": + return Identifier(var) + if name.endswith(".length"): + potential_name = name[:-7] + var = root.function.get_local_variable_from_name(potential_name) + if var and var.location == "calldata": + return Identifier(var) raise SlitherException(f"unresolved reference to identifier {name}") diff --git a/tests/ast-parsing/compile/import-0.4.0-legacy.zip b/tests/ast-parsing/compile/import-0.4.0-legacy.zip new file mode 100644 index 000000000..dbbb6a8cc Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.1-legacy.zip b/tests/ast-parsing/compile/import-0.4.1-legacy.zip new file mode 100644 index 000000000..8c5fbb4b6 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.10-legacy.zip b/tests/ast-parsing/compile/import-0.4.10-legacy.zip new file mode 100644 index 000000000..e4e839fb4 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.11-legacy.zip b/tests/ast-parsing/compile/import-0.4.11-legacy.zip new file mode 100644 index 000000000..f08ea589b Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.14-compact.zip b/tests/ast-parsing/compile/import-0.4.14-compact.zip new file mode 100644 index 000000000..5f665b3dc Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.14-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.14-legacy.zip b/tests/ast-parsing/compile/import-0.4.14-legacy.zip new file mode 100644 index 000000000..cda1b7d6d Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.14-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.16-compact.zip b/tests/ast-parsing/compile/import-0.4.16-compact.zip new file mode 100644 index 000000000..b151ac2ff Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.16-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.16-legacy.zip b/tests/ast-parsing/compile/import-0.4.16-legacy.zip new file mode 100644 index 000000000..30c3f2d87 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.16-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.21-compact.zip b/tests/ast-parsing/compile/import-0.4.21-compact.zip new file mode 100644 index 000000000..75aa0899c Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.21-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.21-legacy.zip b/tests/ast-parsing/compile/import-0.4.21-legacy.zip new file mode 100644 index 000000000..586834f03 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.21-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.22-compact.zip b/tests/ast-parsing/compile/import-0.4.22-compact.zip new file mode 100644 index 000000000..348611c01 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.22-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.22-legacy.zip b/tests/ast-parsing/compile/import-0.4.22-legacy.zip new file mode 100644 index 000000000..804aecfd1 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.22-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.23-compact.zip b/tests/ast-parsing/compile/import-0.4.23-compact.zip new file mode 100644 index 000000000..bd825428f Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.23-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.23-legacy.zip b/tests/ast-parsing/compile/import-0.4.23-legacy.zip new file mode 100644 index 000000000..8a6c75951 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.23-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.24-compact.zip b/tests/ast-parsing/compile/import-0.4.24-compact.zip new file mode 100644 index 000000000..bb83cf640 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.24-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.24-legacy.zip b/tests/ast-parsing/compile/import-0.4.24-legacy.zip new file mode 100644 index 000000000..dcf58f57f Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.24-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.3-legacy.zip b/tests/ast-parsing/compile/import-0.4.3-legacy.zip new file mode 100644 index 000000000..7f5680b85 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.5-legacy.zip b/tests/ast-parsing/compile/import-0.4.5-legacy.zip new file mode 100644 index 000000000..814b36d2c Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.7-legacy.zip b/tests/ast-parsing/compile/import-0.4.7-legacy.zip new file mode 100644 index 000000000..0e90521a7 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.4.8-legacy.zip b/tests/ast-parsing/compile/import-0.4.8-legacy.zip new file mode 100644 index 000000000..38af619c9 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.4.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.5.0-compact.zip b/tests/ast-parsing/compile/import-0.5.0-compact.zip new file mode 100644 index 000000000..00b1b4e36 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.0-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.5.0-legacy.zip b/tests/ast-parsing/compile/import-0.5.0-legacy.zip new file mode 100644 index 000000000..8a8dc06f5 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.5.14-compact.zip b/tests/ast-parsing/compile/import-0.5.14-compact.zip new file mode 100644 index 000000000..d633cf38e Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.14-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.5.14-legacy.zip b/tests/ast-parsing/compile/import-0.5.14-legacy.zip new file mode 100644 index 000000000..c8449e907 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.14-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.5.3-compact.zip b/tests/ast-parsing/compile/import-0.5.3-compact.zip new file mode 100644 index 000000000..25fb82e79 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.3-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.5.3-legacy.zip b/tests/ast-parsing/compile/import-0.5.3-legacy.zip new file mode 100644 index 000000000..a5a5071ea Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.5.4-compact.zip b/tests/ast-parsing/compile/import-0.5.4-compact.zip new file mode 100644 index 000000000..3385208b5 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.4-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.5.4-legacy.zip b/tests/ast-parsing/compile/import-0.5.4-legacy.zip new file mode 100644 index 000000000..7e0c4e204 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.5.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.0-compact.zip b/tests/ast-parsing/compile/import-0.6.0-compact.zip new file mode 100644 index 000000000..f129824d0 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.0-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.0-legacy.zip b/tests/ast-parsing/compile/import-0.6.0-legacy.zip new file mode 100644 index 000000000..26e7a090a Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.1-compact.zip b/tests/ast-parsing/compile/import-0.6.1-compact.zip new file mode 100644 index 000000000..a359d9187 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.1-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.1-legacy.zip b/tests/ast-parsing/compile/import-0.6.1-legacy.zip new file mode 100644 index 000000000..62b6ea67e Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.2-compact.zip b/tests/ast-parsing/compile/import-0.6.2-compact.zip new file mode 100644 index 000000000..9f8f2a27e Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.2-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.2-legacy.zip b/tests/ast-parsing/compile/import-0.6.2-legacy.zip new file mode 100644 index 000000000..1ecb7f31c Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.5-compact.zip b/tests/ast-parsing/compile/import-0.6.5-compact.zip new file mode 100644 index 000000000..e2b0a6b62 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.5-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.5-legacy.zip b/tests/ast-parsing/compile/import-0.6.5-legacy.zip new file mode 100644 index 000000000..a3a919721 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.7-compact.zip b/tests/ast-parsing/compile/import-0.6.7-compact.zip new file mode 100644 index 000000000..566aa1a40 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.7-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.7-legacy.zip b/tests/ast-parsing/compile/import-0.6.7-legacy.zip new file mode 100644 index 000000000..01e16336a Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.8-compact.zip b/tests/ast-parsing/compile/import-0.6.8-compact.zip new file mode 100644 index 000000000..de97958d3 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.8-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.8-legacy.zip b/tests/ast-parsing/compile/import-0.6.8-legacy.zip new file mode 100644 index 000000000..20a97afd8 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.9-compact.zip b/tests/ast-parsing/compile/import-0.6.9-compact.zip new file mode 100644 index 000000000..044f7343b Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.9-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.6.9-legacy.zip b/tests/ast-parsing/compile/import-0.6.9-legacy.zip new file mode 100644 index 000000000..85ef07c33 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.6.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.7.0-compact.zip b/tests/ast-parsing/compile/import-0.7.0-compact.zip new file mode 100644 index 000000000..882b20e29 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.0-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.7.0-legacy.zip b/tests/ast-parsing/compile/import-0.7.0-legacy.zip new file mode 100644 index 000000000..ad792aed7 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.7.1-compact.zip b/tests/ast-parsing/compile/import-0.7.1-compact.zip new file mode 100644 index 000000000..b30507b47 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.1-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.7.1-legacy.zip b/tests/ast-parsing/compile/import-0.7.1-legacy.zip new file mode 100644 index 000000000..e7c187235 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.7.4-compact.zip b/tests/ast-parsing/compile/import-0.7.4-compact.zip new file mode 100644 index 000000000..48d467df9 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.4-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.7.4-legacy.zip b/tests/ast-parsing/compile/import-0.7.4-legacy.zip new file mode 100644 index 000000000..0b3b858fa Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.7.5-compact.zip b/tests/ast-parsing/compile/import-0.7.5-compact.zip new file mode 100644 index 000000000..e62cf022f Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.5-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.7.5-legacy.zip b/tests/ast-parsing/compile/import-0.7.5-legacy.zip new file mode 100644 index 000000000..3fdc70fe4 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.7.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/import-0.8.0-compact.zip b/tests/ast-parsing/compile/import-0.8.0-compact.zip new file mode 100644 index 000000000..c72272e36 Binary files /dev/null and b/tests/ast-parsing/compile/import-0.8.0-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.8.4-compact.zip b/tests/ast-parsing/compile/import-0.8.4-compact.zip new file mode 100644 index 000000000..30298683d Binary files /dev/null and b/tests/ast-parsing/compile/import-0.8.4-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.8.6-compact.zip b/tests/ast-parsing/compile/import-0.8.6-compact.zip new file mode 100644 index 000000000..1f5c51f9f Binary files /dev/null and b/tests/ast-parsing/compile/import-0.8.6-compact.zip differ diff --git a/tests/ast-parsing/compile/import-0.8.7-compact.zip b/tests/ast-parsing/compile/import-0.8.7-compact.zip new file mode 100644 index 000000000..05210083f Binary files /dev/null and b/tests/ast-parsing/compile/import-0.8.7-compact.zip differ diff --git a/tests/ast-parsing/expected/custom_error-0.4.0-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.0-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.0-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.1-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.1-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.1-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.10-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.10-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.10-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.11-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.11-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.11-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.14-compact.json b/tests/ast-parsing/expected/custom_error-0.4.14-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.14-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.14-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.14-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.14-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.16-compact.json b/tests/ast-parsing/expected/custom_error-0.4.16-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.16-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.16-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.16-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.16-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.21-compact.json b/tests/ast-parsing/expected/custom_error-0.4.21-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.21-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.21-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.21-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.21-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.22-compact.json b/tests/ast-parsing/expected/custom_error-0.4.22-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.22-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.22-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.22-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.22-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.23-compact.json b/tests/ast-parsing/expected/custom_error-0.4.23-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.23-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.23-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.23-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.23-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.24-compact.json b/tests/ast-parsing/expected/custom_error-0.4.24-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.24-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.24-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.24-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.24-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.3-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.3-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.3-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.5-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.5-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.5-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.7-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.7-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.7-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.8-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.8-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.8-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.0-compact.json b/tests/ast-parsing/expected/custom_error-0.5.0-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.0-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.0-legacy.json b/tests/ast-parsing/expected/custom_error-0.5.0-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.0-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.14-compact.json b/tests/ast-parsing/expected/custom_error-0.5.14-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.14-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.14-legacy.json b/tests/ast-parsing/expected/custom_error-0.5.14-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.14-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.3-compact.json b/tests/ast-parsing/expected/custom_error-0.5.3-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.3-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.3-legacy.json b/tests/ast-parsing/expected/custom_error-0.5.3-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.3-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.4-compact.json b/tests/ast-parsing/expected/custom_error-0.5.4-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.4-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.4-legacy.json b/tests/ast-parsing/expected/custom_error-0.5.4-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.4-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.0-compact.json b/tests/ast-parsing/expected/custom_error-0.6.0-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.0-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.0-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.0-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.0-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.1-compact.json b/tests/ast-parsing/expected/custom_error-0.6.1-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.1-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.1-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.1-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.1-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.2-compact.json b/tests/ast-parsing/expected/custom_error-0.6.2-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.2-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.2-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.2-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.2-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.5-compact.json b/tests/ast-parsing/expected/custom_error-0.6.5-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.5-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.5-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.5-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.5-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.7-compact.json b/tests/ast-parsing/expected/custom_error-0.6.7-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.7-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.7-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.7-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.7-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.8-compact.json b/tests/ast-parsing/expected/custom_error-0.6.8-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.8-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.8-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.8-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.8-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.9-compact.json b/tests/ast-parsing/expected/custom_error-0.6.9-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.9-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.9-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.9-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.9-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.0-compact.json b/tests/ast-parsing/expected/custom_error-0.7.0-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.0-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.0-legacy.json b/tests/ast-parsing/expected/custom_error-0.7.0-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.0-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.1-compact.json b/tests/ast-parsing/expected/custom_error-0.7.1-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.1-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.1-legacy.json b/tests/ast-parsing/expected/custom_error-0.7.1-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.1-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.4-compact.json b/tests/ast-parsing/expected/custom_error-0.7.4-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.4-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.4-legacy.json b/tests/ast-parsing/expected/custom_error-0.7.4-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.4-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.5-compact.json b/tests/ast-parsing/expected/custom_error-0.7.5-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.5-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.5-legacy.json b/tests/ast-parsing/expected/custom_error-0.7.5-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.5-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.8.0-compact.json b/tests/ast-parsing/expected/custom_error-0.8.0-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.8.0-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.8.4-compact.json b/tests/ast-parsing/expected/custom_error-0.8.4-compact.json new file mode 100644 index 000000000..995b49f83 --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.8.4-compact.json @@ -0,0 +1,16 @@ +{ + "VendingMachine": { + "err0()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "err2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "B": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "h()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.8.6-compact.json b/tests/ast-parsing/expected/custom_error-0.8.6-compact.json new file mode 100644 index 000000000..995b49f83 --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.8.6-compact.json @@ -0,0 +1,16 @@ +{ + "VendingMachine": { + "err0()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "err2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "B": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "h()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.8.7-compact.json b/tests/ast-parsing/expected/custom_error-0.8.7-compact.json new file mode 100644 index 000000000..995b49f83 --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.8.7-compact.json @@ -0,0 +1,16 @@ +{ + "VendingMachine": { + "err0()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "err2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "B": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "h()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/yul-0.7.5.sol b/tests/ast-parsing/yul-0.7.5.sol new file mode 100644 index 000000000..3a91cce1c --- /dev/null +++ b/tests/ast-parsing/yul-0.7.5.sol @@ -0,0 +1,9 @@ +contract C { + function f(bytes calldata paramA) external returns (uint256 retA) { + assembly { + retA := paramA.offset + retA := add(retA, batchData.length) + } + } + +}