diff --git a/.github/actions/upload-coverage/action.yml b/.github/actions/upload-coverage/action.yml index ac620c8e6..02fb82f65 100644 --- a/.github/actions/upload-coverage/action.yml +++ b/.github/actions/upload-coverage/action.yml @@ -15,15 +15,15 @@ runs: # This method has the limitation of 1 coverage file per run, limiting some coverage between online/offline tests. - run: | COVERAGE_UUID=$(python3 -c "import uuid; print(uuid.uuid4())") - echo "COVERAGE_UUID=${COVERAGE_UUID}" >> $GITHUB_OUTPUT + echo "COVERAGE_UUID=${COVERAGE_UUID}" >> "$GITHUB_OUTPUT" if [ -f .coverage ]; then mv .coverage .coverage.${COVERAGE_UUID} fi id: coverage-uuid shell: bash - - uses: actions/upload-artifact@v3.1.0 + - uses: actions/upload-artifact@v4 with: - name: coverage-data + name: coverage-data-${{ steps.coverage-uuid.outputs.COVERAGE_UUID }} path: | .coverage.* *.lcov diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..dd3015cbc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +--- +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + target-branch: "dev" + schedule: + interval: "weekly" diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index df51a3ddf..082333f2f 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -26,13 +26,13 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # Full git history is needed to get a proper list of changed files within `super-linter` fetch-depth: 0 - name: Set up Python 3.8 - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: 3.8 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09582eed9..7972c96e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "windows-2022"] + python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.11"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11"]') }} type: ["cli", "dapp", "data_dependency", @@ -52,11 +53,11 @@ jobs: - os: windows-2022 type: truffle steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.8 - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: ${{ matrix.python }} - name: Install dependencies run: | pip install ".[test]" @@ -66,11 +67,11 @@ jobs: - name: Set up nix if: matrix.type == 'dapp' - uses: cachix/install-nix-action@v20 + uses: cachix/install-nix-action@v25 - name: Set up cachix if: matrix.type == 'dapp' - uses: cachix/cachix-action@v10 + uses: cachix/cachix-action@v14 with: name: dapp diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 7e6f88f1e..e0e303ed8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -17,13 +17,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 id: buildx with: install: true @@ -40,14 +40,14 @@ jobs: type=edge - name: GitHub Container Registry Login - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Docker Build and Push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: platforms: linux/amd64,linux/arm64/v8,linux/arm/v7 target: final diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 20676e031..0942afb6d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,19 +28,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Pages - uses: actions/configure-pages@v3 - - uses: actions/setup-python@v4 + uses: actions/configure-pages@v4 + - uses: actions/setup-python@v5 with: python-version: '3.8' - run: pip install -e ".[doc]" - run: pdoc -o html/ slither '!slither.tools' #TODO fix import errors on pdoc run - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: # Upload the doc path: './html/' - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/doctor.yml b/.github/workflows/doctor.yml index 85d79f214..555452871 100644 --- a/.github/workflows/doctor.yml +++ b/.github/workflows/doctor.yml @@ -29,10 +29,10 @@ jobs: - os: windows-2022 python: 3.8 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index f972cbcd1..45dc0d8c2 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -9,8 +9,6 @@ defaults: on: pull_request: branches: [master, dev] - paths: - - "**/*.py" schedule: # run CI every day even if no PRs/merges occur @@ -27,13 +25,13 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # Full git history is needed to get a proper list of changed files within `super-linter` fetch-depth: 0 - name: Set up Python 3.8 - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: 3.8 @@ -42,6 +40,10 @@ jobs: mkdir -p .github/linters cp pyproject.toml .github/linters + - name: Register yamllint problem matcher + run: | + echo "::add-matcher::.github/workflows/matchers/yamllint.json" + - name: Lint everything else uses: super-linter/super-linter/slim@v4.9.2 if: always() @@ -55,7 +57,6 @@ jobs: VALIDATE_PYTHON_PYLINT: false VALIDATE_PYTHON_BLACK: false VALIDATE_PYTHON_ISORT: false - # Always false VALIDATE_JSON: false VALIDATE_JAVASCRIPT_STANDARD: false VALIDATE_PYTHON_FLAKE8: false diff --git a/.github/workflows/matchers/pylint.json b/.github/workflows/matchers/pylint.json new file mode 100644 index 000000000..4d9e13fca --- /dev/null +++ b/.github/workflows/matchers/pylint.json @@ -0,0 +1,32 @@ +{ + "problemMatcher": [ + { + "owner": "pylint-error", + "severity": "error", + "pattern": [ + { + "regexp": "^(.+):(\\d+):(\\d+):\\s(([EF]\\d{4}):\\s.+)$", + "file": 1, + "line": 2, + "column": 3, + "message": 4, + "code": 5 + } + ] + }, + { + "owner": "pylint-warning", + "severity": "warning", + "pattern": [ + { + "regexp": "^(.+):(\\d+):(\\d+):\\s(([CRW]\\d{4}):\\s.+)$", + "file": 1, + "line": 2, + "column": 3, + "message": 4, + "code": 5 + } + ] + } + ] +} \ No newline at end of file diff --git a/.github/workflows/matchers/yamllint.json b/.github/workflows/matchers/yamllint.json new file mode 100644 index 000000000..b0b2f125c --- /dev/null +++ b/.github/workflows/matchers/yamllint.json @@ -0,0 +1,22 @@ +{ + "problemMatcher": [ + { + "owner": "yamllint", + "pattern": [ + { + "regexp": "^(.*\\.ya?ml)$", + "file": 1 + }, + { + "regexp": "^\\s{2}(\\d+):(\\d+)\\s+(error|warning)\\s+(.*?)\\s+\\((.*)\\)$", + "line": 1, + "column": 2, + "severity": 3, + "message": 4, + "code": 5, + "loop": true + } + ] + } + ] + } \ No newline at end of file diff --git a/.github/workflows/pip-audit.yml b/.github/workflows/pip-audit.yml index 4fbc1a3fd..1c0a1d40a 100644 --- a/.github/workflows/pip-audit.yml +++ b/.github/workflows/pip-audit.yml @@ -18,10 +18,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..234e2eb05 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,53 @@ +name: Publish to PyPI + +on: + release: + types: [published] + +jobs: + build-release: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Build distributions + run: | + python -m pip install --upgrade pip + python -m pip install build + python -m build + - name: Upload distributions + uses: actions/upload-artifact@v4 + with: + name: slither-dists + path: dist/ + + publish: + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write # For trusted publishing + codesigning. + contents: write # For attaching signing artifacts to the release. + needs: + - build-release + steps: + - name: fetch dists + uses: actions/download-artifact@v4 + with: + name: slither-dists + path: dist/ + + - name: publish + uses: pypa/gh-action-pypi-publish@v1.8.11 + + - name: sign + uses: sigstore/gh-action-sigstore-python@v2.1.1 + with: + inputs: ./dist/*.tar.gz ./dist/*.whl + release-signing-artifacts: true diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 983c176a9..091da2b96 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -9,6 +9,8 @@ defaults: on: pull_request: branches: [master, dev] + paths: + - "**/*.py" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -21,13 +23,13 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # Full git history is needed to get a proper list of changed files within `super-linter` fetch-depth: 0 - name: Set up Python 3.8 - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: 3.8 @@ -36,6 +38,10 @@ jobs: mkdir -p .github/linters cp pyproject.toml .github/linters + - name: Register pylint problem matcher + run: | + echo "::add-matcher::.github/workflows/matchers/pylint.json" + - name: Pylint uses: super-linter/super-linter/slim@v4.9.2 if: always() diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a003eb168..f91243cc7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,12 +25,13 @@ jobs: matrix: os: ["ubuntu-latest", "windows-2022"] type: ["unit", "integration", "tool"] + python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.11"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11"]') }} steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.8 - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: ${{ matrix.python }} cache: "pip" cache-dependency-path: setup.py @@ -39,7 +40,7 @@ jobs: pip install ".[test]" - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '16' cache: 'npm' @@ -56,7 +57,23 @@ jobs: npm install hardhat popd || exit fi - + - name: Install Vyper + run: | + INSTALLDIR="$RUNNER_TEMP/vyper-install" + if [[ "$RUNNER_OS" = "Windows" ]]; then + URL="https://github.com/vyperlang/vyper/releases/download/v0.3.7/vyper.0.3.7+commit.6020b8bb.windows.exe" + FILENAME="vyper.exe" + elif [[ "$RUNNER_OS" = "Linux" ]]; then + URL="https://github.com/vyperlang/vyper/releases/download/v0.3.7/vyper.0.3.7+commit.6020b8bb.linux" + FILENAME="vyper" + else + echo "Unknown OS" + exit 1 + fi + mkdir -p "$INSTALLDIR" + curl "$URL" -o "$INSTALLDIR/$FILENAME" -L + chmod 755 "$INSTALLDIR/$FILENAME" + echo "$INSTALLDIR" >> "$GITHUB_PATH" - name: Run ${{ matrix.type }} tests env: TEST_TYPE: ${{ matrix.type }} @@ -74,7 +91,7 @@ jobs: uses: ./.github/actions/upload-coverage # only aggregate test coverage over linux-based tests to avoid any OS-specific filesystem information stored in # coverage metadata. - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.os == 'ubuntu-latest' && matrix.python == '3.8' }} coverage: needs: @@ -83,18 +100,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.8 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 - run: pip install coverage[toml] - name: download coverage data - uses: actions/download-artifact@v3.0.2 + uses: actions/download-artifact@v4 with: - name: coverage-data + pattern: coverage-data-* + merge-multiple: true - name: combine coverage data id: combinecoverage diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 000000000..605bd60e5 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,64 @@ +cff-version: 1.2.0 +title: Slither Analyzer +message: >- + If you use this software, please cite it using the + metadata from this file. +type: software +authors: + - given-names: Josselin + family-names: Feist + - given-names: Gustavo + family-names: Grieco + - given-names: Alex + family-names: Groce +identifiers: + - type: doi + value: 10.48550/arXiv.1908.09878 + description: arXiv.1908.09878 + - type: url + value: 'https://arxiv.org/abs/1908.09878' + description: arxiv + - type: doi + value: 10.1109/wetseb.2019.00008 +repository-code: 'https://github.com/crytic/slither' +url: 'https://www.trailofbits.com/' +repository-artifact: 'https://github.com/crytic/slither/releases' +abstract: >- + Slither is a static analysis framework designed to provide + rich information about Ethereum smart contracts. + + It works by converting Solidity smart contracts into an + intermediate representation called SlithIR. + + SlithIR uses Static Single Assignment (SSA) form and a + reduced instruction set to ease implementation of analyses + while preserving semantic information that would be lost + in transforming Solidity to bytecode. + + Slither allows for the application of commonly used + program analysis techniques like dataflow and taint + tracking. + + + Our framework has four main use cases: + + (1) automated detection of vulnerabilities, + + (2) automated detection of code optimization + opportunities, + + (3) improvement of the user's understanding of the + contracts, and + + (4) assistance with code review. +keywords: + - Ethereum + - Static Analysis + - Smart contracts + - EVM + - bug detection + - Software Engineering +license: AGPL-3.0-only +commit: 3d4f934d3228f072b7df2c5e7252c64df4601bc8 +version: 0.9.5 +date-released: '2023-06-28' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d1a9497f..ae7951c7f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,7 +81,7 @@ For each new detector, at least one regression tests must be present. 1. Create a folder in `tests/e2e/detectors/test_data` with the detector's argument name. 2. Create a test contract in `tests/e2e/detectors/test_data//`. -3. Update `ALL_TEST` in `tests/e2e/detectors/test_detectors.py` +3. Update `ALL_TESTS` in `tests/e2e/detectors/test_detectors.py`. 4. Run `python tests/e2e/detectors/test_detectors.py --compile` to create a zip file of the compilation artifacts. 5. `pytest tests/e2e/detectors/test_detectors.py --insta update-new`. This will generate a snapshot of the detector output in `tests/e2e/detectors/snapshots/`. If updating an existing detector, run `pytest tests/e2e/detectors/test_detectors.py --insta review` and accept or reject the updates. 6. Run `pytest tests/e2e/detectors/test_detectors.py` to ensure everything worked. Then, add and commit the files to git. @@ -96,9 +96,10 @@ For each new detector, at least one regression tests must be present. #### Adding parsing tests 1. Create a test in `tests/e2e/solc_parsing/` -2. Run `python tests/e2e/solc_parsing/test_ast_parsing.py --compile`. This will compile the artifact in `tests/e2e/solc_parsing/compile`. Add the compiled artifact to git. -3. Run `python tests/e2e/solc_parsing/test_ast_parsing.py --generate`. This will generate the json artifacts in `tests/e2e/solc_parsing/expected_json`. Add the generated files to git. -4. Run `pytest tests/e2e/solc_parsing/test_ast_parsing.py` and check that everything worked. +2. Update `ALL_TESTS` in `tests/e2e/solc_parsing/test_ast_parsing.py`. +3. Run `python tests/e2e/solc_parsing/test_ast_parsing.py --compile`. This will compile the artifact in `tests/e2e/solc_parsing/compile`. Add the compiled artifact to git. +4. Run `python tests/e2e/solc_parsing/test_ast_parsing.py --generate`. This will generate the json artifacts in `tests/e2e/solc_parsing/expected_json`. Add the generated files to git. +5. Run `pytest tests/e2e/solc_parsing/test_ast_parsing.py` and check that everything worked. > ##### Helpful commands for parsing tests > @@ -106,7 +107,7 @@ For each new detector, at least one regression tests must be present. > - To run tests for a specific test case, run `pytest tests/e2e/solc_parsing/test_ast_parsing.py -k user_defined_value_type` (the filename is the argument). > - To run tests for a specific version, run `pytest tests/e2e/solc_parsing/test_ast_parsing.py -k 0.8.12`. > - To run tests for a specific compiler json format, run `pytest tests/e2e/solc_parsing/test_ast_parsing.py -k legacy` (can be legacy or compact). -> - The IDs of tests can be inspected using ``pytest tests/e2e/solc_parsing/test_ast_parsing.py --collect-only`. +> - The IDs of tests can be inspected using `pytest tests/e2e/solc_parsing/test_ast_parsing.py --collect-only`. ### Synchronization with crytic-compile diff --git a/Dockerfile b/Dockerfile index d0a7d67be..6de5ec2c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,6 +47,6 @@ ENV PATH="/home/slither/.local/bin:${PATH}" RUN --mount=type=bind,target=/mnt,source=/wheels,from=python-wheels \ pip3 install --user --no-cache-dir --upgrade --no-index --find-links /mnt --no-deps /mnt/*.whl -RUN solc-select install 0.4.25 && solc-select use 0.4.25 +RUN solc-select use latest --always-install CMD /bin/bash diff --git a/README.md b/README.md index bce20bfb0..769ac58aa 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,38 @@ -# Slither, the Solidity source analyzer -Logo +# [Slither, the smart contract static analyzer](https://crytic.github.io/slither/slither.html) + +Slither Static Analysis Framework Logo [![Build Status](https://img.shields.io/github/actions/workflow/status/crytic/slither/ci.yml?branch=master)](https://github.com/crytic/slither/actions?query=workflow%3ACI) -[![Slack Status](https://empireslacking.herokuapp.com/badge.svg)](https://empireslacking.herokuapp.com) -[![PyPI version](https://badge.fury.io/py/slither-analyzer.svg)](https://badge.fury.io/py/slither-analyzer) - -Slither is a Solidity static analysis framework written in Python3. It runs a suite of vulnerability detectors, prints visual information about contract details, and provides an API to easily write custom analyses. Slither enables developers to find vulnerabilities, enhance their code comprehension, and quickly prototype custom analyses. - -- [Features](#features) -- [Usage](#usage) -- [How to Install](#how-to-install) -- [Detectors](#detectors) -- [Printers](#printers) -- [Tools](#tools) -- [API Documentation](#api-documentation) -- [Getting Help](#getting-help) -- [FAQ](#faq) -- [Publications](#publications) +![PyPI](https://img.shields.io/pypi/v/slither-analyzer?logo=python&logoColor=white&label=slither-analyzer) +[![Slither - Read the Docs](https://img.shields.io/badge/Slither-Read_the_Docs-2ea44f)](https://crytic.github.io/slither/slither.html) +[![Slither - Wiki](https://img.shields.io/badge/Slither-Wiki-2ea44f)](https://github.com/crytic/slither/wiki/SlithIR) + +> Join the Empire Hacking Slack +> +> [![Slack Status](https://slack.empirehacking.nyc/badge.svg)](https://slack.empirehacking.nyc/) +> > - Discussions and Support + +**Slither** is a Solidity & Vyper static analysis framework written in Python3. It runs a suite of vulnerability detectors, prints visual information about contract details, and provides an API to easily write custom analyses. Slither enables developers to find vulnerabilities, enhance their code comprehension, and quickly prototype custom analyses. + +* [Features](#features) +* [Usage](#usage) +* [How to install](#how-to-install) + * [Using Pip](#using-pip) + * [Using Git](#using-git) + * [Using Docker](#using-docker) + * [Integration](#integration) +* [Detectors](#detectors) +* [Printers](#printers) + * [Quick Review Printers](#quick-review-printers) + * [In-Depth Review Printers](#in-depth-review-printers) +* [Tools](#tools) +* [API Documentation](#api-documentation) +* [Getting Help](#getting-help) +* [FAQ](#faq) +* [License](#license) +* [Publications](#publications) + * [Trail of Bits publication](#trail-of-bits-publication) + * [External publications](#external-publications) ## Features @@ -30,36 +46,41 @@ Slither is a Solidity static analysis framework written in Python3. It runs a su * Correctly parses 99.9% of all public Solidity code * Average execution time of less than 1 second per contract * Integrates with Github's code scanning in [CI](https://github.com/marketplace/actions/slither-action) +* Support for Vyper smart contracts ## Usage Run Slither on a Hardhat/Foundry/Dapp/Brownie application: -```bash + +```console slither . ``` + This is the preferred option if your project has dependencies as Slither relies on the underlying compilation framework to compile source code. However, you can run Slither on a single file that does not import dependencies: -```bash + +```console slither tests/uninitialized.sol ``` ## How to install -Slither requires Python 3.8+. +> **Note**
+> Slither requires Python 3.8+. If you're **not** going to use one of the [supported compilation frameworks](https://github.com/crytic/crytic-compile), you need [solc](https://github.com/ethereum/solidity/), the Solidity compiler; we recommend using [solc-select](https://github.com/crytic/solc-select) to conveniently switch between solc versions. ### Using Pip -```bash -pip3 install slither-analyzer +```console +python3 -m pip install slither-analyzer ``` ### Using Git ```bash git clone https://github.com/crytic/slither.git && cd slither -python3 setup.py install +python3 -m pip install . ``` We recommend using a Python virtual environment, as detailed in the [Developer Installation Instructions](https://github.com/trailofbits/slither/wiki/Developer-installation), if you prefer to install Slither via git. @@ -79,118 +100,130 @@ docker run -it -v /home/share:/share trailofbits/eth-security-toolbox ``` ### Integration -- For GitHub action integration, use [slither-action](https://github.com/marketplace/actions/slither-action). -- To generate a Markdown report, use `slither [target] --checklist`. -- To generate a Markdown with GitHub source code highlighting, use `slither [target] --checklist --markdown-root https://github.com/ORG/REPO/blob/COMMIT/` (replace `ORG`, `REPO`, `COMMIT`) -## Detectors +* For GitHub action integration, use [slither-action](https://github.com/marketplace/actions/slither-action). +* To generate a Markdown report, use `slither [target] --checklist`. +* To generate a Markdown with GitHub source code highlighting, use `slither [target] --checklist --markdown-root https://github.com/ORG/REPO/blob/COMMIT/` (replace `ORG`, `REPO`, `COMMIT`) +## Detectors Num | Detector | What it Detects | Impact | Confidence --- | --- | --- | --- | --- 1 | `abiencoderv2-array` | [Storage abiencoderv2 array](https://github.com/crytic/slither/wiki/Detector-Documentation#storage-abiencoderv2-array) | High | High 2 | `arbitrary-send-erc20` | [transferFrom uses arbitrary `from`](https://github.com/crytic/slither/wiki/Detector-Documentation#arbitrary-from-in-transferfrom) | High | High 3 | `array-by-reference` | [Modifying storage array by value](https://github.com/crytic/slither/wiki/Detector-Documentation#modifying-storage-array-by-value) | High | High -4 | `incorrect-shift` | [The order of parameters in a shift instruction is incorrect.](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-shift-in-assembly) | High | High -5 | `multiple-constructors` | [Multiple constructor schemes](https://github.com/crytic/slither/wiki/Detector-Documentation#multiple-constructor-schemes) | High | High -6 | `name-reused` | [Contract's name reused](https://github.com/crytic/slither/wiki/Detector-Documentation#name-reused) | High | High -7 | `protected-vars` | [Detected unprotected variables](https://github.com/crytic/slither/wiki/Detector-Documentation#protected-variables) | High | High -8 | `public-mappings-nested` | [Public mappings with nested variables](https://github.com/crytic/slither/wiki/Detector-Documentation#public-mappings-with-nested-variables) | High | High -9 | `rtlo` | [Right-To-Left-Override control character is used](https://github.com/crytic/slither/wiki/Detector-Documentation#right-to-left-override-character) | High | High -10 | `shadowing-state` | [State variables shadowing](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing) | High | High -11 | `suicidal` | [Functions allowing anyone to destruct the contract](https://github.com/crytic/slither/wiki/Detector-Documentation#suicidal) | High | High -12 | `uninitialized-state` | [Uninitialized state variables](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-state-variables) | High | High -13 | `uninitialized-storage` | [Uninitialized storage variables](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-storage-variables) | High | High -14 | `unprotected-upgrade` | [Unprotected upgradeable contract](https://github.com/crytic/slither/wiki/Detector-Documentation#unprotected-upgradeable-contract) | High | High -15 | `codex` | [Use Codex to find vulnerabilities.](https://github.com/crytic/slither/wiki/Detector-Documentation#codex) | High | Low -16 | `arbitrary-send-erc20-permit` | [transferFrom uses arbitrary from with permit](https://github.com/crytic/slither/wiki/Detector-Documentation#arbitrary-from-in-transferfrom-used-with-permit) | High | Medium -17 | `arbitrary-send-eth` | [Functions that send Ether to arbitrary destinations](https://github.com/crytic/slither/wiki/Detector-Documentation#functions-that-send-ether-to-arbitrary-destinations) | High | Medium -18 | `controlled-array-length` | [Tainted array length assignment](https://github.com/crytic/slither/wiki/Detector-Documentation#array-length-assignment) | High | Medium -19 | `controlled-delegatecall` | [Controlled delegatecall destination](https://github.com/crytic/slither/wiki/Detector-Documentation#controlled-delegatecall) | High | Medium -20 | `delegatecall-loop` | [Payable functions using `delegatecall` inside a loop](https://github.com/crytic/slither/wiki/Detector-Documentation/#payable-functions-using-delegatecall-inside-a-loop) | High | Medium -21 | `msg-value-loop` | [msg.value inside a loop](https://github.com/crytic/slither/wiki/Detector-Documentation/#msgvalue-inside-a-loop) | High | Medium -22 | `reentrancy-eth` | [Reentrancy vulnerabilities (theft of ethers)](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities) | High | Medium -23 | `storage-array` | [Signed storage integer array compiler bug](https://github.com/crytic/slither/wiki/Detector-Documentation#storage-signed-integer-array) | High | Medium -24 | `unchecked-transfer` | [Unchecked tokens transfer](https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-transfer) | High | Medium -25 | `weak-prng` | [Weak PRNG](https://github.com/crytic/slither/wiki/Detector-Documentation#weak-PRNG) | High | Medium -26 | `domain-separator-collision` | [Detects ERC20 tokens that have a function whose signature collides with EIP-2612's DOMAIN_SEPARATOR()](https://github.com/crytic/slither/wiki/Detector-Documentation#domain-separator-collision) | Medium | High -27 | `enum-conversion` | [Detect dangerous enum conversion](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-enum-conversion) | Medium | High -28 | `erc20-interface` | [Incorrect ERC20 interfaces](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc20-interface) | Medium | High -29 | `erc721-interface` | [Incorrect ERC721 interfaces](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc721-interface) | Medium | High -30 | `incorrect-equality` | [Dangerous strict equalities](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-strict-equalities) | Medium | High -31 | `locked-ether` | [Contracts that lock ether](https://github.com/crytic/slither/wiki/Detector-Documentation#contracts-that-lock-ether) | Medium | High -32 | `mapping-deletion` | [Deletion on mapping containing a structure](https://github.com/crytic/slither/wiki/Detector-Documentation#deletion-on-mapping-containing-a-structure) | Medium | High -33 | `shadowing-abstract` | [State variables shadowing from abstract contracts](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing-from-abstract-contracts) | Medium | High -34 | `tautology` | [Tautology or contradiction](https://github.com/crytic/slither/wiki/Detector-Documentation#tautology-or-contradiction) | Medium | High -35 | `write-after-write` | [Unused write](https://github.com/crytic/slither/wiki/Detector-Documentation#write-after-write) | Medium | High -36 | `boolean-cst` | [Misuse of Boolean constant](https://github.com/crytic/slither/wiki/Detector-Documentation#misuse-of-a-boolean-constant) | Medium | Medium -37 | `constant-function-asm` | [Constant functions using assembly code](https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-using-assembly-code) | Medium | Medium -38 | `constant-function-state` | [Constant functions changing the state](https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-changing-the-state) | Medium | Medium -39 | `divide-before-multiply` | [Imprecise arithmetic operations order](https://github.com/crytic/slither/wiki/Detector-Documentation#divide-before-multiply) | Medium | Medium -40 | `reentrancy-no-eth` | [Reentrancy vulnerabilities (no theft of ethers)](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-1) | Medium | Medium -41 | `reused-constructor` | [Reused base constructor](https://github.com/crytic/slither/wiki/Detector-Documentation#reused-base-constructors) | Medium | Medium -42 | `tx-origin` | [Dangerous usage of `tx.origin`](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-usage-of-txorigin) | Medium | Medium -43 | `unchecked-lowlevel` | [Unchecked low-level calls](https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-low-level-calls) | Medium | Medium -44 | `unchecked-send` | [Unchecked send](https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-send) | Medium | Medium -45 | `uninitialized-local` | [Uninitialized local variables](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-local-variables) | Medium | Medium -46 | `unused-return` | [Unused return values](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-return) | Medium | Medium -47 | `incorrect-modifier` | [Modifiers that can return the default value](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-modifier) | Low | High -48 | `shadowing-builtin` | [Built-in symbol shadowing](https://github.com/crytic/slither/wiki/Detector-Documentation#builtin-symbol-shadowing) | Low | High -49 | `shadowing-local` | [Local variables shadowing](https://github.com/crytic/slither/wiki/Detector-Documentation#local-variable-shadowing) | Low | High -50 | `uninitialized-fptr-cst` | [Uninitialized function pointer calls in constructors](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-function-pointers-in-constructors) | Low | High -51 | `variable-scope` | [Local variables used prior their declaration](https://github.com/crytic/slither/wiki/Detector-Documentation#pre-declaration-usage-of-local-variables) | Low | High -52 | `void-cst` | [Constructor called not implemented](https://github.com/crytic/slither/wiki/Detector-Documentation#void-constructor) | Low | High -53 | `calls-loop` | [Multiple calls in a loop](https://github.com/crytic/slither/wiki/Detector-Documentation/#calls-inside-a-loop) | Low | Medium -54 | `events-access` | [Missing Events Access Control](https://github.com/crytic/slither/wiki/Detector-Documentation#missing-events-access-control) | Low | Medium -55 | `events-maths` | [Missing Events Arithmetic](https://github.com/crytic/slither/wiki/Detector-Documentation#missing-events-arithmetic) | Low | Medium -56 | `incorrect-unary` | [Dangerous unary expressions](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-unary-expressions) | Low | Medium -57 | `missing-zero-check` | [Missing Zero Address Validation](https://github.com/crytic/slither/wiki/Detector-Documentation#missing-zero-address-validation) | Low | Medium -58 | `reentrancy-benign` | [Benign reentrancy vulnerabilities](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-2) | Low | Medium -59 | `reentrancy-events` | [Reentrancy vulnerabilities leading to out-of-order Events](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-3) | Low | Medium -60 | `timestamp` | [Dangerous usage of `block.timestamp`](https://github.com/crytic/slither/wiki/Detector-Documentation#block-timestamp) | Low | Medium -61 | `assembly` | [Assembly usage](https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage) | Informational | High -62 | `assert-state-change` | [Assert state change](https://github.com/crytic/slither/wiki/Detector-Documentation#assert-state-change) | Informational | High -63 | `boolean-equal` | [Comparison to boolean constant](https://github.com/crytic/slither/wiki/Detector-Documentation#boolean-equality) | Informational | High -64 | `cyclomatic-complexity` | [Detects functions with high (> 11) cyclomatic complexity](https://github.com/crytic/slither/wiki/Detector-Documentation#cyclomatic-complexity) | Informational | High -65 | `deprecated-standards` | [Deprecated Solidity Standards](https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards) | Informational | High -66 | `erc20-indexed` | [Un-indexed ERC20 event parameters](https://github.com/crytic/slither/wiki/Detector-Documentation#unindexed-erc20-event-parameters) | Informational | High -67 | `function-init-state` | [Function initializing state variables](https://github.com/crytic/slither/wiki/Detector-Documentation#function-initializing-state) | Informational | High -68 | `low-level-calls` | [Low level calls](https://github.com/crytic/slither/wiki/Detector-Documentation#low-level-calls) | Informational | High -69 | `missing-inheritance` | [Missing inheritance](https://github.com/crytic/slither/wiki/Detector-Documentation#missing-inheritance) | Informational | High -70 | `naming-convention` | [Conformity to Solidity naming conventions](https://github.com/crytic/slither/wiki/Detector-Documentation#conformance-to-solidity-naming-conventions) | Informational | High -71 | `pragma` | [If different pragma directives are used](https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used) | Informational | High -72 | `redundant-statements` | [Redundant statements](https://github.com/crytic/slither/wiki/Detector-Documentation#redundant-statements) | Informational | High -73 | `solc-version` | [Incorrect Solidity version](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity) | Informational | High -74 | `unimplemented-functions` | [Unimplemented functions](https://github.com/crytic/slither/wiki/Detector-Documentation#unimplemented-functions) | Informational | High -75 | `unused-state` | [Unused state variables](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-state-variable) | Informational | High -76 | `costly-loop` | [Costly operations in a loop](https://github.com/crytic/slither/wiki/Detector-Documentation#costly-operations-inside-a-loop) | Informational | Medium -77 | `dead-code` | [Functions that are not used](https://github.com/crytic/slither/wiki/Detector-Documentation#dead-code) | Informational | Medium -78 | `reentrancy-unlimited-gas` | [Reentrancy vulnerabilities through send and transfer](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-4) | Informational | Medium -79 | `similar-names` | [Variable names are too similar](https://github.com/crytic/slither/wiki/Detector-Documentation#variable-names-too-similar) | Informational | Medium -80 | `too-many-digits` | [Conformance to numeric notation best practices](https://github.com/crytic/slither/wiki/Detector-Documentation#too-many-digits) | Informational | Medium -81 | `constable-states` | [State variables that could be declared constant](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-constant) | Optimization | High -82 | `external-function` | [Public function that could be declared external](https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-external) | Optimization | High -83 | `immutable-states` | [State variables that could be declared immutable](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-immutable) | Optimization | High -84 | `var-read-using-this` | [Contract reads its own variable using `this`](https://github.com/crytic/slither/wiki/Vulnerabilities-Description#public-variable-read-in-external-context) | Optimization | High +4 | `encode-packed-collision` | [ABI encodePacked Collision](https://github.com/crytic/slither/wiki/Detector-Documentation#abi-encodePacked-collision) | High | High +5 | `incorrect-shift` | [The order of parameters in a shift instruction is incorrect.](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-shift-in-assembly) | High | High +6 | `multiple-constructors` | [Multiple constructor schemes](https://github.com/crytic/slither/wiki/Detector-Documentation#multiple-constructor-schemes) | High | High +7 | `name-reused` | [Contract's name reused](https://github.com/crytic/slither/wiki/Detector-Documentation#name-reused) | High | High +8 | `protected-vars` | [Detected unprotected variables](https://github.com/crytic/slither/wiki/Detector-Documentation#protected-variables) | High | High +9 | `public-mappings-nested` | [Public mappings with nested variables](https://github.com/crytic/slither/wiki/Detector-Documentation#public-mappings-with-nested-variables) | High | High +10 | `rtlo` | [Right-To-Left-Override control character is used](https://github.com/crytic/slither/wiki/Detector-Documentation#right-to-left-override-character) | High | High +11 | `shadowing-state` | [State variables shadowing](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing) | High | High +12 | `suicidal` | [Functions allowing anyone to destruct the contract](https://github.com/crytic/slither/wiki/Detector-Documentation#suicidal) | High | High +13 | `uninitialized-state` | [Uninitialized state variables](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-state-variables) | High | High +14 | `uninitialized-storage` | [Uninitialized storage variables](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-storage-variables) | High | High +15 | `unprotected-upgrade` | [Unprotected upgradeable contract](https://github.com/crytic/slither/wiki/Detector-Documentation#unprotected-upgradeable-contract) | High | High +16 | `codex` | [Use Codex to find vulnerabilities.](https://github.com/crytic/slither/wiki/Detector-Documentation#codex) | High | Low +17 | `arbitrary-send-erc20-permit` | [transferFrom uses arbitrary from with permit](https://github.com/crytic/slither/wiki/Detector-Documentation#arbitrary-from-in-transferfrom-used-with-permit) | High | Medium +18 | `arbitrary-send-eth` | [Functions that send Ether to arbitrary destinations](https://github.com/crytic/slither/wiki/Detector-Documentation#functions-that-send-ether-to-arbitrary-destinations) | High | Medium +19 | `controlled-array-length` | [Tainted array length assignment](https://github.com/crytic/slither/wiki/Detector-Documentation#array-length-assignment) | High | Medium +20 | `controlled-delegatecall` | [Controlled delegatecall destination](https://github.com/crytic/slither/wiki/Detector-Documentation#controlled-delegatecall) | High | Medium +21 | `delegatecall-loop` | [Payable functions using `delegatecall` inside a loop](https://github.com/crytic/slither/wiki/Detector-Documentation/#payable-functions-using-delegatecall-inside-a-loop) | High | Medium +22 | `incorrect-exp` | [Incorrect exponentiation](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-exponentiation) | High | Medium +23 | `incorrect-return` | [If a `return` is incorrectly used in assembly mode.](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-return-in-assembly) | High | Medium +24 | `msg-value-loop` | [msg.value inside a loop](https://github.com/crytic/slither/wiki/Detector-Documentation/#msgvalue-inside-a-loop) | High | Medium +25 | `reentrancy-eth` | [Reentrancy vulnerabilities (theft of ethers)](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities) | High | Medium +26 | `return-leave` | [If a `return` is used instead of a `leave`.](https://github.com/crytic/slither/wiki/Detector-Documentation#return-instead-of-leave-in-assembly) | High | Medium +27 | `storage-array` | [Signed storage integer array compiler bug](https://github.com/crytic/slither/wiki/Detector-Documentation#storage-signed-integer-array) | High | Medium +28 | `unchecked-transfer` | [Unchecked tokens transfer](https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-transfer) | High | Medium +29 | `weak-prng` | [Weak PRNG](https://github.com/crytic/slither/wiki/Detector-Documentation#weak-PRNG) | High | Medium +30 | `domain-separator-collision` | [Detects ERC20 tokens that have a function whose signature collides with EIP-2612's DOMAIN_SEPARATOR()](https://github.com/crytic/slither/wiki/Detector-Documentation#domain-separator-collision) | Medium | High +31 | `enum-conversion` | [Detect dangerous enum conversion](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-enum-conversion) | Medium | High +32 | `erc20-interface` | [Incorrect ERC20 interfaces](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc20-interface) | Medium | High +33 | `erc721-interface` | [Incorrect ERC721 interfaces](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc721-interface) | Medium | High +34 | `incorrect-equality` | [Dangerous strict equalities](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-strict-equalities) | Medium | High +35 | `locked-ether` | [Contracts that lock ether](https://github.com/crytic/slither/wiki/Detector-Documentation#contracts-that-lock-ether) | Medium | High +36 | `mapping-deletion` | [Deletion on mapping containing a structure](https://github.com/crytic/slither/wiki/Detector-Documentation#deletion-on-mapping-containing-a-structure) | Medium | High +37 | `shadowing-abstract` | [State variables shadowing from abstract contracts](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing-from-abstract-contracts) | Medium | High +38 | `tautological-compare` | [Comparing a variable to itself always returns true or false, depending on comparison](https://github.com/crytic/slither/wiki/Detector-Documentation#tautological-compare) | Medium | High +39 | `tautology` | [Tautology or contradiction](https://github.com/crytic/slither/wiki/Detector-Documentation#tautology-or-contradiction) | Medium | High +40 | `write-after-write` | [Unused write](https://github.com/crytic/slither/wiki/Detector-Documentation#write-after-write) | Medium | High +41 | `boolean-cst` | [Misuse of Boolean constant](https://github.com/crytic/slither/wiki/Detector-Documentation#misuse-of-a-boolean-constant) | Medium | Medium +42 | `constant-function-asm` | [Constant functions using assembly code](https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-using-assembly-code) | Medium | Medium +43 | `constant-function-state` | [Constant functions changing the state](https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-changing-the-state) | Medium | Medium +44 | `divide-before-multiply` | [Imprecise arithmetic operations order](https://github.com/crytic/slither/wiki/Detector-Documentation#divide-before-multiply) | Medium | Medium +45 | `reentrancy-no-eth` | [Reentrancy vulnerabilities (no theft of ethers)](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-1) | Medium | Medium +46 | `reused-constructor` | [Reused base constructor](https://github.com/crytic/slither/wiki/Detector-Documentation#reused-base-constructors) | Medium | Medium +47 | `tx-origin` | [Dangerous usage of `tx.origin`](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-usage-of-txorigin) | Medium | Medium +48 | `unchecked-lowlevel` | [Unchecked low-level calls](https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-low-level-calls) | Medium | Medium +49 | `unchecked-send` | [Unchecked send](https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-send) | Medium | Medium +50 | `uninitialized-local` | [Uninitialized local variables](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-local-variables) | Medium | Medium +51 | `unused-return` | [Unused return values](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-return) | Medium | Medium +52 | `incorrect-modifier` | [Modifiers that can return the default value](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-modifier) | Low | High +53 | `shadowing-builtin` | [Built-in symbol shadowing](https://github.com/crytic/slither/wiki/Detector-Documentation#builtin-symbol-shadowing) | Low | High +54 | `shadowing-local` | [Local variables shadowing](https://github.com/crytic/slither/wiki/Detector-Documentation#local-variable-shadowing) | Low | High +55 | `uninitialized-fptr-cst` | [Uninitialized function pointer calls in constructors](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-function-pointers-in-constructors) | Low | High +56 | `variable-scope` | [Local variables used prior their declaration](https://github.com/crytic/slither/wiki/Detector-Documentation#pre-declaration-usage-of-local-variables) | Low | High +57 | `void-cst` | [Constructor called not implemented](https://github.com/crytic/slither/wiki/Detector-Documentation#void-constructor) | Low | High +58 | `calls-loop` | [Multiple calls in a loop](https://github.com/crytic/slither/wiki/Detector-Documentation/#calls-inside-a-loop) | Low | Medium +59 | `events-access` | [Missing Events Access Control](https://github.com/crytic/slither/wiki/Detector-Documentation#missing-events-access-control) | Low | Medium +60 | `events-maths` | [Missing Events Arithmetic](https://github.com/crytic/slither/wiki/Detector-Documentation#missing-events-arithmetic) | Low | Medium +61 | `incorrect-unary` | [Dangerous unary expressions](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-unary-expressions) | Low | Medium +62 | `missing-zero-check` | [Missing Zero Address Validation](https://github.com/crytic/slither/wiki/Detector-Documentation#missing-zero-address-validation) | Low | Medium +63 | `reentrancy-benign` | [Benign reentrancy vulnerabilities](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-2) | Low | Medium +64 | `reentrancy-events` | [Reentrancy vulnerabilities leading to out-of-order Events](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-3) | Low | Medium +65 | `return-bomb` | [A low level callee may consume all callers gas unexpectedly.](https://github.com/crytic/slither/wiki/Detector-Documentation#return-bomb) | Low | Medium +66 | `timestamp` | [Dangerous usage of `block.timestamp`](https://github.com/crytic/slither/wiki/Detector-Documentation#block-timestamp) | Low | Medium +67 | `assembly` | [Assembly usage](https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage) | Informational | High +68 | `assert-state-change` | [Assert state change](https://github.com/crytic/slither/wiki/Detector-Documentation#assert-state-change) | Informational | High +69 | `boolean-equal` | [Comparison to boolean constant](https://github.com/crytic/slither/wiki/Detector-Documentation#boolean-equality) | Informational | High +70 | `cyclomatic-complexity` | [Detects functions with high (> 11) cyclomatic complexity](https://github.com/crytic/slither/wiki/Detector-Documentation#cyclomatic-complexity) | Informational | High +71 | `deprecated-standards` | [Deprecated Solidity Standards](https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards) | Informational | High +72 | `erc20-indexed` | [Un-indexed ERC20 event parameters](https://github.com/crytic/slither/wiki/Detector-Documentation#unindexed-erc20-event-parameters) | Informational | High +73 | `function-init-state` | [Function initializing state variables](https://github.com/crytic/slither/wiki/Detector-Documentation#function-initializing-state) | Informational | High +74 | `incorrect-using-for` | [Detects using-for statement usage when no function from a given library matches a given type](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-using-for-usage) | Informational | High +75 | `low-level-calls` | [Low level calls](https://github.com/crytic/slither/wiki/Detector-Documentation#low-level-calls) | Informational | High +76 | `missing-inheritance` | [Missing inheritance](https://github.com/crytic/slither/wiki/Detector-Documentation#missing-inheritance) | Informational | High +77 | `naming-convention` | [Conformity to Solidity naming conventions](https://github.com/crytic/slither/wiki/Detector-Documentation#conformance-to-solidity-naming-conventions) | Informational | High +78 | `pragma` | [If different pragma directives are used](https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used) | Informational | High +79 | `redundant-statements` | [Redundant statements](https://github.com/crytic/slither/wiki/Detector-Documentation#redundant-statements) | Informational | High +80 | `solc-version` | [Incorrect Solidity version](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity) | Informational | High +81 | `unimplemented-functions` | [Unimplemented functions](https://github.com/crytic/slither/wiki/Detector-Documentation#unimplemented-functions) | Informational | High +82 | `unused-state` | [Unused state variables](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-state-variable) | Informational | High +83 | `costly-loop` | [Costly operations in a loop](https://github.com/crytic/slither/wiki/Detector-Documentation#costly-operations-inside-a-loop) | Informational | Medium +84 | `dead-code` | [Functions that are not used](https://github.com/crytic/slither/wiki/Detector-Documentation#dead-code) | Informational | Medium +85 | `reentrancy-unlimited-gas` | [Reentrancy vulnerabilities through send and transfer](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-4) | Informational | Medium +86 | `similar-names` | [Variable names are too similar](https://github.com/crytic/slither/wiki/Detector-Documentation#variable-names-too-similar) | Informational | Medium +87 | `too-many-digits` | [Conformance to numeric notation best practices](https://github.com/crytic/slither/wiki/Detector-Documentation#too-many-digits) | Informational | Medium +88 | `cache-array-length` | [Detects `for` loops that use `length` member of some storage array in their loop condition and don't modify it.](https://github.com/crytic/slither/wiki/Detector-Documentation#cache-array-length) | Optimization | High +89 | `constable-states` | [State variables that could be declared constant](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-constant) | Optimization | High +90 | `external-function` | [Public function that could be declared external](https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-external) | Optimization | High +91 | `immutable-states` | [State variables that could be declared immutable](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-immutable) | Optimization | High +92 | `var-read-using-this` | [Contract reads its own variable using `this`](https://github.com/crytic/slither/wiki/Detector-Documentation#public-variable-read-in-external-context) | Optimization | High For more information, see -- The [Detector Documentation](https://github.com/crytic/slither/wiki/Detector-Documentation) for details on each detector -- The [Detection Selection](https://github.com/crytic/slither/wiki/Usage#detector-selection) to run only selected detectors. By default, all the detectors are run. -- The [Triage Mode](https://github.com/crytic/slither/wiki/Usage#triage-mode) to filter individual results + +* The [Detector Documentation](https://github.com/crytic/slither/wiki/Detector-Documentation) for details on each detector +* The [Detection Selection](https://github.com/crytic/slither/wiki/Usage#detector-selection) to run only selected detectors. By default, all the detectors are run. +* The [Triage Mode](https://github.com/crytic/slither/wiki/Usage#triage-mode) to filter individual results ## Printers ### Quick Review Printers -- `human-summary`: [Print a human-readable summary of the contracts](https://github.com/trailofbits/slither/wiki/Printer-documentation#human-summary) -- `inheritance-graph`: [Export the inheritance graph of each contract to a dot file](https://github.com/trailofbits/slither/wiki/Printer-documentation#inheritance-graph) -- `contract-summary`: [Print a summary of the contracts](https://github.com/trailofbits/slither/wiki/Printer-documentation#contract-summary) + +* `human-summary`: [Print a human-readable summary of the contracts](https://github.com/trailofbits/slither/wiki/Printer-documentation#human-summary) +* `inheritance-graph`: [Export the inheritance graph of each contract to a dot file](https://github.com/trailofbits/slither/wiki/Printer-documentation#inheritance-graph) +* `contract-summary`: [Print a summary of the contracts](https://github.com/trailofbits/slither/wiki/Printer-documentation#contract-summary) +* `loc`: [Count the total number lines of code (LOC), source lines of code (SLOC), and comment lines of code (CLOC) found in source files (SRC), dependencies (DEP), and test files (TEST).](https://github.com/trailofbits/slither/wiki/Printer-documentation#loc) ### In-Depth Review Printers -- `call-graph`: [Export the call-graph of the contracts to a dot file](https://github.com/trailofbits/slither/wiki/Printer-documentation#call-graph) -- `cfg`: [Export the CFG of each functions](https://github.com/trailofbits/slither/wiki/Printer-documentation#cfg) -- `function-summary`: [Print a summary of the functions](https://github.com/trailofbits/slither/wiki/Printer-documentation#function-summary) -- `vars-and-auth`: [Print the state variables written and the authorization of the functions](https://github.com/crytic/slither/wiki/Printer-documentation#variables-written-and-authorization) -- `when-not-paused`: [Print functions that do not use `whenNotPaused` modifier](https://github.com/trailofbits/slither/wiki/Printer-documentation#when-not-paused). + +* `call-graph`: [Export the call-graph of the contracts to a dot file](https://github.com/trailofbits/slither/wiki/Printer-documentation#call-graph) +* `cfg`: [Export the CFG of each functions](https://github.com/trailofbits/slither/wiki/Printer-documentation#cfg) +* `function-summary`: [Print a summary of the functions](https://github.com/trailofbits/slither/wiki/Printer-documentation#function-summary) +* `vars-and-auth`: [Print the state variables written and the authorization of the functions](https://github.com/crytic/slither/wiki/Printer-documentation#variables-written-and-authorization) +* `not-pausable`: [Print functions that do not use `whenNotPaused` modifier](https://github.com/trailofbits/slither/wiki/Printer-documentation#when-not-paused). To run a printer, use `--print` and a comma-separated list of printers. @@ -198,18 +231,20 @@ See the [Printer documentation](https://github.com/crytic/slither/wiki/Printer-d ## Tools -- `slither-check-upgradeability`: [Review `delegatecall`-based upgradeability](https://github.com/crytic/slither/wiki/Upgradeability-Checks) -- `slither-prop`: [Automatic unit test and property generation](https://github.com/crytic/slither/wiki/Property-generation) -- `slither-flat`: [Flatten a codebase](https://github.com/crytic/slither/wiki/Contract-Flattening) -- `slither-check-erc`: [Check the ERC's conformance](https://github.com/crytic/slither/wiki/ERC-Conformance) -- `slither-format`: [Automatic patch generation](https://github.com/crytic/slither/wiki/Slither-format) -- `slither-read-storage`: [Read storage values from contracts](./slither/tools/read_storage/README.md) +* `slither-check-upgradeability`: [Review `delegatecall`-based upgradeability](https://github.com/crytic/slither/wiki/Upgradeability-Checks) +* `slither-prop`: [Automatic unit test and property generation](https://github.com/crytic/slither/wiki/Property-generation) +* `slither-flat`: [Flatten a codebase](https://github.com/crytic/slither/wiki/Contract-Flattening) +* `slither-check-erc`: [Check the ERC's conformance](https://github.com/crytic/slither/wiki/ERC-Conformance) +* `slither-format`: [Automatic patch generation](https://github.com/crytic/slither/wiki/Slither-format) +* `slither-read-storage`: [Read storage values from contracts](./slither/tools/read_storage/README.md) +* `slither-interface`: [Generate an interface for a contract](./slither/tools/interface/README.md) See the [Tool documentation](https://github.com/crytic/slither/wiki/Tool-Documentation) for additional tools. [Contact us](https://www.trailofbits.com/contact/) to get help on building custom tools. ## API Documentation + Documentation on Slither's internals is available [here](https://crytic.github.io/slither/slither.html). ## Getting Help @@ -227,10 +262,12 @@ Feel free to stop by our [Slack channel](https://empireslacking.herokuapp.com) ( ## FAQ How do I exclude mocks or tests? -- View our documentation on [path filtering](https://github.com/crytic/slither/wiki/Usage#path-filtering). + +* View our documentation on [path filtering](https://github.com/crytic/slither/wiki/Usage#path-filtering). How do I fix "unknown file" or compilation issues? -- Because slither requires the solc AST, it must have all dependencies available. + +* Because slither requires the solc AST, it must have all dependencies available. If a contract has dependencies, `slither contract.sol` will fail. Instead, use `slither .` in the parent directory of `contracts/` (you should see `contracts/` when you run `ls`). If you have a `node_modules/` folder, it must be in the same directory as `contracts/`. To verify that this issue is related to slither, @@ -244,9 +281,11 @@ Slither is licensed and distributed under the AGPLv3 license. [Contact us](mailt ## Publications ### Trail of Bits publication -- [Slither: A Static Analysis Framework For Smart Contracts](https://arxiv.org/abs/1908.09878), Josselin Feist, Gustavo Grieco, Alex Groce - WETSEB '19 + +* [Slither: A Static Analysis Framework For Smart Contracts](https://arxiv.org/abs/1908.09878), Josselin Feist, Gustavo Grieco, Alex Groce - WETSEB '19 ### External publications + Title | Usage | Authors | Venue | Code --- | --- | --- | --- | --- [ReJection: A AST-Based Reentrancy Vulnerability Detection Method](https://www.researchgate.net/publication/339354823_ReJection_A_AST-Based_Reentrancy_Vulnerability_Detection_Method) | AST-based analysis built on top of Slither | Rui Ma, Zefeng Jian, Guangyuan Chen, Ke Ma, Yujia Chen | CTCIS 19 diff --git a/examples/scripts/possible_paths.py b/examples/scripts/possible_paths.py index 06b68c2bc..2057782a4 100644 --- a/examples/scripts/possible_paths.py +++ b/examples/scripts/possible_paths.py @@ -19,7 +19,8 @@ def resolve_function(contract_name, function_name): contract = contracts[0] # Obtain the target function target_function = next( - (function for function in contract.functions if function.name == function_name), None + (function for function in contract.functions_declared if function.name == function_name), + None, ) # Verify we have resolved the function specified. diff --git a/scripts/ci_test_printers.sh b/scripts/ci_test_printers.sh index 61994b337..3306c134e 100755 --- a/scripts/ci_test_printers.sh +++ b/scripts/ci_test_printers.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -### Test printer +### Test 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,human-summary,inheritance,inheritance-graph,slithir,slithir-ssa,vars-and-auth,require,variable-order,declaration" +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 diff --git a/setup.py b/setup.py index 70d4f71fd..332f8fc18 100644 --- a/setup.py +++ b/setup.py @@ -5,18 +5,18 @@ with open("README.md", "r", encoding="utf-8") as f: setup( name="slither-analyzer", - description="Slither is a Solidity static analysis framework written in Python 3.", + description="Slither is a Solidity and Vyper static analysis framework written in Python 3.", url="https://github.com/crytic/slither", author="Trail of Bits", - version="0.9.3", + version="0.10.0", packages=find_packages(), python_requires=">=3.8", install_requires=[ "packaging", "prettytable>=3.3.0", "pycryptodome>=3.4.6", - # "crytic-compile>=0.3.1,<0.4.0", - "crytic-compile@git+https://github.com/crytic/crytic-compile.git@dev#egg=crytic-compile", + "crytic-compile>=0.3.5,<0.4.0", + # "crytic-compile@git+https://github.com/crytic/crytic-compile.git@master#egg=crytic-compile", "web3>=6.0.0", "eth-abi>=4.0.0", "eth-typing>=3.0.0", @@ -36,7 +36,6 @@ setup( "coverage[toml]", "filelock", "pytest-insta", - "solc-select@git+https://github.com/crytic/solc-select.git@query-artifact-path#egg=solc-select", ], "doc": [ "pdoc", diff --git a/slither/__main__.py b/slither/__main__.py index ca61a8269..d1b36d951 100644 --- a/slither/__main__.py +++ b/slither/__main__.py @@ -35,6 +35,7 @@ from slither.utils.output import ( from slither.utils.output_capture import StandardOutputCapture from slither.utils.colors import red, set_colorization_enabled from slither.utils.command_line import ( + FailOnLevel, output_detectors, output_results_to_markdown, output_detectors_json, @@ -78,6 +79,11 @@ def process_single( ast = "--ast-json" slither = Slither(target, ast_format=ast, **vars(args)) + if args.sarif_input: + slither.sarif_input = args.sarif_input + if args.sarif_triage: + slither.sarif_triage = args.sarif_triage + return _process(slither, detector_classes, printer_classes) @@ -206,22 +212,22 @@ def choose_detectors( detectors_to_run = sorted(detectors_to_run, key=lambda x: x.IMPACT) return detectors_to_run - if args.exclude_optimization and not args.fail_pedantic: + if args.exclude_optimization: detectors_to_run = [ d for d in detectors_to_run if d.IMPACT != DetectorClassification.OPTIMIZATION ] - if args.exclude_informational and not args.fail_pedantic: + if args.exclude_informational: detectors_to_run = [ d for d in detectors_to_run if d.IMPACT != DetectorClassification.INFORMATIONAL ] - if args.exclude_low and not args.fail_low: + if args.exclude_low: detectors_to_run = [d for d in detectors_to_run if d.IMPACT != DetectorClassification.LOW] - if args.exclude_medium and not args.fail_medium: + if args.exclude_medium: detectors_to_run = [ d for d in detectors_to_run if d.IMPACT != DetectorClassification.MEDIUM ] - if args.exclude_high and not args.fail_high: + if args.exclude_high: detectors_to_run = [d for d in detectors_to_run if d.IMPACT != DetectorClassification.HIGH] if args.detectors_to_exclude: detectors_to_run = [ @@ -386,41 +392,44 @@ def parse_args( default=defaults_flag_in_config["exclude_high"], ) - group_detector.add_argument( + fail_on_group = group_detector.add_mutually_exclusive_group() + fail_on_group.add_argument( "--fail-pedantic", - help="Return the number of findings in the exit code", - action="store_true", - default=defaults_flag_in_config["fail_pedantic"], - ) - - group_detector.add_argument( - "--no-fail-pedantic", - help="Do not return the number of findings in the exit code. Opposite of --fail-pedantic", - dest="fail_pedantic", - action="store_false", - required=False, + help="Fail if any findings are detected", + action="store_const", + dest="fail_on", + const=FailOnLevel.PEDANTIC, ) - - group_detector.add_argument( + fail_on_group.add_argument( "--fail-low", - help="Fail if low or greater impact finding is detected", - action="store_true", - default=defaults_flag_in_config["fail_low"], + help="Fail if any low or greater impact findings are detected", + action="store_const", + dest="fail_on", + const=FailOnLevel.LOW, ) - - group_detector.add_argument( + fail_on_group.add_argument( "--fail-medium", - help="Fail if medium or greater impact finding is detected", - action="store_true", - default=defaults_flag_in_config["fail_medium"], + help="Fail if any medium or greater impact findings are detected", + action="store_const", + dest="fail_on", + const=FailOnLevel.MEDIUM, ) - - group_detector.add_argument( + fail_on_group.add_argument( "--fail-high", - help="Fail if high impact finding is detected", - action="store_true", - default=defaults_flag_in_config["fail_high"], + help="Fail if any high impact findings are detected", + action="store_const", + dest="fail_on", + const=FailOnLevel.HIGH, + ) + fail_on_group.add_argument( + "--fail-none", + "--no-fail-pedantic", + help="Do not return the number of findings in the exit code", + action="store_const", + dest="fail_on", + const=FailOnLevel.NONE, ) + fail_on_group.set_defaults(fail_on=FailOnLevel.PEDANTIC) group_detector.add_argument( "--show-ignored-findings", @@ -438,7 +447,7 @@ def parse_args( group_checklist.add_argument( "--checklist-limit", - help="Limite the number of results per detector in the markdown file", + help="Limit the number of results per detector in the markdown file", action="store", default="", ) @@ -465,6 +474,20 @@ def parse_args( default=defaults_flag_in_config["sarif"], ) + group_misc.add_argument( + "--sarif-input", + help="Sarif input (beta)", + action="store", + default=defaults_flag_in_config["sarif_input"], + ) + + group_misc.add_argument( + "--sarif-triage", + help="Sarif triage (beta)", + action="store", + default=defaults_flag_in_config["sarif_triage"], + ) + group_misc.add_argument( "--json-types", help="Comma-separated list of result types to output to JSON, defaults to " @@ -866,12 +889,6 @@ def main_impl( logging.error(red(output_error)) logging.error("Please report an issue to https://github.com/crytic/slither/issues") - except Exception: # pylint: disable=broad-except - output_error = traceback.format_exc() - traceback.print_exc() - logging.error(f"Error in {args.filename}") # pylint: disable=logging-fstring-interpolation - logging.error(output_error) - # If we are outputting JSON, capture the redirected output and disable the redirect to output the final JSON. if outputting_json: if "console" in args.json_types: @@ -896,17 +913,18 @@ def main_impl( stats = pstats.Stats(cp).sort_stats("cumtime") stats.print_stats() - if args.fail_high: + fail_on = FailOnLevel(args.fail_on) + if fail_on == FailOnLevel.HIGH: fail_on_detection = any(result["impact"] == "High" for result in results_detectors) - elif args.fail_medium: + elif fail_on == FailOnLevel.MEDIUM: fail_on_detection = any( result["impact"] in ["Medium", "High"] for result in results_detectors ) - elif args.fail_low: + elif fail_on == FailOnLevel.LOW: fail_on_detection = any( result["impact"] in ["Low", "Medium", "High"] for result in results_detectors ) - elif args.fail_pedantic: + elif fail_on == FailOnLevel.PEDANTIC: fail_on_detection = bool(results_detectors) else: fail_on_detection = False diff --git a/slither/analyses/evm/convert.py b/slither/analyses/evm/convert.py index bff308cbc..5e8c4a128 100644 --- a/slither/analyses/evm/convert.py +++ b/slither/analyses/evm/convert.py @@ -186,7 +186,7 @@ def generate_source_to_evm_ins_mapping(evm_instructions, srcmap_runtime, slither if mapping_item[i] == "": mapping_item[i] = int(prev_mapping[i]) - offset, _length, file_id, _ = mapping_item + offset, _length, file_id, *_ = mapping_item prev_mapping = mapping_item if file_id == "-1": diff --git a/slither/core/cfg/node.py b/slither/core/cfg/node.py index 2a48bd235..9b53b0db9 100644 --- a/slither/core/cfg/node.py +++ b/slither/core/cfg/node.py @@ -74,6 +74,7 @@ class NodeType(Enum): IF = "IF" VARIABLE = "NEW VARIABLE" # Variable declaration ASSEMBLY = "INLINE ASM" + ENDASSEMBLY = "END INLINE ASM" IFLOOP = "IF_LOOP" # Nodes where control flow merges @@ -193,6 +194,8 @@ class Node(SourceMapping): # pylint: disable=too-many-public-methods self.file_scope: "FileScope" = file_scope self._function: Optional["Function"] = None + self._is_reachable: bool = False + ################################################################################### ################################################################################### # region General's properties @@ -234,6 +237,13 @@ class Node(SourceMapping): # pylint: disable=too-many-public-methods def function(self) -> "Function": return self._function + @property + def is_reachable(self) -> bool: + return self._is_reachable + + def set_is_reachable(self, new_is_reachable: bool) -> None: + self._is_reachable = new_is_reachable + # endregion ################################################################################### ################################################################################### diff --git a/slither/core/cfg/scope.py b/slither/core/cfg/scope.py index d3ac4e836..3f9959851 100644 --- a/slither/core/cfg/scope.py +++ b/slither/core/cfg/scope.py @@ -7,8 +7,10 @@ if TYPE_CHECKING: # pylint: disable=too-few-public-methods class Scope: - def __init__(self, is_checked: bool, is_yul: bool, scope: Union["Scope", "Function"]) -> None: + def __init__( + self, is_checked: bool, is_yul: bool, parent_scope: Union["Scope", "Function"] + ) -> None: self.nodes: List["Node"] = [] self.is_checked = is_checked self.is_yul = is_yul - self.father = scope + self.father = parent_scope diff --git a/slither/core/compilation_unit.py b/slither/core/compilation_unit.py index 6d24786eb..6221fd8bd 100644 --- a/slither/core/compilation_unit.py +++ b/slither/core/compilation_unit.py @@ -1,4 +1,5 @@ import math +from enum import Enum from typing import Optional, Dict, List, Set, Union, TYPE_CHECKING, Tuple from crytic_compile import CompilationUnit, CryticCompile @@ -15,6 +16,7 @@ from slither.core.declarations import ( ) from slither.core.declarations.custom_error_top_level import CustomErrorTopLevel from slither.core.declarations.enum_top_level import EnumTopLevel +from slither.core.declarations.event_top_level import EventTopLevel from slither.core.declarations.function_top_level import FunctionTopLevel from slither.core.declarations.structure_top_level import StructureTopLevel from slither.core.declarations.using_for_top_level import UsingForTopLevel @@ -29,6 +31,20 @@ if TYPE_CHECKING: from slither.core.slither_core import SlitherCore +class Language(Enum): + SOLIDITY = "solidity" + VYPER = "vyper" + + @staticmethod + def from_str(label: str): + if label == "solc": + return Language.SOLIDITY + if label == "vyper": + return Language.VYPER + + raise ValueError(f"Unknown language: {label}") + + # pylint: disable=too-many-instance-attributes,too-many-public-methods class SlitherCompilationUnit(Context): def __init__(self, core: "SlitherCore", crytic_compilation_unit: CompilationUnit) -> None: @@ -36,18 +52,20 @@ class SlitherCompilationUnit(Context): self._core = core self._crytic_compile_compilation_unit = crytic_compilation_unit + self._language = Language.from_str(crytic_compilation_unit.compiler_version.compiler) # Top level object self.contracts: List[Contract] = [] self._structures_top_level: List[StructureTopLevel] = [] self._enums_top_level: List[EnumTopLevel] = [] + self._events_top_level: List[EventTopLevel] = [] self._variables_top_level: List[TopLevelVariable] = [] self._functions_top_level: List[FunctionTopLevel] = [] self._using_for_top_level: List[UsingForTopLevel] = [] self._pragma_directives: List[Pragma] = [] self._import_directives: List[Import] = [] self._custom_errors: List[CustomErrorTopLevel] = [] - self._user_defined_value_types: Dict[str, TypeAliasTopLevel] = {} + self._type_aliases: Dict[str, TypeAliasTopLevel] = {} self._all_functions: Set[Function] = set() self._all_modifiers: Set[Modifier] = set() @@ -81,6 +99,17 @@ class SlitherCompilationUnit(Context): # region Compiler ################################################################################### ################################################################################### + @property + def language(self) -> Language: + return self._language + + @property + def is_vyper(self) -> bool: + return self._language == Language.VYPER + + @property + def is_solidity(self) -> bool: + return self._language == Language.SOLIDITY @property def compiler_version(self) -> CompilerVersion: @@ -166,6 +195,10 @@ class SlitherCompilationUnit(Context): return self.functions + list(self.modifiers) def propagate_function_calls(self) -> None: + """This info is used to compute the rvalues of Phi operations in `fix_phi` and ultimately + is responsible for the `read` property of Phi operations which is vital to + propagating taints inter-procedurally + """ for f in self.functions_and_modifiers: for node in f.nodes: for ir in node.irs_ssa: @@ -203,6 +236,10 @@ class SlitherCompilationUnit(Context): def enums_top_level(self) -> List[EnumTopLevel]: return self._enums_top_level + @property + def events_top_level(self) -> List[EventTopLevel]: + return self._events_top_level + @property def variables_top_level(self) -> List[TopLevelVariable]: return self._variables_top_level @@ -220,8 +257,8 @@ class SlitherCompilationUnit(Context): return self._custom_errors @property - def user_defined_value_types(self) -> Dict[str, TypeAliasTopLevel]: - return self._user_defined_value_types + def type_aliases(self) -> Dict[str, TypeAliasTopLevel]: + return self._type_aliases # endregion ################################################################################### @@ -259,6 +296,7 @@ class SlitherCompilationUnit(Context): ################################################################################### def compute_storage_layout(self) -> None: + assert self.is_solidity for contract in self.contracts_derived: self._storage_layouts[contract.name] = {} diff --git a/slither/core/declarations/__init__.py b/slither/core/declarations/__init__.py index 92e0b9eca..9d727da8e 100644 --- a/slither/core/declarations/__init__.py +++ b/slither/core/declarations/__init__.py @@ -1,6 +1,8 @@ from .contract import Contract from .enum import Enum from .event import Event +from .event_contract import EventContract +from .event_top_level import EventTopLevel from .function import Function from .import_directive import Import from .modifier import Modifier @@ -18,3 +20,6 @@ from .structure_top_level import StructureTopLevel from .function_contract import FunctionContract from .function_top_level import FunctionTopLevel from .custom_error_contract import CustomErrorContract +from .custom_error_top_level import CustomErrorTopLevel +from .custom_error import CustomError +from .solidity_import_placeholder import SolidityImportPlaceHolder diff --git a/slither/core/declarations/contract.py b/slither/core/declarations/contract.py index fd2cdd468..5403d227a 100644 --- a/slither/core/declarations/contract.py +++ b/slither/core/declarations/contract.py @@ -33,7 +33,7 @@ if TYPE_CHECKING: from slither.utils.type_helpers import LibraryCallType, HighLevelCallType, InternalCallType from slither.core.declarations import ( Enum, - Event, + EventContract, Modifier, EnumContract, StructureContract, @@ -45,6 +45,7 @@ if TYPE_CHECKING: from slither.core.compilation_unit import SlitherCompilationUnit from slither.core.scope.scope import FileScope from slither.core.cfg.node import Node + from slither.core.solidity_types import TypeAliasContract LOGGER = logging.getLogger("Contract") @@ -72,15 +73,18 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods self._enums: Dict[str, "EnumContract"] = {} self._structures: Dict[str, "StructureContract"] = {} - self._events: Dict[str, "Event"] = {} + self._events: Dict[str, "EventContract"] = {} # map accessible variable from name -> variable # do not contain private variables inherited from contract self._variables: Dict[str, "StateVariable"] = {} self._variables_ordered: List["StateVariable"] = [] + # Reference id -> variable declaration (only available for compact AST) + self._state_variables_by_ref_id: Dict[int, "StateVariable"] = {} self._modifiers: Dict[str, "Modifier"] = {} self._functions: Dict[str, "FunctionContract"] = {} self._linearizedBaseContracts: List[int] = [] self._custom_errors: Dict[str, "CustomErrorContract"] = {} + self._type_aliases: Dict[str, "TypeAliasContract"] = {} # The only str is "*" self._using_for: Dict[USING_FOR_KEY, USING_FOR_ITEM] = {} @@ -136,7 +140,7 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods @property def id(self) -> int: """Unique id.""" - assert self._id + assert self._id is not None return self._id @id.setter @@ -274,28 +278,28 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods ################################################################################### @property - def events(self) -> List["Event"]: + def events(self) -> List["EventContract"]: """ list(Event): List of the events """ return list(self._events.values()) @property - def events_inherited(self) -> List["Event"]: + def events_inherited(self) -> List["EventContract"]: """ list(Event): List of the inherited events """ return [e for e in self.events if e.contract != self] @property - def events_declared(self) -> List["Event"]: + def events_declared(self) -> List["EventContract"]: """ list(Event): List of the events declared within the contract (not inherited) """ return [e for e in self.events if e.contract == self] @property - def events_as_dict(self) -> Dict[str, "Event"]: + def events_as_dict(self) -> Dict[str, "EventContract"]: return self._events # endregion @@ -364,12 +368,50 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods def custom_errors_as_dict(self) -> Dict[str, "CustomErrorContract"]: return self._custom_errors + # endregion + ################################################################################### + ################################################################################### + # region Custom Errors + ################################################################################### + ################################################################################### + + @property + def type_aliases(self) -> List["TypeAliasContract"]: + """ + list(TypeAliasContract): List of the contract's custom errors + """ + return list(self._type_aliases.values()) + + @property + def type_aliases_inherited(self) -> List["TypeAliasContract"]: + """ + list(TypeAliasContract): List of the inherited custom errors + """ + return [s for s in self.type_aliases if s.contract != self] + + @property + def type_aliases_declared(self) -> List["TypeAliasContract"]: + """ + list(TypeAliasContract): List of the custom errors declared within the contract (not inherited) + """ + return [s for s in self.type_aliases if s.contract == self] + + @property + def type_aliases_as_dict(self) -> Dict[str, "TypeAliasContract"]: + return self._type_aliases + # endregion ################################################################################### ################################################################################### # region Variables ################################################################################### ################################################################################### + @property + def state_variables_by_ref_id(self) -> Dict[int, "StateVariable"]: + """ + Returns the state variables by reference id (only available for compact AST). + """ + return self._state_variables_by_ref_id @property def variables(self) -> List["StateVariable"]: @@ -861,7 +903,7 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods Returns: StateVariable """ - return next((v for v in self.state_variables if v.name == canonical_name), None) + return next((v for v in self.state_variables if v.canonical_name == canonical_name), None) def get_structure_from_name(self, structure_name: str) -> Optional["StructureContract"]: """ diff --git a/slither/core/declarations/custom_error_contract.py b/slither/core/declarations/custom_error_contract.py index cd279a3a6..2c8bec9ef 100644 --- a/slither/core/declarations/custom_error_contract.py +++ b/slither/core/declarations/custom_error_contract.py @@ -16,3 +16,7 @@ class CustomErrorContract(CustomError, ContractLevel): :return: """ return self.contract == contract + + @property + def canonical_name(self) -> str: + return self.contract.name + "." + self.full_name diff --git a/slither/core/declarations/custom_error_top_level.py b/slither/core/declarations/custom_error_top_level.py index 64a6a8535..b80356b24 100644 --- a/slither/core/declarations/custom_error_top_level.py +++ b/slither/core/declarations/custom_error_top_level.py @@ -12,3 +12,7 @@ class CustomErrorTopLevel(CustomError, TopLevel): def __init__(self, compilation_unit: "SlitherCompilationUnit", scope: "FileScope") -> None: super().__init__(compilation_unit) self.file_scope: "FileScope" = scope + + @property + def canonical_name(self) -> str: + return self.full_name diff --git a/slither/core/declarations/event.py b/slither/core/declarations/event.py index 9d42ac224..7149e20c0 100644 --- a/slither/core/declarations/event.py +++ b/slither/core/declarations/event.py @@ -1,14 +1,10 @@ -from typing import List, Tuple, TYPE_CHECKING +from typing import List, Tuple -from slither.core.declarations.contract_level import ContractLevel from slither.core.source_mapping.source_mapping import SourceMapping from slither.core.variables.event_variable import EventVariable -if TYPE_CHECKING: - from slither.core.declarations import Contract - -class Event(ContractLevel, SourceMapping): +class Event(SourceMapping): def __init__(self) -> None: super().__init__() self._name = None @@ -39,25 +35,9 @@ class Event(ContractLevel, SourceMapping): name, parameters = self.signature return name + "(" + ",".join(parameters) + ")" - @property - def canonical_name(self) -> str: - """Return the function signature as a str - Returns: - str: contract.func_name(type1,type2) - """ - return self.contract.name + self.full_name - @property def elems(self) -> List["EventVariable"]: return self._elems - def is_declared_by(self, contract: "Contract") -> bool: - """ - Check if the element is declared by the contract - :param contract: - :return: - """ - return self.contract == contract - def __str__(self) -> str: return self.name diff --git a/slither/core/declarations/event_contract.py b/slither/core/declarations/event_contract.py new file mode 100644 index 000000000..652f8ca20 --- /dev/null +++ b/slither/core/declarations/event_contract.py @@ -0,0 +1,25 @@ +from typing import TYPE_CHECKING + +from slither.core.declarations.contract_level import ContractLevel +from slither.core.declarations import Event + +if TYPE_CHECKING: + from slither.core.declarations import Contract + + +class EventContract(Event, ContractLevel): + def is_declared_by(self, contract: "Contract") -> bool: + """ + Check if the element is declared by the contract + :param contract: + :return: + """ + return self.contract == contract + + @property + def canonical_name(self) -> str: + """Return the function signature as a str + Returns: + str: contract.func_name(type1,type2) + """ + return self.contract.name + "." + self.full_name diff --git a/slither/core/declarations/event_top_level.py b/slither/core/declarations/event_top_level.py new file mode 100644 index 000000000..5f9f1774d --- /dev/null +++ b/slither/core/declarations/event_top_level.py @@ -0,0 +1,13 @@ +from typing import TYPE_CHECKING + +from slither.core.declarations import Event +from slither.core.declarations.top_level import TopLevel + +if TYPE_CHECKING: + from slither.core.scope.scope import FileScope + + +class EventTopLevel(Event, TopLevel): + def __init__(self, scope: "FileScope") -> None: + super().__init__() + self.file_scope: "FileScope" = scope diff --git a/slither/core/declarations/function.py b/slither/core/declarations/function.py index e77801961..d2baaf7e7 100644 --- a/slither/core/declarations/function.py +++ b/slither/core/declarations/function.py @@ -137,6 +137,8 @@ class Function(SourceMapping, metaclass=ABCMeta): # pylint: disable=too-many-pu self._parameters: List["LocalVariable"] = [] self._parameters_ssa: List["LocalIRVariable"] = [] self._parameters_src: SourceMapping = SourceMapping() + # This is used for vyper calls with default arguments + self._default_args_as_expressions: List["Expression"] = [] self._returns: List["LocalVariable"] = [] self._returns_ssa: List["LocalIRVariable"] = [] self._returns_src: SourceMapping = SourceMapping() @@ -217,8 +219,9 @@ class Function(SourceMapping, metaclass=ABCMeta): # pylint: disable=too-many-pu self.compilation_unit: "SlitherCompilationUnit" = compilation_unit - # Assume we are analyzing Solidity by default - self.function_language: FunctionLanguage = FunctionLanguage.Solidity + self.function_language: FunctionLanguage = ( + FunctionLanguage.Solidity if compilation_unit.is_solidity else FunctionLanguage.Vyper + ) self._id: Optional[str] = None @@ -238,7 +241,7 @@ class Function(SourceMapping, metaclass=ABCMeta): # pylint: disable=too-many-pu """ if self._name == "" and self._function_type == FunctionType.CONSTRUCTOR: return "constructor" - if self._function_type == FunctionType.FALLBACK: + if self._name == "" and self._function_type == FunctionType.FALLBACK: return "fallback" if self._function_type == FunctionType.RECEIVE: return "receive" @@ -985,14 +988,15 @@ class Function(SourceMapping, metaclass=ABCMeta): # pylint: disable=too-many-pu (str, list(str), list(str)): Function signature as (name, list parameters type, list return values type) """ - if self._signature is None: - signature = ( - self.name, - [str(x.type) for x in self.parameters], - [str(x.type) for x in self.returns], - ) - self._signature = signature - return self._signature + # FIXME memoizing this function is not working properly for vyper + # if self._signature is None: + return ( + self.name, + [str(x.type) for x in self.parameters], + [str(x.type) for x in self.returns], + ) + # self._signature = signature + # return self._signature @property def signature_str(self) -> str: @@ -1496,8 +1500,13 @@ class Function(SourceMapping, metaclass=ABCMeta): # pylint: disable=too-many-pu """ Determine if the function can be re-entered """ + reentrancy_modifier = "nonReentrant" + + if self.function_language == FunctionLanguage.Vyper: + reentrancy_modifier = "nonreentrant(lock)" + # TODO: compare with hash of known nonReentrant modifier instead of the name - if "nonReentrant" in [m.name for m in self.modifiers]: + if reentrancy_modifier in [m.name for m in self.modifiers]: return False if self.visibility in ["public", "external"]: @@ -1509,7 +1518,9 @@ class Function(SourceMapping, metaclass=ABCMeta): # pylint: disable=too-many-pu ] if not all_entry_points: return True - return not all(("nonReentrant" in [m.name for m in f.modifiers] for f in all_entry_points)) + return not all( + (reentrancy_modifier in [m.name for m in f.modifiers] for f in all_entry_points) + ) # endregion ################################################################################### @@ -1756,6 +1767,7 @@ class Function(SourceMapping, metaclass=ABCMeta): # pylint: disable=too-many-pu node.irs_ssa = [ir for ir in node.irs_ssa if not self._unchange_phi(ir)] def generate_slithir_and_analyze(self) -> None: + for node in self.nodes: node.slithir_generation() diff --git a/slither/core/declarations/solidity_variables.py b/slither/core/declarations/solidity_variables.py index 552cf9e7f..7c81266bf 100644 --- a/slither/core/declarations/solidity_variables.py +++ b/slither/core/declarations/solidity_variables.py @@ -10,21 +10,25 @@ from slither.exceptions import SlitherException SOLIDITY_VARIABLES = { "now": "uint256", "this": "address", + "self": "address", "abi": "address", # to simplify the conversion, assume that abi return an address "msg": "", "tx": "", "block": "", "super": "", + "chain": "", + "ZERO_ADDRESS": "address", } SOLIDITY_VARIABLES_COMPOSED = { "block.basefee": "uint", "block.coinbase": "address", "block.difficulty": "uint256", + "block.prevrandao": "uint256", "block.gaslimit": "uint256", "block.number": "uint256", "block.timestamp": "uint256", - "block.blockhash": "uint256", # alias for blockhash. It's a call + "block.blockhash": "bytes32", # alias for blockhash. It's a call "block.chainid": "uint256", "msg.data": "bytes", "msg.gas": "uint256", @@ -33,6 +37,10 @@ SOLIDITY_VARIABLES_COMPOSED = { "msg.value": "uint256", "tx.gasprice": "uint256", "tx.origin": "address", + # Vyper + "chain.id": "uint256", + "block.prevhash": "bytes32", + "self.balance": "uint256", } SOLIDITY_FUNCTIONS: Dict[str, List[str]] = { @@ -60,6 +68,7 @@ SOLIDITY_FUNCTIONS: Dict[str, List[str]] = { "log2(bytes32,bytes32,bytes32)": [], "log3(bytes32,bytes32,bytes32,bytes32)": [], "blockhash(uint256)": ["bytes32"], + "prevrandao()": ["uint256"], # the following need a special handling # as they are recognized as a SolidityVariableComposed # and converted to a SolidityFunction by SlithIR @@ -79,6 +88,32 @@ SOLIDITY_FUNCTIONS: Dict[str, List[str]] = { "balance(address)": ["uint256"], "code(address)": ["bytes"], "codehash(address)": ["bytes32"], + # Vyper + "create_from_blueprint()": [], + "create_minimal_proxy_to()": [], + "empty()": [], + "convert()": [], + "len()": ["uint256"], + "method_id()": [], + "unsafe_sub()": [], + "unsafe_add()": [], + "unsafe_div()": [], + "unsafe_mul()": [], + "pow_mod256()": [], + "max_value()": [], + "min_value()": [], + "concat()": [], + "ecrecover()": [], + "isqrt()": [], + "range()": [], + "min()": [], + "max()": [], + "shift()": [], + "abs()": [], + "raw_call()": ["bool", "bytes32"], + "_abi_encode()": [], + "slice()": [], + "uint2str()": ["string"], } diff --git a/slither/core/dominators/utils.py b/slither/core/dominators/utils.py index 4dd55749d..150c0c50e 100644 --- a/slither/core/dominators/utils.py +++ b/slither/core/dominators/utils.py @@ -9,9 +9,20 @@ if TYPE_CHECKING: def intersection_predecessor(node: "Node") -> Set["Node"]: if not node.fathers: return set() + ret = node.fathers[0].dominators for pred in node.fathers[1:]: ret = ret.intersection(pred.dominators) + if not any(father.is_reachable for father in node.fathers): + return set() + + ret = set() + for pred in node.fathers: + ret = ret.union(pred.dominators) + + for pred in node.fathers: + if pred.is_reachable: + ret = ret.intersection(pred.dominators) return ret @@ -84,6 +95,8 @@ def compute_dominance_frontier(nodes: List["Node"]) -> None: for node in nodes: if len(node.fathers) >= 2: for father in node.fathers: + if not father.is_reachable: + continue runner = father # Corner case: if there is a if without else # we need to add update the conditional node diff --git a/slither/core/expressions/__init__.py b/slither/core/expressions/__init__.py index 42554bf0b..b162481ba 100644 --- a/slither/core/expressions/__init__.py +++ b/slither/core/expressions/__init__.py @@ -12,6 +12,7 @@ from .new_contract import NewContract from .new_elementary_type import NewElementaryType from .super_call_expression import SuperCallExpression from .super_identifier import SuperIdentifier +from .self_identifier import SelfIdentifier from .tuple_expression import TupleExpression from .type_conversion import TypeConversion from .unary_operation import UnaryOperation, UnaryOperationType diff --git a/slither/core/expressions/binary_operation.py b/slither/core/expressions/binary_operation.py index a395d07cf..271975e77 100644 --- a/slither/core/expressions/binary_operation.py +++ b/slither/core/expressions/binary_operation.py @@ -42,7 +42,7 @@ class BinaryOperationType(Enum): # pylint: disable=too-many-branches @staticmethod def get_type( - operation_type: "BinaryOperation", + operation_type: "str", ) -> "BinaryOperationType": if operation_type == "**": return BinaryOperationType.POWER diff --git a/slither/core/expressions/call_expression.py b/slither/core/expressions/call_expression.py index 6708dda7e..ec2b2cfce 100644 --- a/slither/core/expressions/call_expression.py +++ b/slither/core/expressions/call_expression.py @@ -4,12 +4,32 @@ from slither.core.expressions.expression import Expression class CallExpression(Expression): # pylint: disable=too-many-instance-attributes - def __init__(self, called: Expression, arguments: List[Any], type_call: str) -> None: + def __init__( + self, + called: Expression, + arguments: List[Any], + type_call: str, + names: Optional[List[str]] = None, + ) -> None: + """ + #### Parameters + called - + The expression denoting the function to be called + arguments - + List of argument expressions + type_call - + A string formatting of the called function's return type + names - + For calls with named fields, list fields in call order. + For calls without named fields, None. + """ assert isinstance(called, Expression) + assert (names is None) or isinstance(names, list) super().__init__() self._called: Expression = called self._arguments: List[Expression] = arguments self._type_call: str = type_call + self._names: Optional[List[str]] = names # gas and value are only available if the syntax is {gas: , value: } # For the .gas().value(), the member are considered as function call # And converted later to the correct info (convert.py) @@ -17,6 +37,14 @@ class CallExpression(Expression): # pylint: disable=too-many-instance-attribute self._value: Optional[Expression] = None self._salt: Optional[Expression] = None + @property + def names(self) -> Optional[List[str]]: + """ + For calls with named fields, list fields in call order. + For calls without named fields, None. + """ + return self._names + @property def call_value(self) -> Optional[Expression]: return self._value @@ -62,4 +90,9 @@ class CallExpression(Expression): # pylint: disable=too-many-instance-attribute if gas or value or salt: options = [gas, value, salt] txt += "{" + ",".join([o for o in options if o != ""]) + "}" - return txt + "(" + ",".join([str(a) for a in self._arguments]) + ")" + args = ( + "{" + ",".join([f"{n}:{str(a)}" for (a, n) in zip(self._arguments, self._names)]) + "}" + if self._names is not None + else ",".join([str(a) for a in self._arguments]) + ) + return txt + "(" + args + ")" diff --git a/slither/core/expressions/identifier.py b/slither/core/expressions/identifier.py index 8ffabad89..5cd29a9f5 100644 --- a/slither/core/expressions/identifier.py +++ b/slither/core/expressions/identifier.py @@ -26,7 +26,6 @@ class Identifier(Expression): ], ) -> None: super().__init__() - # pylint: disable=import-outside-toplevel from slither.core.declarations import Contract, SolidityVariable, SolidityFunction from slither.solc_parsing.yul.evm_functions import YulBuiltin diff --git a/slither/core/expressions/self_identifier.py b/slither/core/expressions/self_identifier.py new file mode 100644 index 000000000..b86d70baf --- /dev/null +++ b/slither/core/expressions/self_identifier.py @@ -0,0 +1,6 @@ +from slither.core.expressions.identifier import Identifier + + +class SelfIdentifier(Identifier): + def __str__(self): + return "self." + str(self._value) diff --git a/slither/core/expressions/unary_operation.py b/slither/core/expressions/unary_operation.py index 657224927..405132613 100644 --- a/slither/core/expressions/unary_operation.py +++ b/slither/core/expressions/unary_operation.py @@ -106,8 +106,6 @@ class UnaryOperation(Expression): UnaryOperationType.MINUSMINUS_PRE, UnaryOperationType.PLUSPLUS_POST, UnaryOperationType.MINUSMINUS_POST, - UnaryOperationType.PLUS_PRE, - UnaryOperationType.MINUS_PRE, ]: expression.set_lvalue() diff --git a/slither/core/scope/scope.py b/slither/core/scope/scope.py index cafeb3585..784b17cb2 100644 --- a/slither/core/scope/scope.py +++ b/slither/core/scope/scope.py @@ -7,6 +7,7 @@ from crytic_compile.utils.naming import Filename from slither.core.declarations import Contract, Import, Pragma from slither.core.declarations.custom_error_top_level import CustomErrorTopLevel from slither.core.declarations.enum_top_level import EnumTopLevel +from slither.core.declarations.event_top_level import EventTopLevel from slither.core.declarations.function_top_level import FunctionTopLevel from slither.core.declarations.using_for_top_level import UsingForTopLevel from slither.core.declarations.structure_top_level import StructureTopLevel @@ -35,6 +36,7 @@ class FileScope: # So we simplify the logic and have the scope fields all populated self.custom_errors: Set[CustomErrorTopLevel] = set() self.enums: Dict[str, EnumTopLevel] = {} + self.events: Dict[str, EventTopLevel] = {} # Functions is a list instead of a dict # Because we parse the function signature later on # So we simplify the logic and have the scope fields all populated @@ -52,9 +54,9 @@ class FileScope: # User defined types # Name -> type alias - self.user_defined_types: Dict[str, TypeAlias] = {} + self.type_aliases: Dict[str, TypeAlias] = {} - def add_accesible_scopes(self) -> bool: + def add_accesible_scopes(self) -> bool: # pylint: disable=too-many-branches """ Add information from accessible scopes. Return true if new information was obtained @@ -74,6 +76,9 @@ class FileScope: if not _dict_contain(new_scope.enums, self.enums): self.enums.update(new_scope.enums) learn_something = True + if not _dict_contain(new_scope.events, self.events): + self.events.update(new_scope.events) + learn_something = True if not new_scope.functions.issubset(self.functions): self.functions |= new_scope.functions learn_something = True @@ -95,8 +100,8 @@ class FileScope: if not _dict_contain(new_scope.renaming, self.renaming): self.renaming.update(new_scope.renaming) learn_something = True - if not _dict_contain(new_scope.user_defined_types, self.user_defined_types): - self.user_defined_types.update(new_scope.user_defined_types) + if not _dict_contain(new_scope.type_aliases, self.type_aliases): + self.type_aliases.update(new_scope.type_aliases) learn_something = True return learn_something diff --git a/slither/core/slither_core.py b/slither/core/slither_core.py index 798008707..b1bb7c66b 100644 --- a/slither/core/slither_core.py +++ b/slither/core/slither_core.py @@ -21,6 +21,7 @@ from slither.core.declarations.top_level import TopLevel from slither.core.source_mapping.source_mapping import SourceMapping, Source from slither.slithir.variables import Constant from slither.utils.colors import red +from slither.utils.sarif import read_triage_info from slither.utils.source_mapping import get_definition, get_references, get_implementation logger = logging.getLogger("Slither") @@ -48,6 +49,10 @@ class SlitherCore(Context): self._source_code_to_line: Optional[Dict[str, List[str]]] = None self._previous_results_filename: str = "slither.db.json" + + # TODO: add cli flag to set these variables + self.sarif_input: str = "export.sarif" + self.sarif_triage: str = "export.sarif.sarifexplorer" self._results_to_hide: List = [] self._previous_results: List = [] # From triaged result @@ -96,6 +101,8 @@ class SlitherCore(Context): # If true, partial analysis is allowed self.no_fail = False + self.skip_data_dependency = False + @property def compilation_units(self) -> List[SlitherCompilationUnit]: return list(self._compilation_units) @@ -262,6 +269,8 @@ class SlitherCore(Context): self._compute_offsets_from_thing(event) for enum in compilation_unit.enums_top_level: self._compute_offsets_from_thing(enum) + for event in compilation_unit.events_top_level: + self._compute_offsets_from_thing(event) for function in compilation_unit.functions_top_level: self._compute_offsets_from_thing(function) for st in compilation_unit.structures_top_level: @@ -444,6 +453,8 @@ class SlitherCore(Context): return True def load_previous_results(self) -> None: + self.load_previous_results_from_sarif() + filename = self._previous_results_filename try: if os.path.isfile(filename): @@ -453,9 +464,24 @@ class SlitherCore(Context): for r in self._previous_results: if "id" in r: self._previous_results_ids.add(r["id"]) + except json.decoder.JSONDecodeError: logger.error(red(f"Impossible to decode {filename}. Consider removing the file")) + def load_previous_results_from_sarif(self) -> None: + sarif = pathlib.Path(self.sarif_input) + triage = pathlib.Path(self.sarif_triage) + + if not sarif.exists(): + return + if not triage.exists(): + return + + triaged = read_triage_info(sarif, triage) + + for id_triaged in triaged: + self._previous_results_ids.add(id_triaged) + def write_results_to_hide(self) -> None: if not self._results_to_hide: return diff --git a/slither/core/solidity_types/type_alias.py b/slither/core/solidity_types/type_alias.py index 9387f511a..ead9b5394 100644 --- a/slither/core/solidity_types/type_alias.py +++ b/slither/core/solidity_types/type_alias.py @@ -1,10 +1,11 @@ -from typing import TYPE_CHECKING, Tuple +from typing import TYPE_CHECKING, Tuple, Dict from slither.core.declarations.top_level import TopLevel from slither.core.declarations.contract_level import ContractLevel from slither.core.solidity_types import Type, ElementaryType if TYPE_CHECKING: + from slither.core.declarations.function_top_level import FunctionTopLevel from slither.core.declarations import Contract from slither.core.scope.scope import FileScope @@ -43,6 +44,8 @@ class TypeAliasTopLevel(TypeAlias, TopLevel): def __init__(self, underlying_type: ElementaryType, name: str, scope: "FileScope") -> None: super().__init__(underlying_type, name) self.file_scope: "FileScope" = scope + # operators redefined + self.operators: Dict[str, "FunctionTopLevel"] = {} def __str__(self) -> str: return self.name diff --git a/slither/core/variables/__init__.py b/slither/core/variables/__init__.py index 638f0f3a4..53872853a 100644 --- a/slither/core/variables/__init__.py +++ b/slither/core/variables/__init__.py @@ -1,2 +1,8 @@ from .state_variable import StateVariable from .variable import Variable +from .local_variable_init_from_tuple import LocalVariableInitFromTuple +from .local_variable import LocalVariable +from .top_level_variable import TopLevelVariable +from .event_variable import EventVariable +from .function_type_variable import FunctionTypeVariable +from .structure_variable import StructureVariable diff --git a/slither/core/variables/local_variable.py b/slither/core/variables/local_variable.py index 427f00408..9baf80445 100644 --- a/slither/core/variables/local_variable.py +++ b/slither/core/variables/local_variable.py @@ -2,7 +2,6 @@ from typing import Optional, TYPE_CHECKING from slither.core.variables.variable import Variable from slither.core.solidity_types.user_defined_type import UserDefinedType -from slither.core.solidity_types.array_type import ArrayType from slither.core.solidity_types.mapping_type import MappingType from slither.core.solidity_types.elementary_type import ElementaryType @@ -51,6 +50,9 @@ class LocalVariable(Variable): Returns: (bool) """ + # pylint: disable=import-outside-toplevel + from slither.core.solidity_types.array_type import ArrayType + if self.location == "memory": return False if self.location == "calldata": diff --git a/slither/core/variables/variable.py b/slither/core/variables/variable.py index 2b777e672..f9ef19024 100644 --- a/slither/core/variables/variable.py +++ b/slither/core/variables/variable.py @@ -179,5 +179,6 @@ class Variable(SourceMapping): return f'{name}({",".join(parameters)})' def __str__(self) -> str: - assert self._name + if self._name is None: + return "" return self._name diff --git a/slither/detectors/abstract_detector.py b/slither/detectors/abstract_detector.py index 7bb8eb93f..8baf9bb3c 100644 --- a/slither/detectors/abstract_detector.py +++ b/slither/detectors/abstract_detector.py @@ -3,7 +3,7 @@ import re from logging import Logger from typing import Optional, List, TYPE_CHECKING, Dict, Union, Callable -from slither.core.compilation_unit import SlitherCompilationUnit +from slither.core.compilation_unit import SlitherCompilationUnit, Language from slither.core.declarations import Contract from slither.formatters.exceptions import FormatImpossible from slither.formatters.utils.patches import apply_patch, create_diff @@ -80,6 +80,9 @@ class AbstractDetector(metaclass=abc.ABCMeta): # list of vulnerable solc versions as strings (e.g. ["0.4.25", "0.5.0"]) # If the detector is meant to run on all versions, use None VULNERABLE_SOLC_VERSIONS: Optional[List[str]] = None + # If the detector is meant to run on all languages, use None + # Otherwise, use `solidity` or `vyper` + LANGUAGE: Optional[str] = None def __init__( self, compilation_unit: SlitherCompilationUnit, slither: "Slither", logger: Logger @@ -133,6 +136,14 @@ class AbstractDetector(metaclass=abc.ABCMeta): f"VULNERABLE_SOLC_VERSIONS should not be an empty list {self.__class__.__name__}" ) + if self.LANGUAGE is not None and self.LANGUAGE not in [ + Language.SOLIDITY.value, + Language.VYPER.value, + ]: + raise IncorrectDetectorInitialization( + f"LANGUAGE should not be either 'solidity' or 'vyper' {self.__class__.__name__}" + ) + if re.match("^[a-zA-Z0-9_-]*$", self.ARGUMENT) is None: raise IncorrectDetectorInitialization( f"ARGUMENT has illegal character {self.__class__.__name__}" @@ -164,9 +175,14 @@ class AbstractDetector(metaclass=abc.ABCMeta): if self.logger: self.logger.info(self.color(info)) - def _uses_vulnerable_solc_version(self) -> bool: + def _is_applicable_detector(self) -> bool: if self.VULNERABLE_SOLC_VERSIONS: - return self.compilation_unit.solc_version in self.VULNERABLE_SOLC_VERSIONS + return ( + self.compilation_unit.is_solidity + and self.compilation_unit.solc_version in self.VULNERABLE_SOLC_VERSIONS + ) + if self.LANGUAGE: + return self.compilation_unit.language.value == self.LANGUAGE return True @abc.abstractmethod @@ -179,7 +195,7 @@ class AbstractDetector(metaclass=abc.ABCMeta): results: List[Dict] = [] # check solc version - if not self._uses_vulnerable_solc_version(): + if not self._is_applicable_detector(): return results # only keep valid result, and remove duplicate diff --git a/slither/detectors/all_detectors.py b/slither/detectors/all_detectors.py index f7f1efaa5..fab9562d2 100644 --- a/slither/detectors/all_detectors.py +++ b/slither/detectors/all_detectors.py @@ -89,5 +89,11 @@ from .functions.protected_variable import ProtectedVariables from .functions.permit_domain_signature_collision import DomainSeparatorCollision from .functions.codex import Codex from .functions.cyclomatic_complexity import CyclomaticComplexity +from .operations.cache_array_length import CacheArrayLength from .statements.incorrect_using_for import IncorrectUsingFor from .operations.encode_packed import EncodePackedCollision +from .assembly.incorrect_return import IncorrectReturn +from .assembly.return_instead_of_leave import ReturnInsteadOfLeave +from .operations.incorrect_exp import IncorrectOperatorExponentiation +from .statements.tautological_compare import TautologicalCompare +from .statements.return_bomb import ReturnBomb diff --git a/slither/detectors/assembly/incorrect_return.py b/slither/detectors/assembly/incorrect_return.py new file mode 100644 index 000000000..bd5a6d844 --- /dev/null +++ b/slither/detectors/assembly/incorrect_return.py @@ -0,0 +1,93 @@ +from typing import List, Optional + +from slither.core.declarations import SolidityFunction, Function +from slither.detectors.abstract_detector import ( + AbstractDetector, + DetectorClassification, + DETECTOR_INFO, +) +from slither.slithir.operations import SolidityCall +from slither.utils.output import Output + + +def _assembly_node(function: Function) -> Optional[SolidityCall]: + """ + Check if there is a node that use return in assembly + + Args: + function: + + Returns: + + """ + + for ir in function.all_slithir_operations(): + if isinstance(ir, SolidityCall) and ir.function == SolidityFunction( + "return(uint256,uint256)" + ): + return ir + return None + + +class IncorrectReturn(AbstractDetector): + """ + Check for cases where a return(a,b) is used in an assembly function + """ + + ARGUMENT = "incorrect-return" + HELP = "If a `return` is incorrectly used in assembly mode." + IMPACT = DetectorClassification.HIGH + CONFIDENCE = DetectorClassification.MEDIUM + + WIKI = ( + "https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-return-in-assembly" + ) + + WIKI_TITLE = "Incorrect return in assembly" + WIKI_DESCRIPTION = "Detect if `return` in an assembly block halts unexpectedly the execution." + WIKI_EXPLOIT_SCENARIO = """ +```solidity +contract C { + function f() internal returns (uint a, uint b) { + assembly { + return (5, 6) + } + } + + function g() returns (bool){ + f(); + return true; + } +} +``` +The return statement in `f` will cause execution in `g` to halt. +The function will return 6 bytes starting from offset 5, instead of returning a boolean.""" + + WIKI_RECOMMENDATION = "Use the `leave` statement." + + # pylint: disable=too-many-nested-blocks + def _detect(self) -> List[Output]: + results: List[Output] = [] + for c in self.contracts: + for f in c.functions_and_modifiers_declared: + + for node in f.nodes: + if node.sons: + for function_called in node.internal_calls: + if isinstance(function_called, Function): + found = _assembly_node(function_called) + if found: + + info: DETECTOR_INFO = [ + f, + " calls ", + function_called, + " which halt the execution ", + found.node, + "\n", + ] + json = self.generate_result(info) + + results.append(json) + + return results diff --git a/slither/detectors/assembly/return_instead_of_leave.py b/slither/detectors/assembly/return_instead_of_leave.py new file mode 100644 index 000000000..a1ad9c87e --- /dev/null +++ b/slither/detectors/assembly/return_instead_of_leave.py @@ -0,0 +1,68 @@ +from typing import List + +from slither.core.declarations import SolidityFunction, Function +from slither.detectors.abstract_detector import ( + AbstractDetector, + DetectorClassification, + DETECTOR_INFO, +) +from slither.slithir.operations import SolidityCall +from slither.utils.output import Output + + +class ReturnInsteadOfLeave(AbstractDetector): + """ + Check for cases where a return(a,b) is used in an assembly function that also returns two variables + """ + + ARGUMENT = "return-leave" + HELP = "If a `return` is used instead of a `leave`." + IMPACT = DetectorClassification.HIGH + CONFIDENCE = DetectorClassification.MEDIUM + + WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#return-instead-of-leave-in-assembly" + + WIKI_TITLE = "Return instead of leave in assembly" + WIKI_DESCRIPTION = "Detect if a `return` is used where a `leave` should be used." + WIKI_EXPLOIT_SCENARIO = """ +```solidity +contract C { + function f() internal returns (uint a, uint b) { + assembly { + return (5, 6) + } + } + +} +``` +The function will halt the execution, instead of returning a two uint.""" + + WIKI_RECOMMENDATION = "Use the `leave` statement." + + def _check_function(self, f: Function) -> List[Output]: + results: List[Output] = [] + + for node in f.nodes: + for ir in node.irs: + if isinstance(ir, SolidityCall) and ir.function == SolidityFunction( + "return(uint256,uint256)" + ): + info: DETECTOR_INFO = [f, " contains an incorrect call to return: ", node, "\n"] + json = self.generate_result(info) + + results.append(json) + return results + + def _detect(self) -> List[Output]: + results: List[Output] = [] + for c in self.contracts: + for f in c.functions_declared: + + if ( + len(f.returns) == 2 + and f.contains_assembly + and f.visibility not in ["public", "external"] + ): + results += self._check_function(f) + + return results diff --git a/slither/detectors/attributes/incorrect_solc.py b/slither/detectors/attributes/incorrect_solc.py index eaf40bf21..ad38b1784 100644 --- a/slither/detectors/attributes/incorrect_solc.py +++ b/slither/detectors/attributes/incorrect_solc.py @@ -33,7 +33,7 @@ class IncorrectSolc(AbstractDetector): HELP = "Incorrect Solidity version" IMPACT = DetectorClassification.INFORMATIONAL CONFIDENCE = DetectorClassification.HIGH - + LANGUAGE = "solidity" WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity" WIKI_TITLE = "Incorrect versions of Solidity" diff --git a/slither/detectors/attributes/locked_ether.py b/slither/detectors/attributes/locked_ether.py index a6f882922..91ec68650 100644 --- a/slither/detectors/attributes/locked_ether.py +++ b/slither/detectors/attributes/locked_ether.py @@ -3,7 +3,7 @@ """ from typing import List -from slither.core.declarations.contract import Contract +from slither.core.declarations import Contract, SolidityFunction from slither.detectors.abstract_detector import ( AbstractDetector, DetectorClassification, @@ -17,7 +17,9 @@ from slither.slithir.operations import ( NewContract, LibraryCall, InternalCall, + SolidityCall, ) +from slither.slithir.variables import Constant from slither.utils.output import Output @@ -68,8 +70,28 @@ Every Ether sent to `Locked` will be lost.""" ): if ir.call_value and ir.call_value != 0: return False - if isinstance(ir, (LowLevelCall)): - if ir.function_name in ["delegatecall", "callcode"]: + if isinstance(ir, (LowLevelCall)) and ir.function_name in [ + "delegatecall", + "callcode", + ]: + return False + if isinstance(ir, SolidityCall): + call_can_send_ether = ir.function in [ + SolidityFunction( + "delegatecall(uint256,uint256,uint256,uint256,uint256,uint256)" + ), + SolidityFunction( + "callcode(uint256,uint256,uint256,uint256,uint256,uint256,uint256)" + ), + SolidityFunction( + "call(uint256,uint256,uint256,uint256,uint256,uint256,uint256)" + ), + ] + nonzero_call_value = call_can_send_ether and ( + not isinstance(ir.arguments[2], Constant) + or ir.arguments[2].value != 0 + ) + if nonzero_call_value: return False # If a new internal call or librarycall # Add it to the list to explore diff --git a/slither/detectors/compiler_bugs/array_by_reference.py b/slither/detectors/compiler_bugs/array_by_reference.py index 04dfe085a..47e2af581 100644 --- a/slither/detectors/compiler_bugs/array_by_reference.py +++ b/slither/detectors/compiler_bugs/array_by_reference.py @@ -133,7 +133,7 @@ As a result, Bob's usage of the contract is incorrect.""" continue # Verify one of these parameters is an array in storage. - for arg in ir.arguments: + for (param, arg) in zip(ir.function.parameters, ir.arguments): # Verify this argument is a variable that is an array type. if not isinstance(arg, (StateVariable, LocalVariable)): continue @@ -141,8 +141,11 @@ As a result, Bob's usage of the contract is incorrect.""" continue # If it is a state variable OR a local variable referencing storage, we add it to the list. - if isinstance(arg, StateVariable) or ( - isinstance(arg, LocalVariable) and arg.location == "storage" + if ( + isinstance(arg, StateVariable) + or (isinstance(arg, LocalVariable) and arg.location == "storage") + ) and ( + isinstance(param.type, ArrayType) and param.location != "storage" ): results.append((node, arg, ir.function)) return results @@ -165,9 +168,9 @@ As a result, Bob's usage of the contract is incorrect.""" calling_node.function, " passes array ", affected_argument, - "by reference to ", + " by reference to ", invoked_function, - "which only takes arrays by value\n", + " which only takes arrays by value\n", ] res = self.generate_result(info) diff --git a/slither/detectors/functions/suicidal.py b/slither/detectors/functions/suicidal.py index 1f8cb52f9..f0af978ec 100644 --- a/slither/detectors/functions/suicidal.py +++ b/slither/detectors/functions/suicidal.py @@ -59,7 +59,7 @@ Bob calls `kill` and destructs the contract.""" if func.visibility not in ["public", "external"]: return False - calls = [c.name for c in func.internal_calls] + calls = [c.name for c in func.all_internal_calls()] if not ("suicide(address)" in calls or "selfdestruct(address)" in calls): return False diff --git a/slither/detectors/naming_convention/naming_convention.py b/slither/detectors/naming_convention/naming_convention.py index 02deb719e..827cfe246 100644 --- a/slither/detectors/naming_convention/naming_convention.py +++ b/slither/detectors/naming_convention/naming_convention.py @@ -24,7 +24,7 @@ class NamingConvention(AbstractDetector): HELP = "Conformity to Solidity naming conventions" IMPACT = DetectorClassification.INFORMATIONAL CONFIDENCE = DetectorClassification.HIGH - + LANGUAGE = "solidity" WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#conformance-to-solidity-naming-conventions" WIKI_TITLE = "Conformance to Solidity naming conventions" @@ -45,6 +45,14 @@ Solidity defines a [naming convention](https://solidity.readthedocs.io/en/v0.4.2 def is_cap_words(name: str) -> bool: return re.search("^[A-Z]([A-Za-z0-9]+)?_?$", name) is not None + @staticmethod + def is_immutable_naming(name: str) -> bool: + return re.search("^i_[a-z]([A-Za-z0-9]+)?_?$", name) is not None + + @staticmethod + def is_state_naming(name: str) -> bool: + return re.search("^s_[a-z]([A-Za-z0-9]+)?_?$", name) is not None + @staticmethod def is_mixed_case(name: str) -> bool: return re.search("^[a-z]([A-Za-z0-9]+)?_?$", name) is not None @@ -167,10 +175,17 @@ Solidity defines a [naming convention](https://solidity.readthedocs.io/en/v0.4.2 results.append(res) else: - if var.visibility == "private": - correct_naming = self.is_mixed_case_with_underscore(var.name) + if var.visibility in ["private", "internal"]: + correct_naming = self.is_mixed_case_with_underscore( + var.name + ) or self.is_state_naming(var.name) + + if not correct_naming and var.is_immutable: + correct_naming = self.is_immutable_naming(var.name) + else: correct_naming = self.is_mixed_case(var.name) + if not correct_naming: info = ["Variable ", var, " is not in mixedCase\n"] diff --git a/slither/detectors/operations/cache_array_length.py b/slither/detectors/operations/cache_array_length.py new file mode 100644 index 000000000..eb4f43fa5 --- /dev/null +++ b/slither/detectors/operations/cache_array_length.py @@ -0,0 +1,225 @@ +from typing import List, Set + +from slither.core.cfg.node import Node, NodeType +from slither.core.declarations import Function +from slither.core.expressions import BinaryOperation, Identifier, MemberAccess, UnaryOperation +from slither.core.solidity_types import ArrayType +from slither.core.variables import StateVariable +from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification +from slither.slithir.operations import Length, Delete, HighLevelCall + + +class CacheArrayLength(AbstractDetector): + """ + Detects `for` loops that use `length` member of some storage array in their loop condition and don't modify it. + """ + + ARGUMENT = "cache-array-length" + HELP = ( + "Detects `for` loops that use `length` member of some storage array in their loop condition and don't " + "modify it." + ) + IMPACT = DetectorClassification.OPTIMIZATION + CONFIDENCE = DetectorClassification.HIGH + + WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#cache-array-length" + + WIKI_TITLE = "Cache array length" + WIKI_DESCRIPTION = ( + "Detects `for` loops that use `length` member of some storage array in their loop condition " + "and don't modify it. " + ) + WIKI_EXPLOIT_SCENARIO = """ +```solidity +contract C +{ + uint[] array; + + function f() public + { + for (uint i = 0; i < array.length; i++) + { + // code that does not modify length of `array` + } + } +} +``` +Since the `for` loop in `f` doesn't modify `array.length`, it is more gas efficient to cache it in some local variable and use that variable instead, like in the following example: + +```solidity +contract C +{ + uint[] array; + + function f() public + { + uint array_length = array.length; + for (uint i = 0; i < array_length; i++) + { + // code that does not modify length of `array` + } + } +} +``` + """ + WIKI_RECOMMENDATION = ( + "Cache the lengths of storage arrays if they are used and not modified in `for` loops." + ) + + @staticmethod + def _is_identifier_member_access_comparison(exp: BinaryOperation) -> bool: + """ + Checks whether a BinaryOperation `exp` is an operation on Identifier and MemberAccess. + """ + return ( + isinstance(exp.expression_left, Identifier) + and isinstance(exp.expression_right, MemberAccess) + ) or ( + isinstance(exp.expression_left, MemberAccess) + and isinstance(exp.expression_right, Identifier) + ) + + @staticmethod + def _extract_array_from_length_member_access(exp: MemberAccess) -> StateVariable: + """ + Given a member access `exp`, it returns state array which `length` member is accessed through `exp`. + If array is not a state array or its `length` member is not referenced, it returns `None`. + """ + if exp.member_name != "length": + return None + if not isinstance(exp.expression, Identifier): + return None + if not isinstance(exp.expression.value, StateVariable): + return None + if not isinstance(exp.expression.value.type, ArrayType): + return None + return exp.expression.value + + @staticmethod + def _is_loop_referencing_array_length( + node: Node, visited: Set[Node], array: StateVariable, depth: int + ) -> True: + """ + For a given loop, checks if it references `array.length` at some point. + Will also return True if `array.length` is referenced but not changed. + This may potentially generate false negatives in the detector, but it was done this way because: + - situations when array `length` is referenced but not modified in loop are rare + - checking if `array.length` is indeed modified would require much more work + """ + visited.add(node) + if node.type == NodeType.STARTLOOP: + depth += 1 + if node.type == NodeType.ENDLOOP: + depth -= 1 + if depth == 0: + return False + + # Array length may change in the following situations: + # - when `push` is called + # - when `pop` is called + # - when `delete` is called on the entire array + # - when external function call is made (instructions from internal function calls are already in + # `node.all_slithir_operations()`, so we don't need to handle internal calls separately) + if node.type == NodeType.EXPRESSION: + for op in node.all_slithir_operations(): + if isinstance(op, Length) and op.value == array: + # op accesses array.length, not necessarily modifying it + return True + if isinstance(op, Delete): + # take into account only delete entire array, since delete array[i] doesn't change `array.length` + if ( + isinstance(op.expression, UnaryOperation) + and isinstance(op.expression.expression, Identifier) + and op.expression.expression.value == array + ): + return True + if ( + isinstance(op, HighLevelCall) + and isinstance(op.function, Function) + and not op.function.view + and not op.function.pure + ): + return True + + for son in node.sons: + if son not in visited: + if CacheArrayLength._is_loop_referencing_array_length(son, visited, array, depth): + return True + return False + + @staticmethod + def _handle_loops(nodes: List[Node], non_optimal_array_len_usages: List[Node]) -> None: + """ + For each loop, checks if it has a comparison with `length` array member and, if it has, checks whether that + array size could potentially change in that loop. + If it cannot, the loop condition is added to `non_optimal_array_len_usages`. + There may be some false negatives here - see docs for `_is_loop_referencing_array_length` for more information. + """ + for node in nodes: + if node.type == NodeType.STARTLOOP: + if_node = node.sons[0] + if if_node.type != NodeType.IFLOOP: + continue + if not isinstance(if_node.expression, BinaryOperation): + continue + exp: BinaryOperation = if_node.expression + if not CacheArrayLength._is_identifier_member_access_comparison(exp): + continue + array: StateVariable + if isinstance(exp.expression_right, MemberAccess): + array = CacheArrayLength._extract_array_from_length_member_access( + exp.expression_right + ) + else: # isinstance(exp.expression_left, MemberAccess) == True + array = CacheArrayLength._extract_array_from_length_member_access( + exp.expression_left + ) + if array is None: + continue + + visited: Set[Node] = set() + if not CacheArrayLength._is_loop_referencing_array_length( + if_node, visited, array, 1 + ): + non_optimal_array_len_usages.append(if_node) + + @staticmethod + def _get_non_optimal_array_len_usages_for_function(f: Function) -> List[Node]: + """ + Finds non-optimal usages of array length in loop conditions in a given function. + """ + non_optimal_array_len_usages: List[Node] = [] + CacheArrayLength._handle_loops(f.nodes, non_optimal_array_len_usages) + + return non_optimal_array_len_usages + + @staticmethod + def _get_non_optimal_array_len_usages(functions: List[Function]) -> List[Node]: + """ + Finds non-optimal usages of array length in loop conditions in given functions. + """ + non_optimal_array_len_usages: List[Node] = [] + + for f in functions: + non_optimal_array_len_usages += ( + CacheArrayLength._get_non_optimal_array_len_usages_for_function(f) + ) + + return non_optimal_array_len_usages + + def _detect(self): + results = [] + + non_optimal_array_len_usages = CacheArrayLength._get_non_optimal_array_len_usages( + self.compilation_unit.functions + ) + for usage in non_optimal_array_len_usages: + info = [ + "Loop condition ", + usage, + " should use cached array length instead of referencing `length` member " + "of the storage array.\n ", + ] + res = self.generate_result(info) + results.append(res) + return results diff --git a/slither/detectors/operations/incorrect_exp.py b/slither/detectors/operations/incorrect_exp.py new file mode 100644 index 000000000..6188f5cb1 --- /dev/null +++ b/slither/detectors/operations/incorrect_exp.py @@ -0,0 +1,93 @@ +""" +Module detecting incorrect operator usage for exponentiation where bitwise xor '^' is used instead of '**' +""" +from typing import Tuple, List, Union + +from slither.core.cfg.node import Node +from slither.core.declarations import Contract, Function +from slither.detectors.abstract_detector import ( + AbstractDetector, + DetectorClassification, + DETECTOR_INFO, +) +from slither.slithir.operations import Binary, BinaryType, Operation +from slither.slithir.utils.utils import RVALUE +from slither.slithir.variables.constant import Constant +from slither.utils.output import Output + + +def _is_constant_candidate(var: Union[RVALUE, Function]) -> bool: + """ + Check if the variable is a constant. + Do not consider variable that are expressed with hexadecimal. + Something like 2^0xf is likely to be a correct bitwise operator + :param var: + :return: + """ + return isinstance(var, Constant) and not var.original_value.startswith("0x") + + +def _is_bitwise_xor_on_constant(ir: Operation) -> bool: + return ( + isinstance(ir, Binary) + and ir.type == BinaryType.CARET + and (_is_constant_candidate(ir.variable_left) or _is_constant_candidate(ir.variable_right)) + ) + + +def _detect_incorrect_operator(contract: Contract) -> List[Tuple[Function, Node]]: + ret: List[Tuple[Function, Node]] = [] + f: Function + for f in contract.functions + contract.modifiers: # type:ignore + # Heuristic: look for binary expressions with ^ operator where at least one of the operands is a constant, and + # the constant is not in hex, because hex typically is used with bitwise xor and not exponentiation + nodes = [node for node in f.nodes for ir in node.irs if _is_bitwise_xor_on_constant(ir)] + for node in nodes: + ret.append((f, node)) + return ret + + +# pylint: disable=too-few-public-methods +class IncorrectOperatorExponentiation(AbstractDetector): + """ + Incorrect operator usage of bitwise xor mistaking it for exponentiation + """ + + ARGUMENT = "incorrect-exp" + HELP = "Incorrect exponentiation" + IMPACT = DetectorClassification.HIGH + CONFIDENCE = DetectorClassification.MEDIUM + + WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-exponentiation" + + WIKI_TITLE = "Incorrect exponentiation" + WIKI_DESCRIPTION = "Detect use of bitwise `xor ^` instead of exponential `**`" + WIKI_EXPLOIT_SCENARIO = """ +```solidity +contract Bug{ + uint UINT_MAX = 2^256 - 1; + ... +} +``` +Alice deploys a contract in which `UINT_MAX` incorrectly uses `^` operator instead of `**` for exponentiation""" + + WIKI_RECOMMENDATION = "Use the correct operator `**` for exponentiation." + + def _detect(self) -> List[Output]: + """Detect the incorrect operator usage for exponentiation where bitwise xor ^ is used instead of ** + + Returns: + list: (function, node) + """ + results: List[Output] = [] + for c in self.compilation_unit.contracts_derived: + res = _detect_incorrect_operator(c) + for (func, node) in res: + info: DETECTOR_INFO = [ + func, + " has bitwise-xor operator ^ instead of the exponentiation operator **: \n", + ] + info += ["\t - ", node, "\n"] + results.append(self.generate_result(info)) + + return results diff --git a/slither/detectors/operations/unchecked_low_level_return_values.py b/slither/detectors/operations/unchecked_low_level_return_values.py index 0537ebbf2..c1fb1a868 100644 --- a/slither/detectors/operations/unchecked_low_level_return_values.py +++ b/slither/detectors/operations/unchecked_low_level_return_values.py @@ -1,15 +1,24 @@ """ Module detecting unused return values from low level """ -from slither.detectors.abstract_detector import DetectorClassification -from slither.detectors.operations.unused_return_values import UnusedReturnValues +from typing import List + +from slither.core.cfg.node import Node from slither.slithir.operations import LowLevelCall -from slither.slithir.operations.operation import Operation + +from slither.core.declarations.function_contract import FunctionContract +from slither.core.variables.state_variable import StateVariable +from slither.detectors.abstract_detector import ( + AbstractDetector, + DetectorClassification, + DETECTOR_INFO, +) +from slither.utils.output import Output -class UncheckedLowLevel(UnusedReturnValues): +class UncheckedLowLevel(AbstractDetector): """ - If the return value of a send is not checked, it might lead to losing ether + If the return value of a low-level call is not checked, it might lead to losing ether """ ARGUMENT = "unchecked-lowlevel" @@ -38,5 +47,44 @@ If the low level is used to prevent blocking operations, consider logging failed WIKI_RECOMMENDATION = "Ensure that the return value of a low-level call is checked or logged." - def _is_instance(self, ir: Operation) -> bool: # pylint: disable=no-self-use - return isinstance(ir, LowLevelCall) + @staticmethod + def detect_unused_return_values(f: FunctionContract) -> List[Node]: + """ + Return the nodes where the return value of a call is unused + Args: + f (Function) + Returns: + list(Node) + """ + values_returned = [] + nodes_origin = {} + for n in f.nodes: + for ir in n.irs: + if isinstance(ir, LowLevelCall): + # if a return value is stored in a state variable, it's ok + if ir.lvalue and not isinstance(ir.lvalue, StateVariable): + values_returned.append(ir.lvalue) + nodes_origin[ir.lvalue] = ir + + for read in ir.read: + if read in values_returned: + values_returned.remove(read) + + return [nodes_origin[value].node for value in values_returned] + + def _detect(self) -> List[Output]: + """Detect low level calls where the success value is not checked""" + results = [] + for c in self.compilation_unit.contracts_derived: + for f in c.functions_and_modifiers: + unused_return = UncheckedLowLevel.detect_unused_return_values(f) + if unused_return: + + for node in unused_return: + info: DETECTOR_INFO = [f, " ignores return value by ", node, "\n"] + + res = self.generate_result(info) + + results.append(res) + + return results diff --git a/slither/detectors/operations/unused_return_values.py b/slither/detectors/operations/unused_return_values.py index 80be98b45..783a44807 100644 --- a/slither/detectors/operations/unused_return_values.py +++ b/slither/detectors/operations/unused_return_values.py @@ -101,10 +101,8 @@ contract MyConc{ def _detect(self) -> List[Output]: """Detect high level calls which return a value that are never used""" results = [] - for c in self.compilation_unit.contracts: - for f in c.functions + c.modifiers: - if f.contract_declarer != c: - continue + for c in self.compilation_unit.contracts_derived: + for f in c.functions_and_modifiers: unused_return = self.detect_unused_return_values(f) if unused_return: diff --git a/slither/detectors/statements/deprecated_calls.py b/slither/detectors/statements/deprecated_calls.py index e59d254bb..5e066c751 100644 --- a/slither/detectors/statements/deprecated_calls.py +++ b/slither/detectors/statements/deprecated_calls.py @@ -31,7 +31,7 @@ class DeprecatedStandards(AbstractDetector): HELP = "Deprecated Solidity Standards" IMPACT = DetectorClassification.INFORMATIONAL CONFIDENCE = DetectorClassification.HIGH - + LANGUAGE = "solidity" WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards" WIKI_TITLE = "Deprecated standards" diff --git a/slither/detectors/statements/divide_before_multiply.py b/slither/detectors/statements/divide_before_multiply.py index 6f199db41..1f6ccd87e 100644 --- a/slither/detectors/statements/divide_before_multiply.py +++ b/slither/detectors/statements/divide_before_multiply.py @@ -2,7 +2,7 @@ Module detecting possible loss of precision due to divide before multiple """ from collections import defaultdict -from typing import DefaultDict, List, Set, Tuple +from typing import DefaultDict, List, Tuple from slither.core.cfg.node import Node from slither.core.declarations.contract import Contract @@ -63,7 +63,7 @@ def is_assert(node: Node) -> bool: # pylint: disable=too-many-branches def _explore( - to_explore: Set[Node], f_results: List[List[Node]], divisions: DefaultDict[LVALUE, List[Node]] + to_explore: List[Node], f_results: List[List[Node]], divisions: DefaultDict[LVALUE, List[Node]] ) -> None: explored = set() while to_explore: # pylint: disable=too-many-nested-blocks @@ -114,7 +114,7 @@ def _explore( f_results.append(node_results) for son in node.sons: - to_explore.add(son) + to_explore.append(son) def detect_divide_before_multiply( @@ -133,7 +133,7 @@ def detect_divide_before_multiply( results: List[Tuple[FunctionContract, List[Node]]] = [] # Loop for each function and modifier. - for function in contract.functions_declared: + for function in contract.functions_declared + contract.modifiers_declared: if not function.entry_point: continue @@ -145,7 +145,7 @@ def detect_divide_before_multiply( # track all the division results (and the assignment of the division results) divisions: DefaultDict[LVALUE, List[Node]] = defaultdict(list) - _explore({function.entry_point}, f_results, divisions) + _explore([function.entry_point], f_results, divisions) for f_result in f_results: results.append((function, f_result)) diff --git a/slither/detectors/statements/mapping_deletion.py b/slither/detectors/statements/mapping_deletion.py index 4cdac7240..0940d5a07 100644 --- a/slither/detectors/statements/mapping_deletion.py +++ b/slither/detectors/statements/mapping_deletion.py @@ -6,6 +6,7 @@ from typing import List, Tuple from slither.core.cfg.node import Node from slither.core.declarations import Structure from slither.core.declarations.contract import Contract +from slither.core.variables.variable import Variable from slither.core.declarations.function_contract import FunctionContract from slither.core.solidity_types import MappingType, UserDefinedType from slither.detectors.abstract_detector import ( @@ -69,14 +70,25 @@ The mapping `balances` is never deleted, so `remove` does not work as intended." for ir in node.irs: if isinstance(ir, Delete): value = ir.variable - if isinstance(value.type, UserDefinedType) and isinstance( - value.type.type, Structure - ): - st = value.type.type - if any(isinstance(e.type, MappingType) for e in st.elems.values()): - ret.append((f, st, node)) + MappingDeletionDetection.check_if_mapping(value, ret, f, node) + return ret + @staticmethod + def check_if_mapping( + value: Variable, + ret: List[Tuple[FunctionContract, Structure, Node]], + f: FunctionContract, + node: Node, + ): + if isinstance(value.type, UserDefinedType) and isinstance(value.type.type, Structure): + st = value.type.type + if any(isinstance(e.type, MappingType) for e in st.elems.values()): + ret.append((f, st, node)) + return + for e in st.elems.values(): + MappingDeletionDetection.check_if_mapping(e, ret, f, node) + def _detect(self) -> List[Output]: """Detect mapping deletion diff --git a/slither/detectors/statements/msg_value_in_loop.py b/slither/detectors/statements/msg_value_in_loop.py index 55bd9bfc2..83c5658ca 100644 --- a/slither/detectors/statements/msg_value_in_loop.py +++ b/slither/detectors/statements/msg_value_in_loop.py @@ -79,7 +79,7 @@ contract MsgValueInLoop{ # endregion wiki_exploit_scenario WIKI_RECOMMENDATION = """ -Track msg.value through a local variable and decrease its amount on every iteration/usage. +Provide an explicit array of amounts alongside the receivers array, and check that the sum of all amounts matches `msg.value`. """ def _detect(self) -> List[Output]: diff --git a/slither/detectors/statements/return_bomb.py b/slither/detectors/statements/return_bomb.py new file mode 100644 index 000000000..8b6cd07a2 --- /dev/null +++ b/slither/detectors/statements/return_bomb.py @@ -0,0 +1,123 @@ +from typing import List + +from slither.core.cfg.node import Node +from slither.core.declarations import Contract +from slither.core.declarations.function import Function +from slither.core.solidity_types import Type +from slither.detectors.abstract_detector import ( + AbstractDetector, + DetectorClassification, + DETECTOR_INFO, +) +from slither.slithir.operations import LowLevelCall, HighLevelCall +from slither.analyses.data_dependency.data_dependency import is_tainted +from slither.utils.output import Output + + +class ReturnBomb(AbstractDetector): + + ARGUMENT = "return-bomb" + HELP = "A low level callee may consume all callers gas unexpectedly." + IMPACT = DetectorClassification.LOW + CONFIDENCE = DetectorClassification.MEDIUM + + WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#return-bomb" + + WIKI_TITLE = "Return Bomb" + WIKI_DESCRIPTION = "A low level callee may consume all callers gas unexpectedly." + WIKI_EXPLOIT_SCENARIO = """ +```solidity +//Modified from https://github.com/nomad-xyz/ExcessivelySafeCall +contract BadGuy { + function youveActivateMyTrapCard() external pure returns (bytes memory) { + assembly{ + revert(0, 1000000) + } + } +} + +contract Mark { + function oops(address badGuy) public{ + bool success; + bytes memory ret; + + // Mark pays a lot of gas for this copy + //(success, ret) = badGuy.call{gas:10000}( + (success, ret) = badGuy.call( + abi.encodeWithSelector( + BadGuy.youveActivateMyTrapCard.selector + ) + ); + + // Mark may OOG here, preventing local state changes + //importantCleanup(); + } +} + +``` +After Mark calls BadGuy bytes are copied from returndata to memory, the memory expansion cost is paid. This means that when using a standard solidity call, the callee can "returnbomb" the caller, imposing an arbitrary gas cost. +Callee unexpectedly makes the caller OOG. +""" + + WIKI_RECOMMENDATION = "Avoid unlimited implicit decoding of returndata." + + @staticmethod + def is_dynamic_type(ty: Type) -> bool: + # ty.is_dynamic ? + name = str(ty) + if "[]" in name or name in ("bytes", "string"): + return True + return False + + def get_nodes_for_function(self, function: Function, contract: Contract) -> List[Node]: + nodes = [] + for node in function.nodes: + for ir in node.irs: + if isinstance(ir, (HighLevelCall, LowLevelCall)): + if not is_tainted(ir.destination, contract): # type:ignore + # Only interested if the target address is controlled/tainted + continue + + if isinstance(ir, HighLevelCall) and isinstance(ir.function, Function): + # in normal highlevel calls return bombs are _possible_ + # if the return type is dynamic and the caller tries to copy and decode large data + has_dyn = False + if ir.function.return_type: + has_dyn = any( + self.is_dynamic_type(ty) for ty in ir.function.return_type + ) + + if not has_dyn: + continue + + # If a gas budget was specified then the + # user may not know about the return bomb + if ir.call_gas is None: + # if a gas budget was NOT specified then the caller + # may already suspect the call may spend all gas? + continue + + nodes.append(node) + # TODO: check that there is some state change after the call + + return nodes + + def _detect(self) -> List[Output]: + results = [] + + for contract in self.compilation_unit.contracts: + for function in contract.functions_declared: + nodes = self.get_nodes_for_function(function, contract) + if nodes: + info: DETECTOR_INFO = [ + function, + " tries to limit the gas of an external call that controls implicit decoding\n", + ] + + for node in sorted(nodes, key=lambda x: x.node_id): + info += ["\t", node, "\n"] + + res = self.generate_result(info) + results.append(res) + + return results diff --git a/slither/detectors/statements/tautological_compare.py b/slither/detectors/statements/tautological_compare.py new file mode 100644 index 000000000..0dc34b582 --- /dev/null +++ b/slither/detectors/statements/tautological_compare.py @@ -0,0 +1,69 @@ +from typing import List +from slither.detectors.abstract_detector import ( + AbstractDetector, + DetectorClassification, + DETECTOR_INFO, +) +from slither.slithir.operations import ( + Binary, + BinaryType, +) + +from slither.core.declarations import Function +from slither.utils.output import Output + + +class TautologicalCompare(AbstractDetector): + """ + Same variable comparison detector + """ + + ARGUMENT = "tautological-compare" + HELP = "Comparing a variable to itself always returns true or false, depending on comparison" + IMPACT = DetectorClassification.MEDIUM + CONFIDENCE = DetectorClassification.HIGH + + WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#tautological-compare" + + WIKI_TITLE = "Tautological compare" + WIKI_DESCRIPTION = "A variable compared to itself is probably an error as it will always return `true` for `==`, `>=`, `<=` and always `false` for `<`, `>` and `!=`." + WIKI_EXPLOIT_SCENARIO = """ +```solidity + function check(uint a) external returns(bool){ + return (a >= a); + } +``` +`check` always return true.""" + + WIKI_RECOMMENDATION = "Remove comparison or compare to different value." + + def _check_function(self, f: Function) -> List[Output]: + affected_nodes = set() + for node in f.nodes: + for ir in node.irs: + if isinstance(ir, Binary): + if ir.type in [ + BinaryType.GREATER, + BinaryType.GREATER_EQUAL, + BinaryType.LESS, + BinaryType.LESS_EQUAL, + BinaryType.EQUAL, + BinaryType.NOT_EQUAL, + ]: + if ir.variable_left == ir.variable_right: + affected_nodes.add(node) + + results = [] + for n in affected_nodes: + info: DETECTOR_INFO = [f, " compares a variable to itself:\n\t", n, "\n"] + res = self.generate_result(info) + results.append(res) + return results + + def _detect(self): + results = [] + + for f in self.compilation_unit.functions_and_modifiers: + results.extend(self._check_function(f)) + + return results diff --git a/slither/detectors/variables/predeclaration_usage_local.py b/slither/detectors/variables/predeclaration_usage_local.py index b4d75e51a..9816dd6e2 100644 --- a/slither/detectors/variables/predeclaration_usage_local.py +++ b/slither/detectors/variables/predeclaration_usage_local.py @@ -36,7 +36,7 @@ class PredeclarationUsageLocal(AbstractDetector): ```solidity contract C { function f(uint z) public returns (uint) { - uint y = x + 9 + z; // 'z' is used pre-declaration + uint y = x + 9 + z; // 'x' is used pre-declaration uint x = 7; if (z % 2 == 0) { diff --git a/slither/detectors/variables/similar_variables.py b/slither/detectors/variables/similar_variables.py index 465e1ce01..dccaf09c4 100644 --- a/slither/detectors/variables/similar_variables.py +++ b/slither/detectors/variables/similar_variables.py @@ -47,9 +47,7 @@ class SimilarVarsDetection(AbstractDetector): Returns: bool: true if names are similar """ - if len(seq1) != len(seq2): - return False - val = difflib.SequenceMatcher(a=seq1.lower(), b=seq2.lower()).ratio() + val = difflib.SequenceMatcher(a=seq1, b=seq2).ratio() ret = val > 0.90 return ret @@ -65,17 +63,23 @@ class SimilarVarsDetection(AbstractDetector): contract_var = contract.variables - all_var = set(all_var + contract_var) + all_var = list(set(all_var + contract_var)) + + ret = set() + # pylint: disable=consider-using-enumerate + for i in range(len(all_var)): + v1 = all_var[i] + _v1_name_lower = v1.name.lower() + for j in range(i, len(all_var)): + v2 = all_var[j] + if len(v1.name) != len(v2.name): + continue + _v2_name_lower = v2.name.lower() + if _v1_name_lower != _v2_name_lower: + if SimilarVarsDetection.similar(_v1_name_lower, _v2_name_lower): + ret.add((v1, v2)) - ret = [] - for v1 in all_var: - for v2 in all_var: - if v1.name.lower() != v2.name.lower(): - if SimilarVarsDetection.similar(v1.name, v2.name): - if (v2, v1) not in ret: - ret.append((v1, v2)) - - return set(ret) + return ret def _detect(self) -> List[Output]: """Detect similar variables name diff --git a/slither/detectors/variables/unchanged_state_variables.py b/slither/detectors/variables/unchanged_state_variables.py index f12cc5784..0e73ab57b 100644 --- a/slither/detectors/variables/unchanged_state_variables.py +++ b/slither/detectors/variables/unchanged_state_variables.py @@ -87,6 +87,8 @@ class UnchangedStateVariables: def detect(self) -> None: """Detect state variables that could be constant or immutable""" for c in self.compilation_unit.contracts_derived: + if c.is_signature_only(): + continue variables = [] functions = [] diff --git a/slither/detectors/variables/unused_state_variables.py b/slither/detectors/variables/unused_state_variables.py index afb4e3ac5..830ca34ca 100644 --- a/slither/detectors/variables/unused_state_variables.py +++ b/slither/detectors/variables/unused_state_variables.py @@ -20,8 +20,6 @@ from slither.visitors.expression.export_values import ExportValues def detect_unused(contract: Contract) -> Optional[List[StateVariable]]: - if contract.is_signature_only(): - return None # Get all the variables read in all the functions and modifiers all_functions = [ @@ -73,6 +71,8 @@ class UnusedStateVars(AbstractDetector): """Detect unused state variables""" results = [] for c in self.compilation_unit.contracts_derived: + if c.is_signature_only(): + continue unusedVars = detect_unused(c) if unusedVars: for var in unusedVars: diff --git a/slither/printers/all_printers.py b/slither/printers/all_printers.py index 6dc8dddbd..3edd5325b 100644 --- a/slither/printers/all_printers.py +++ b/slither/printers/all_printers.py @@ -1,6 +1,7 @@ # pylint: disable=unused-import,relative-beyond-top-level from .summary.function import FunctionSummary from .summary.contract import ContractSummary +from .summary.loc import LocPrinter from .inheritance.inheritance import PrinterInheritance from .inheritance.inheritance_graph import PrinterInheritanceGraph from .call.call_graph import PrinterCallGraph @@ -8,6 +9,8 @@ from .functions.authorization import PrinterWrittenVariablesAndAuthorization from .summary.slithir import PrinterSlithIR from .summary.slithir_ssa import PrinterSlithIRSSA from .summary.human_summary import PrinterHumanSummary +from .summary.ck import CK +from .summary.halstead import Halstead from .functions.cfg import CFG from .summary.function_ids import FunctionIds from .summary.variable_order import VariableOrder @@ -20,3 +23,4 @@ from .summary.evm import PrinterEVM from .summary.when_not_paused import PrinterWhenNotPaused from .summary.declaration import Declaration from .functions.dominator import Dominator +from .summary.martin import Martin diff --git a/slither/printers/guidance/echidna.py b/slither/printers/guidance/echidna.py index acbf5b015..0c47fa0f9 100644 --- a/slither/printers/guidance/echidna.py +++ b/slither/printers/guidance/echidna.py @@ -4,7 +4,7 @@ from typing import Dict, List, Set, Tuple, NamedTuple, Union from slither.analyses.data_dependency.data_dependency import is_dependent from slither.core.cfg.node import Node -from slither.core.declarations import Enum, Function +from slither.core.declarations import Enum, Function, Contract from slither.core.declarations.solidity_variables import ( SolidityVariableComposed, SolidityFunction, @@ -30,9 +30,9 @@ from slither.slithir.operations import ( TypeConversion, ) from slither.slithir.operations.binary import Binary -from slither.slithir.variables import Constant +from slither.slithir.variables import Constant, ReferenceVariable from slither.utils.output import Output -from slither.visitors.expression.constants_folding import ConstantFolding +from slither.visitors.expression.constants_folding import ConstantFolding, NotConstant def _get_name(f: Union[Function, Variable]) -> str: @@ -43,9 +43,9 @@ def _get_name(f: Union[Function, Variable]) -> str: return f.solidity_signature -def _extract_payable(slither: SlitherCore) -> Dict[str, List[str]]: +def _extract_payable(contracts: List[Contract]) -> Dict[str, List[str]]: ret: Dict[str, List[str]] = {} - for contract in slither.contracts: + for contract in contracts: payable_functions = [_get_name(f) for f in contract.functions_entry_points if f.payable] if payable_functions: ret[contract.name] = payable_functions @@ -53,10 +53,10 @@ def _extract_payable(slither: SlitherCore) -> Dict[str, List[str]]: def _extract_solidity_variable_usage( - slither: SlitherCore, sol_var: SolidityVariable + contracts: List[Contract], sol_var: SolidityVariable ) -> Dict[str, List[str]]: ret: Dict[str, List[str]] = {} - for contract in slither.contracts: + for contract in contracts: functions_using_sol_var = [] for f in contract.functions_entry_points: for v in f.all_solidity_variables_read(): @@ -114,9 +114,9 @@ def _is_constant(f: Function) -> bool: # pylint: disable=too-many-branches return True -def _extract_constant_functions(slither: SlitherCore) -> Dict[str, List[str]]: +def _extract_constant_functions(contracts: List[Contract]) -> Dict[str, List[str]]: ret: Dict[str, List[str]] = {} - for contract in slither.contracts: + for contract in contracts: cst_functions = [_get_name(f) for f in contract.functions_entry_points if _is_constant(f)] cst_functions += [ v.solidity_signature for v in contract.state_variables if v.visibility in ["public"] @@ -126,15 +126,29 @@ def _extract_constant_functions(slither: SlitherCore) -> Dict[str, List[str]]: return ret -def _extract_assert(slither: SlitherCore) -> Dict[str, List[str]]: - ret: Dict[str, List[str]] = {} - for contract in slither.contracts: - functions_using_assert = [] +def _extract_assert(contracts: List[Contract]) -> Dict[str, Dict[str, List[Dict]]]: + """ + Return the list of contract -> function name -> List(source mapping of the assert)) + + Args: + contracts: list of contracts + + Returns: + + """ + ret: Dict[str, Dict[str, List[Dict]]] = {} + for contract in contracts: + functions_using_assert = [] # Dict[str, List[Dict]] = defaultdict(list) for f in contract.functions_entry_points: for v in f.all_solidity_calls(): if v == SolidityFunction("assert(bool)"): functions_using_assert.append(_get_name(f)) break + # Revert https://github.com/crytic/slither/pull/2105 until format is supported by echidna. + # for node in f.all_nodes(): + # if SolidityFunction("assert(bool)") in node.solidity_calls and node.source_mapping: + # func_name = _get_name(f) + # functions_using_assert[func_name].append(node.source_mapping.to_json()) if functions_using_assert: ret[contract.name] = functions_using_assert return ret @@ -178,11 +192,16 @@ def _extract_constants_from_irs( # pylint: disable=too-many-branches,too-many-n all_cst_used_in_binary[str(ir.type)].append( ConstantValue(str(r.value), str(r.type)) ) - if isinstance(ir.variable_left, Constant) and isinstance(ir.variable_right, Constant): - if ir.lvalue: - type_ = ir.lvalue.type - cst = ConstantFolding(ir.expression, type_).result() - all_cst_used.append(ConstantValue(str(cst.value), str(type_))) + if isinstance(ir.variable_left, Constant) or isinstance( + ir.variable_right, Constant + ): + if ir.lvalue: + try: + type_ = ir.lvalue.type + cst = ConstantFolding(ir.expression, type_).result() + all_cst_used.append(ConstantValue(str(cst.value), str(type_))) + except NotConstant: + pass if isinstance(ir, TypeConversion): if isinstance(ir.variable, Constant): if isinstance(ir.type, TypeAlias): @@ -203,19 +222,20 @@ def _extract_constants_from_irs( # pylint: disable=too-many-branches,too-many-n except ValueError: # index could fail; should never happen in working solidity code pass for r in ir.read: + var_read = r.points_to_origin if isinstance(r, ReferenceVariable) else r # Do not report struct_name in a.struct_name if isinstance(ir, Member): continue - if isinstance(r, Constant): - all_cst_used.append(ConstantValue(str(r.value), str(r.type))) - if isinstance(r, StateVariable): - if r.node_initialization: - if r.node_initialization.irs: - if r.node_initialization in context_explored: + if isinstance(var_read, Constant): + all_cst_used.append(ConstantValue(str(var_read.value), str(var_read.type))) + if isinstance(var_read, StateVariable): + if var_read.node_initialization: + if var_read.node_initialization.irs: + if var_read.node_initialization in context_explored: continue - context_explored.add(r.node_initialization) + context_explored.add(var_read.node_initialization) _extract_constants_from_irs( - r.node_initialization.irs, + var_read.node_initialization.irs, all_cst_used, all_cst_used_in_binary, context_explored, @@ -223,13 +243,13 @@ def _extract_constants_from_irs( # pylint: disable=too-many-branches,too-many-n def _extract_constants( - slither: SlitherCore, + contracts: List[Contract], ) -> Tuple[Dict[str, Dict[str, List]], Dict[str, Dict[str, Dict]]]: # contract -> function -> [ {"value": value, "type": type} ] ret_cst_used: Dict[str, Dict[str, List[ConstantValue]]] = defaultdict(dict) # contract -> function -> binary_operand -> [ {"value": value, "type": type ] ret_cst_used_in_binary: Dict[str, Dict[str, Dict[str, List[ConstantValue]]]] = defaultdict(dict) - for contract in slither.contracts: + for contract in contracts: for function in contract.functions_entry_points: all_cst_used: List = [] all_cst_used_in_binary: Dict = defaultdict(list) @@ -255,11 +275,11 @@ def _extract_constants( def _extract_function_relations( - slither: SlitherCore, + contracts: List[Contract], ) -> Dict[str, Dict[str, Dict[str, List[str]]]]: # contract -> function -> [functions] ret: Dict[str, Dict[str, Dict[str, List[str]]]] = defaultdict(dict) - for contract in slither.contracts: + for contract in contracts: ret[contract.name] = defaultdict(dict) written = { _get_name(function): function.all_state_variables_written() @@ -283,14 +303,14 @@ def _extract_function_relations( return ret -def _have_external_calls(slither: SlitherCore) -> Dict[str, List[str]]: +def _have_external_calls(contracts: List[Contract]) -> Dict[str, List[str]]: """ Detect the functions with external calls :param slither: :return: """ ret: Dict[str, List[str]] = defaultdict(list) - for contract in slither.contracts: + for contract in contracts: for function in contract.functions_entry_points: if function.all_high_level_calls() or function.all_low_level_calls(): ret[contract.name].append(_get_name(function)) @@ -299,14 +319,14 @@ def _have_external_calls(slither: SlitherCore) -> Dict[str, List[str]]: return ret -def _use_balance(slither: SlitherCore) -> Dict[str, List[str]]: +def _use_balance(contracts: List[Contract]) -> Dict[str, List[str]]: """ Detect the functions with external calls :param slither: :return: """ ret: Dict[str, List[str]] = defaultdict(list) - for contract in slither.contracts: + for contract in contracts: for function in contract.functions_entry_points: for ir in function.all_slithir_operations(): if isinstance(ir, SolidityCall) and ir.function == SolidityFunction( @@ -318,25 +338,25 @@ def _use_balance(slither: SlitherCore) -> Dict[str, List[str]]: return ret -def _with_fallback(slither: SlitherCore) -> Set[str]: +def _with_fallback(contracts: List[Contract]) -> Set[str]: ret: Set[str] = set() - for contract in slither.contracts: + for contract in contracts: for function in contract.functions_entry_points: if function.is_fallback: ret.add(contract.name) return ret -def _with_receive(slither: SlitherCore) -> Set[str]: +def _with_receive(contracts: List[Contract]) -> Set[str]: ret: Set[str] = set() - for contract in slither.contracts: + for contract in contracts: for function in contract.functions_entry_points: if function.is_receive: ret.add(contract.name) return ret -def _call_a_parameter(slither: SlitherCore) -> Dict[str, List[Dict]]: +def _call_a_parameter(slither: SlitherCore, contracts: List[Contract]) -> Dict[str, List[Dict]]: """ Detect the functions with external calls :param slither: @@ -344,7 +364,7 @@ def _call_a_parameter(slither: SlitherCore) -> Dict[str, List[Dict]]: """ # contract -> [ (function, idx, interface_called) ] ret: Dict[str, List[Dict]] = defaultdict(list) - for contract in slither.contracts: # pylint: disable=too-many-nested-blocks + for contract in contracts: # pylint: disable=too-many-nested-blocks for function in contract.functions_entry_points: try: for ir in function.all_slithir_operations(): @@ -390,40 +410,40 @@ class Echidna(AbstractPrinter): _filename(string) """ - payable = _extract_payable(self.slither) + contracts = self.slither.contracts + + payable = _extract_payable(contracts) timestamp = _extract_solidity_variable_usage( - self.slither, SolidityVariableComposed("block.timestamp") + contracts, SolidityVariableComposed("block.timestamp") ) block_number = _extract_solidity_variable_usage( - self.slither, SolidityVariableComposed("block.number") + contracts, SolidityVariableComposed("block.number") ) msg_sender = _extract_solidity_variable_usage( - self.slither, SolidityVariableComposed("msg.sender") - ) - msg_gas = _extract_solidity_variable_usage( - self.slither, SolidityVariableComposed("msg.gas") + contracts, SolidityVariableComposed("msg.sender") ) - assert_usage = _extract_assert(self.slither) - cst_functions = _extract_constant_functions(self.slither) - (cst_used, cst_used_in_binary) = _extract_constants(self.slither) + msg_gas = _extract_solidity_variable_usage(contracts, SolidityVariableComposed("msg.gas")) + assert_usage = _extract_assert(contracts) + cst_functions = _extract_constant_functions(contracts) + (cst_used, cst_used_in_binary) = _extract_constants(contracts) - functions_relations = _extract_function_relations(self.slither) + functions_relations = _extract_function_relations(contracts) constructors = { contract.name: contract.constructor.full_name - for contract in self.slither.contracts + for contract in contracts if contract.constructor } - external_calls = _have_external_calls(self.slither) + external_calls = _have_external_calls(contracts) - call_parameters = _call_a_parameter(self.slither) + # call_parameters = _call_a_parameter(self.slither, contracts) - use_balance = _use_balance(self.slither) + use_balance = _use_balance(contracts) - with_fallback = list(_with_fallback(self.slither)) + with_fallback = list(_with_fallback(contracts)) - with_receive = list(_with_receive(self.slither)) + with_receive = list(_with_receive(contracts)) d = { "payable": payable, @@ -438,7 +458,7 @@ class Echidna(AbstractPrinter): "functions_relations": functions_relations, "constructors": constructors, "have_external_calls": external_calls, - "call_a_parameter": call_parameters, + # "call_a_parameter": call_parameters, "use_balance": use_balance, "solc_versions": [unit.solc_version for unit in self.slither.compilation_units], "with_fallback": with_fallback, diff --git a/slither/printers/summary/ck.py b/slither/printers/summary/ck.py new file mode 100644 index 000000000..78da23756 --- /dev/null +++ b/slither/printers/summary/ck.py @@ -0,0 +1,58 @@ +""" + CK Metrics are a suite of six software metrics proposed by Chidamber and Kemerer in 1994. + These metrics are used to measure the complexity of a class. + https://en.wikipedia.org/wiki/Programming_complexity + + - Response For a Class (RFC) is a metric that measures the number of unique method calls within a class. + - Number of Children (NOC) is a metric that measures the number of children a class has. + - Depth of Inheritance Tree (DIT) is a metric that measures the number of parent classes a class has. + - Coupling Between Object Classes (CBO) is a metric that measures the number of classes a class is coupled to. + + Not implemented: + - Lack of Cohesion of Methods (LCOM) is a metric that measures the lack of cohesion in methods. + - Weighted Methods per Class (WMC) is a metric that measures the complexity of a class. + + During the calculation of the metrics above, there are a number of other intermediate metrics that are calculated. + These are also included in the output: + - State variables: total number of state variables + - Constants: total number of constants + - Immutables: total number of immutables + - Public: total number of public functions + - External: total number of external functions + - Internal: total number of internal functions + - Private: total number of private functions + - Mutating: total number of state mutating functions + - View: total number of view functions + - Pure: total number of pure functions + - External mutating: total number of external mutating functions + - No auth or onlyOwner: total number of functions without auth or onlyOwner modifiers + - No modifiers: total number of functions without modifiers + - Ext calls: total number of external calls + +""" +from slither.printers.abstract_printer import AbstractPrinter +from slither.utils.ck import CKMetrics +from slither.utils.output import Output + + +class CK(AbstractPrinter): + ARGUMENT = "ck" + HELP = "Chidamber and Kemerer (CK) complexity metrics and related function attributes" + + WIKI = "https://github.com/trailofbits/slither/wiki/Printer-documentation#ck" + + def output(self, _filename: str) -> Output: + if len(self.contracts) == 0: + return self.generate_output("No contract found") + + ck = CKMetrics(self.contracts) + + res = self.generate_output(ck.full_text) + res.add_pretty_table(ck.auxiliary1.pretty_table, ck.auxiliary1.title) + res.add_pretty_table(ck.auxiliary2.pretty_table, ck.auxiliary2.title) + res.add_pretty_table(ck.auxiliary3.pretty_table, ck.auxiliary3.title) + res.add_pretty_table(ck.auxiliary4.pretty_table, ck.auxiliary4.title) + res.add_pretty_table(ck.core.pretty_table, ck.core.title) + self.info(ck.full_text) + + return res diff --git a/slither/printers/summary/halstead.py b/slither/printers/summary/halstead.py new file mode 100644 index 000000000..d3c3557db --- /dev/null +++ b/slither/printers/summary/halstead.py @@ -0,0 +1,49 @@ +""" + Halstead complexity metrics + https://en.wikipedia.org/wiki/Halstead_complexity_measures + + 12 metrics based on the number of unique operators and operands: + + Core metrics: + n1 = the number of distinct operators + n2 = the number of distinct operands + N1 = the total number of operators + N2 = the total number of operands + + Extended metrics1: + n = n1 + n2 # Program vocabulary + N = N1 + N2 # Program length + S = n1 * log2(n1) + n2 * log2(n2) # Estimated program length + V = N * log2(n) # Volume + + Extended metrics2: + D = (n1 / 2) * (N2 / n2) # Difficulty + E = D * V # Effort + T = E / 18 seconds # Time required to program + B = (E^(2/3)) / 3000 # Number of delivered bugs + +""" +from slither.printers.abstract_printer import AbstractPrinter +from slither.utils.halstead import HalsteadMetrics +from slither.utils.output import Output + + +class Halstead(AbstractPrinter): + ARGUMENT = "halstead" + HELP = "Computes the Halstead complexity metrics for each contract" + + WIKI = "https://github.com/trailofbits/slither/wiki/Printer-documentation#halstead" + + def output(self, _filename: str) -> Output: + if len(self.contracts) == 0: + return self.generate_output("No contract found") + + halstead = HalsteadMetrics(self.contracts) + + res = self.generate_output(halstead.full_text) + res.add_pretty_table(halstead.core.pretty_table, halstead.core.title) + res.add_pretty_table(halstead.extended1.pretty_table, halstead.extended1.title) + res.add_pretty_table(halstead.extended2.pretty_table, halstead.extended2.title) + self.info(halstead.full_text) + + return res diff --git a/slither/printers/summary/human_summary.py b/slither/printers/summary/human_summary.py index 9eacb97c6..314335ebf 100644 --- a/slither/printers/summary/human_summary.py +++ b/slither/printers/summary/human_summary.py @@ -2,12 +2,12 @@ Module printing summary of the contract """ import logging -from pathlib import Path from typing import Tuple, List, Dict from slither.core.declarations import SolidityFunction, Function from slither.core.variables.state_variable import StateVariable from slither.printers.abstract_printer import AbstractPrinter +from slither.printers.summary.loc import compute_loc_metrics from slither.slithir.operations import ( LowLevelCall, HighLevelCall, @@ -21,7 +21,6 @@ from slither.utils.colors import green, red, yellow from slither.utils.myprettytable import MyPrettyTable from slither.utils.standard_libraries import is_standard_library from slither.core.cfg.node import NodeType -from slither.utils.tests_pattern import is_test_file class PrinterHumanSummary(AbstractPrinter): @@ -32,7 +31,6 @@ class PrinterHumanSummary(AbstractPrinter): @staticmethod def _get_summary_erc20(contract): - functions_name = [f.name for f in contract.functions] state_variables = [v.name for v in contract.state_variables] @@ -165,28 +163,7 @@ class PrinterHumanSummary(AbstractPrinter): def _number_functions(contract): return len(contract.functions) - def _lines_number(self): - if not self.slither.source_code: - return None - total_dep_lines = 0 - total_lines = 0 - total_tests_lines = 0 - - for filename, source_code in self.slither.source_code.items(): - lines = len(source_code.splitlines()) - is_dep = False - if self.slither.crytic_compile: - is_dep = self.slither.crytic_compile.is_dependency(filename) - if is_dep: - total_dep_lines += lines - else: - if is_test_file(Path(filename)): - total_tests_lines += lines - else: - total_lines += lines - return total_lines, total_dep_lines, total_tests_lines - - def _get_number_of_assembly_lines(self): + def _get_number_of_assembly_lines(self) -> int: total_asm_lines = 0 for contract in self.contracts: for function in contract.functions_declared: @@ -202,9 +179,7 @@ class PrinterHumanSummary(AbstractPrinter): return "Compilation non standard\n" return f"Compiled with {str(self.slither.crytic_compile.type)}\n" - def _number_contracts(self): - if self.slither.crytic_compile is None: - return len(self.slither.contracts), 0, 0 + def _number_contracts(self) -> Tuple[int, int, int]: contracts = self.slither.contracts deps = [c for c in contracts if c.is_from_dependency()] tests = [c for c in contracts if c.is_test] @@ -226,7 +201,6 @@ class PrinterHumanSummary(AbstractPrinter): return list(set(ercs)) def _get_features(self, contract): # pylint: disable=too-many-branches - has_payable = False can_send_eth = False can_selfdestruct = False @@ -291,6 +265,36 @@ class PrinterHumanSummary(AbstractPrinter): "Proxy": contract.is_upgradeable_proxy, } + def _get_contracts(self, txt: str) -> str: + ( + number_contracts, + number_contracts_deps, + number_contracts_tests, + ) = self._number_contracts() + txt += f"Total number of contracts in source files: {number_contracts}\n" + if number_contracts_deps > 0: + txt += f"Number of contracts in dependencies: {number_contracts_deps}\n" + if number_contracts_tests > 0: + txt += f"Number of contracts in tests : {number_contracts_tests}\n" + return txt + + def _get_number_lines(self, txt: str, results: Dict) -> Tuple[str, Dict]: + loc = compute_loc_metrics(self.slither) + txt += "Source lines of code (SLOC) in source files: " + txt += f"{loc.src.sloc}\n" + if loc.dep.sloc > 0: + txt += "Source lines of code (SLOC) in dependencies: " + txt += f"{loc.dep.sloc}\n" + if loc.test.sloc > 0: + txt += "Source lines of code (SLOC) in tests : " + txt += f"{loc.test.sloc}\n" + results["number_lines"] = loc.src.sloc + results["number_lines__dependencies"] = loc.dep.sloc + total_asm_lines = self._get_number_of_assembly_lines() + txt += f"Number of assembly lines: {total_asm_lines}\n" + results["number_lines_assembly"] = total_asm_lines + return txt, results + def output(self, _filename): # pylint: disable=too-many-locals,too-many-statements """ _filename is not used @@ -311,24 +315,8 @@ class PrinterHumanSummary(AbstractPrinter): "number_findings": {}, "detectors": [], } - - lines_number = self._lines_number() - if lines_number: - total_lines, total_dep_lines, total_tests_lines = lines_number - txt += f"Number of lines: {total_lines} (+ {total_dep_lines} in dependencies, + {total_tests_lines} in tests)\n" - results["number_lines"] = total_lines - results["number_lines__dependencies"] = total_dep_lines - total_asm_lines = self._get_number_of_assembly_lines() - txt += f"Number of assembly lines: {total_asm_lines}\n" - results["number_lines_assembly"] = total_asm_lines - - ( - number_contracts, - number_contracts_deps, - number_contracts_tests, - ) = self._number_contracts() - txt += f"Number of contracts: {number_contracts} (+ {number_contracts_deps} in dependencies, + {number_contracts_tests} tests) \n\n" - + txt = self._get_contracts(txt) + txt, results = self._get_number_lines(txt, results) ( txt_detectors, detectors_results, @@ -352,7 +340,7 @@ class PrinterHumanSummary(AbstractPrinter): libs = self._standard_libraries() if libs: txt += f'\nUse: {", ".join(libs)}\n' - results["standard_libraries"] = [str(l) for l in libs] + results["standard_libraries"] = [str(lib) for lib in libs] ercs = self._ercs() if ercs: @@ -363,7 +351,6 @@ class PrinterHumanSummary(AbstractPrinter): ["Name", "# functions", "ERCS", "ERC20 info", "Complex code", "Features"] ) for contract in self.slither.contracts_derived: - if contract.is_from_dependency() or contract.is_test: continue diff --git a/slither/printers/summary/loc.py b/slither/printers/summary/loc.py new file mode 100644 index 000000000..35bb20fc4 --- /dev/null +++ b/slither/printers/summary/loc.py @@ -0,0 +1,35 @@ +""" + Lines of Code (LOC) printer + + Definitions: + cloc: comment lines of code containing only comments + sloc: source lines of code with no whitespace or comments + loc: all lines of code including whitespace and comments + src: source files (excluding tests and dependencies) + dep: dependency files + test: test files +""" + +from slither.printers.abstract_printer import AbstractPrinter +from slither.utils.loc import compute_loc_metrics +from slither.utils.output import Output + + +class LocPrinter(AbstractPrinter): + ARGUMENT = "loc" + HELP = """Count the total number lines of code (LOC), source lines of code (SLOC), \ + and comment lines of code (CLOC) found in source files (SRC), dependencies (DEP), \ + and test files (TEST).""" + + WIKI = "https://github.com/trailofbits/slither/wiki/Printer-documentation#loc" + + def output(self, _filename: str) -> Output: + # compute loc metrics + loc = compute_loc_metrics(self.slither) + + table = loc.to_pretty_table() + txt = "Lines of Code \n" + str(table) + self.info(txt) + res = self.generate_output(txt) + res.add_pretty_table(table, "Code Lines") + return res diff --git a/slither/printers/summary/martin.py b/slither/printers/summary/martin.py new file mode 100644 index 000000000..a0f1bbfcb --- /dev/null +++ b/slither/printers/summary/martin.py @@ -0,0 +1,32 @@ +""" + Robert "Uncle Bob" Martin - Agile software metrics + https://en.wikipedia.org/wiki/Software_package_metrics + + Efferent Coupling (Ce): Number of contracts that the contract depends on + Afferent Coupling (Ca): Number of contracts that depend on a 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) + +""" +from slither.printers.abstract_printer import AbstractPrinter +from slither.utils.martin import MartinMetrics +from slither.utils.output import Output + + +class Martin(AbstractPrinter): + ARGUMENT = "martin" + HELP = "Martin agile software metrics (Ca, Ce, I, A, D)" + + WIKI = "https://github.com/trailofbits/slither/wiki/Printer-documentation#martin" + + def output(self, _filename: str) -> Output: + if len(self.contracts) == 0: + return self.generate_output("No contract found") + + martin = MartinMetrics(self.contracts) + + res = self.generate_output(martin.full_text) + res.add_pretty_table(martin.core.pretty_table, martin.core.title) + self.info(martin.full_text) + return res diff --git a/slither/slither.py b/slither/slither.py index 85f852e1d..747d2207e 100644 --- a/slither/slither.py +++ b/slither/slither.py @@ -11,7 +11,9 @@ from slither.detectors.abstract_detector import AbstractDetector, DetectorClassi from slither.exceptions import SlitherError 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") logging.basicConfig() @@ -48,7 +50,9 @@ def _update_file_scopes(candidates: ValuesView[FileScope]): learned_something = False -class Slither(SlitherCore): # pylint: disable=too-many-instance-attributes +class Slither( + SlitherCore +): # pylint: disable=too-many-instance-attributes,too-many-locals,too-many-statements def __init__(self, target: Union[str, CryticCompile], **kwargs) -> None: """ Args: @@ -62,16 +66,6 @@ class Slither(SlitherCore): # pylint: disable=too-many-instance-attributes triage_mode (bool): if true, switch to triage mode (default false) exclude_dependencies (bool): if true, exclude results that are only related to dependencies generate_patches (bool): if true, patches are generated (json output only) - - truffle_ignore (bool): ignore truffle.js presence (default false) - truffle_build_directory (str): build truffle directory (default 'build/contracts') - truffle_ignore_compile (bool): do not run truffle compile (default False) - truffle_version (str): use a specific truffle version (default None) - - embark_ignore (bool): ignore embark.js presence (default false) - embark_ignore_compile (bool): do not run embark build (default False) - embark_overwrite_config (bool): overwrite original config file (default false) - change_line_prefix (str): Change the line prefix (default #) for the displayed source codes (i.e. file.sol#1). @@ -108,13 +102,23 @@ class Slither(SlitherCore): # pylint: disable=too-many-instance-attributes for compilation_unit in crytic_compile.compilation_units.values(): compilation_unit_slither = SlitherCompilationUnit(self, compilation_unit) self._compilation_units.append(compilation_unit_slither) - parser = SlitherCompilationUnitSolc(compilation_unit_slither) - self._parsers.append(parser) - for path, ast in compilation_unit.asts.items(): - parser.parse_top_level_from_loaded_json(ast, path) - self.add_source_code(path) - _update_file_scopes(compilation_unit_slither.scopes.values()) + if compilation_unit_slither.is_vyper: + vyper_parser = VyperCompilationUnit(compilation_unit_slither) + for path, ast in compilation_unit.asts.items(): + ast_nodes = parse(ast["ast"]) + vyper_parser.parse_module(ast_nodes, path) + self._parsers.append(vyper_parser) + else: + # Solidity specific + assert compilation_unit_slither.is_solidity + sol_parser = SlitherCompilationUnitSolc(compilation_unit_slither) + self._parsers.append(sol_parser) + for path, ast in compilation_unit.asts.items(): + sol_parser.parse_top_level_items(ast, path) + self.add_source_code(path) + + _update_file_scopes(compilation_unit_slither.scopes.values()) if kwargs.get("generate_patches", False): self.generate_patches = True @@ -132,6 +136,11 @@ class Slither(SlitherCore): # pylint: disable=too-many-instance-attributes triage_mode = kwargs.get("triage_mode", False) self._triage_mode = triage_mode + + printers_to_run = kwargs.get("printers_to_run", "") + if printers_to_run == "echidna": + self.skip_data_dependency = True + self._init_parsing_and_analyses(kwargs.get("skip_analyze", False)) def _init_parsing_and_analyses(self, skip_analyze: bool) -> None: diff --git a/slither/slithir/convert.py b/slither/slithir/convert.py index 665a7c8f9..170df8cba 100644 --- a/slither/slithir/convert.py +++ b/slither/slithir/convert.py @@ -114,8 +114,8 @@ def convert_expression(expression: Expression, node: "Node") -> List[Operation]: visitor = ExpressionToSlithIR(expression, node) result = visitor.result() - - result = apply_ir_heuristics(result, node) + is_solidity = node.compilation_unit.is_solidity + result = apply_ir_heuristics(result, node, is_solidity) if result: if node.type in [NodeType.IF, NodeType.IFLOOP]: @@ -385,6 +385,70 @@ def integrate_value_gas(result: List[Operation]) -> List[Operation]: ################################################################################### +def get_declared_param_names( + ins: Union[ + NewStructure, + NewContract, + InternalCall, + LibraryCall, + HighLevelCall, + InternalDynamicCall, + EventCall, + ] +) -> Optional[List[str]]: + """ + Given a call operation, return the list of parameter names, in the order + listed in the function declaration. + #### Parameters + ins - + The call instruction + #### Possible Returns + List[str] - + A list of the parameters in declaration order + None - + Workaround: Unable to obtain list of parameters in declaration order + """ + if isinstance(ins, NewStructure): + return [x.name for x in ins.structure.elems_ordered if not isinstance(x.type, MappingType)] + if isinstance(ins, (InternalCall, LibraryCall, HighLevelCall)): + if isinstance(ins.function, Function): + return [p.name for p in ins.function.parameters] + return None + if isinstance(ins, InternalDynamicCall): + return [p.name for p in ins.function_type.params] + + assert isinstance(ins, (EventCall, NewContract)) + return None + + +def reorder_arguments( + args: List[Variable], call_names: List[str], decl_names: List[str] +) -> List[Variable]: + """ + Reorder named struct constructor arguments so that they match struct declaration ordering rather + than call ordering + E.g. for `struct S { int x; int y; }` we reorder `S({y : 2, x : 3})` to `S(3, 2)` + #### Parameters + args - + Arguments to constructor call, in call order + names - + Parameter names in call order + decl_names - + Parameter names in declaration order + #### Returns + Reordered arguments to constructor call, now in declaration order + """ + assert len(args) == len(call_names) + assert len(call_names) == len(decl_names) + + args_ret = [] + for n in decl_names: + ind = call_names.index(n) + args_ret.append(args[ind]) + + return args_ret + + def propagate_type_and_convert_call(result: List[Operation], node: "Node") -> List[Operation]: """ Propagate the types variables and convert tmp call to real call operation @@ -434,6 +498,23 @@ def propagate_type_and_convert_call(result: List[Operation], node: "Node") -> Li if ins.call_id in calls_gas and isinstance(ins, (HighLevelCall, InternalDynamicCall)): ins.call_gas = calls_gas[ins.call_id] + if isinstance(ins, Call) and (ins.names is not None): + assert isinstance( + ins, + ( + NewStructure, + NewContract, + InternalCall, + LibraryCall, + HighLevelCall, + InternalDynamicCall, + EventCall, + ), + ) + decl_param_names = get_declared_param_names(ins) + if decl_param_names is not None: + call_data = reorder_arguments(call_data, ins.names, decl_param_names) + if isinstance(ins, (Call, NewContract, NewStructure)): # We might have stored some arguments for libraries if ins.arguments: @@ -549,6 +630,17 @@ def propagate_types(ir: Operation, node: "Node"): # pylint: disable=too-many-lo if new_ir: return new_ir + # convert library function when used with "this" + if ( + isinstance(t, ElementaryType) + and t.name == "address" + and ir.destination.name == "this" + and UserDefinedType(node_function.contract) in using_for + ): + new_ir = convert_to_library_or_top_level(ir, node, using_for) + if new_ir: + return new_ir + if isinstance(t, UserDefinedType): # UserdefinedType t_type = t.type @@ -576,7 +668,9 @@ def propagate_types(ir: Operation, node: "Node"): # pylint: disable=too-many-lo if isinstance(t, ArrayType) or ( isinstance(t, ElementaryType) and t.type == "bytes" ): - if ir.function_name == "push" and len(ir.arguments) <= 1: + # Solidity uses push + # Vyper uses append + if ir.function_name in ["push", "append"] and len(ir.arguments) <= 1: return convert_to_push(ir, node) if ir.function_name == "pop" and len(ir.arguments) == 0: return convert_to_pop(ir, node) @@ -855,7 +949,7 @@ def extract_tmp_call(ins: TmpCall, contract: Optional[Contract]) -> Union[Call, if isinstance(ins.ori.variable_left, Contract): st = ins.ori.variable_left.get_structure_from_name(ins.ori.variable_right) if st: - op = NewStructure(st, ins.lvalue) + op = NewStructure(st, ins.lvalue, names=ins.names) op.set_expression(ins.expression) op.call_id = ins.call_id return op @@ -892,6 +986,7 @@ def extract_tmp_call(ins: TmpCall, contract: Optional[Contract]) -> Union[Call, ins.nbr_arguments, ins.lvalue, ins.type_call, + names=ins.names, ) libcall.set_expression(ins.expression) libcall.call_id = ins.call_id @@ -950,6 +1045,7 @@ def extract_tmp_call(ins: TmpCall, contract: Optional[Contract]) -> Union[Call, len(lib_func.parameters), ins.lvalue, "d", + names=ins.names, ) lib_call.set_expression(ins.expression) lib_call.set_node(ins.node) @@ -1031,6 +1127,7 @@ def extract_tmp_call(ins: TmpCall, contract: Optional[Contract]) -> Union[Call, ins.nbr_arguments, ins.lvalue, ins.type_call, + names=ins.names, ) msgcall.call_id = ins.call_id @@ -1082,7 +1179,7 @@ def extract_tmp_call(ins: TmpCall, contract: Optional[Contract]) -> Union[Call, return n if isinstance(ins.called, Structure): - op = NewStructure(ins.called, ins.lvalue) + op = NewStructure(ins.called, ins.lvalue, names=ins.names) op.set_expression(ins.expression) op.call_id = ins.call_id op.set_expression(ins.expression) @@ -1106,7 +1203,7 @@ def extract_tmp_call(ins: TmpCall, contract: Optional[Contract]) -> Union[Call, if len(ins.called.constructor.parameters) != ins.nbr_arguments: return Nop() internalcall = InternalCall( - ins.called.constructor, ins.nbr_arguments, ins.lvalue, ins.type_call + ins.called.constructor, ins.nbr_arguments, ins.lvalue, ins.type_call, ins.names ) internalcall.call_id = ins.call_id internalcall.set_expression(ins.expression) @@ -1131,6 +1228,7 @@ def can_be_low_level(ir: HighLevelCall) -> bool: "delegatecall", "callcode", "staticcall", + "raw_call", ] @@ -1159,13 +1257,14 @@ def convert_to_low_level( ir.set_node(prev_ir.node) ir.lvalue.set_type(ElementaryType("bool")) return ir - if ir.function_name in ["call", "delegatecall", "callcode", "staticcall"]: + if ir.function_name in ["call", "delegatecall", "callcode", "staticcall", "raw_call"]: new_ir = LowLevelCall( ir.destination, ir.function_name, ir.nbr_arguments, ir.lvalue, ir.type_call ) new_ir.call_gas = ir.call_gas new_ir.call_value = ir.call_value new_ir.arguments = ir.arguments + # TODO fix this for Vyper if ir.node.compilation_unit.solc_version >= "0.5": new_ir.lvalue.set_type([ElementaryType("bool"), ElementaryType("bytes")]) else: @@ -1210,7 +1309,12 @@ def convert_to_solidity_func( and len(new_ir.arguments) == 2 and isinstance(new_ir.arguments[1], list) ): - types = list(new_ir.arguments[1]) + types = [] + for arg_type in new_ir.arguments[1]: + decode_type = arg_type + if isinstance(decode_type, (Structure, Enum, Contract)): + decode_type = UserDefinedType(decode_type) + types.append(decode_type) new_ir.lvalue.set_type(types) # abi.decode where the type to decode is a singleton # abi.decode(a, (uint)) @@ -1363,11 +1467,12 @@ def convert_to_pop(ir: HighLevelCall, node: "Node") -> List[Operation]: # TODO the following is equivalent to length.points_to = arr # Should it be removed? ir_length.lvalue.points_to = arr - # Note bytes is an ElementaryType not ArrayType so in that case we use ir.destination.type + # Note bytes is an ElementaryType not ArrayType and bytes1 should be returned + # since bytes is bytes1[] without padding between the elements # while in other cases such as uint256[] (ArrayType) we use ir.destination.type.type # in this way we will have the type always set to the corresponding ElementaryType element_to_delete.set_type( - ir.destination.type + ElementaryType("bytes1") if isinstance(ir.destination.type, ElementaryType) else ir.destination.type.type ) @@ -1439,6 +1544,7 @@ def look_for_library_or_top_level( ir.nbr_arguments, ir.lvalue, ir.type_call, + names=ir.names, ) lib_call.set_expression(ir.expression) lib_call.set_node(ir.node) @@ -1469,6 +1575,18 @@ def convert_to_library_or_top_level( if new_ir: return new_ir + if ( + isinstance(t, ElementaryType) + and t.name == "address" + and ir.destination.name == "this" + and UserDefinedType(node.function.contract) in using_for + ): + new_ir = look_for_library_or_top_level( + contract, ir, using_for, UserDefinedType(node.function.contract) + ) + if new_ir: + return new_ir + return None @@ -1583,7 +1701,9 @@ def _convert_to_structure_to_list(return_type: Type) -> List[Type]: # } if isinstance(return_type, (MappingType, ArrayType)): return [] - return [return_type.type] + + assert isinstance(return_type, (ElementaryType, UserDefinedType, TypeAlias)) + return [return_type] def convert_type_of_high_and_internal_level_call( @@ -1854,7 +1974,7 @@ def convert_constant_types(irs: List[Operation]) -> None: if isinstance(ir.lvalue.type.type, ElementaryType): if ir.lvalue.type.type.type in ElementaryTypeInt: for r in ir.read: - if r.type.type not in ElementaryTypeInt: + if r.type.type.type not in ElementaryTypeInt: r.set_type(ElementaryType(ir.lvalue.type.type.type)) was_changed = True @@ -1903,7 +2023,7 @@ def _find_source_mapping_references(irs: List[Operation]) -> None: ################################################################################### -def apply_ir_heuristics(irs: List[Operation], node: "Node") -> List[Operation]: +def apply_ir_heuristics(irs: List[Operation], node: "Node", is_solidity: bool) -> List[Operation]: """ Apply a set of heuristic to improve slithIR """ @@ -1913,8 +2033,11 @@ def apply_ir_heuristics(irs: List[Operation], node: "Node") -> List[Operation]: irs = propagate_type_and_convert_call(irs, node) irs = remove_unused(irs) find_references_origin(irs) - convert_constant_types(irs) - convert_delete(irs) + + # These are heuristics that are only applied to Solidity + if is_solidity: + convert_constant_types(irs) + convert_delete(irs) _find_source_mapping_references(irs) diff --git a/slither/slithir/operations/call.py b/slither/slithir/operations/call.py index 816c56e1d..a4f9f6d72 100644 --- a/slither/slithir/operations/call.py +++ b/slither/slithir/operations/call.py @@ -6,9 +6,25 @@ from slither.slithir.operations.operation import Operation class Call(Operation): - def __init__(self) -> None: + def __init__(self, names: Optional[List[str]] = None) -> None: + """ + #### Parameters + names - + For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. + Otherwise, None. + """ + assert (names is None) or isinstance(names, list) super().__init__() self._arguments: List[Variable] = [] + self._names = names + + @property + def names(self) -> Optional[List[str]]: + """ + For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. + Otherwise, None. + """ + return self._names @property def arguments(self) -> List[Variable]: diff --git a/slither/slithir/operations/high_level_call.py b/slither/slithir/operations/high_level_call.py index 5d654fc80..c60443f19 100644 --- a/slither/slithir/operations/high_level_call.py +++ b/slither/slithir/operations/high_level_call.py @@ -28,11 +28,18 @@ class HighLevelCall(Call, OperationWithLValue): nbr_arguments: int, result: Optional[Union[TemporaryVariable, TupleVariable, TemporaryVariableSSA]], type_call: str, + names: Optional[List[str]] = None, ) -> None: + """ + #### Parameters + names - + For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. + Otherwise, None. + """ assert isinstance(function_name, Constant) assert is_valid_lvalue(result) or result is None self._check_destination(destination) - super().__init__() + super().__init__(names=names) # Contract is only possible for library call, which inherits from highlevelcall self._destination: Union[Variable, SolidityVariable, Contract] = destination # type: ignore self._function_name = function_name diff --git a/slither/slithir/operations/index.py b/slither/slithir/operations/index.py index f38a25927..4fcfb8a6d 100644 --- a/slither/slithir/operations/index.py +++ b/slither/slithir/operations/index.py @@ -3,6 +3,7 @@ from typing import List, Union from slither.core.declarations import SolidityVariableComposed from slither.core.source_mapping.source_mapping import SourceMapping from slither.core.variables.variable import Variable +from slither.core.variables.top_level_variable import TopLevelVariable from slither.slithir.operations.lvalue import OperationWithLValue from slither.slithir.utils.utils import is_valid_lvalue, is_valid_rvalue, RVALUE, LVALUE from slither.slithir.variables.reference import ReferenceVariable @@ -13,8 +14,10 @@ class Index(OperationWithLValue): self, result: ReferenceVariable, left_variable: Variable, right_variable: RVALUE ) -> None: super().__init__() - assert is_valid_lvalue(left_variable) or left_variable == SolidityVariableComposed( - "msg.data" + assert ( + is_valid_lvalue(left_variable) + or left_variable == SolidityVariableComposed("msg.data") + or isinstance(left_variable, TopLevelVariable) ) assert is_valid_rvalue(right_variable) assert isinstance(result, ReferenceVariable) diff --git a/slither/slithir/operations/init_array.py b/slither/slithir/operations/init_array.py index e0754c770..ec2a63ef0 100644 --- a/slither/slithir/operations/init_array.py +++ b/slither/slithir/operations/init_array.py @@ -44,4 +44,4 @@ class InitArray(OperationWithLValue): return f"{elem}({elem.type})" init_values = convert(self.init_values) - return f"{self.lvalue}({self.lvalue.type}) = {init_values}" + return f"{self.lvalue}({self.lvalue.type}) = {init_values}" diff --git a/slither/slithir/operations/internal_call.py b/slither/slithir/operations/internal_call.py index 1983b885f..06e75136e 100644 --- a/slither/slithir/operations/internal_call.py +++ b/slither/slithir/operations/internal_call.py @@ -20,8 +20,16 @@ class InternalCall(Call, OperationWithLValue): # pylint: disable=too-many-insta Union[TupleVariableSSA, TemporaryVariableSSA, TupleVariable, TemporaryVariable] ], type_call: str, + names: Optional[List[str]] = None, ) -> None: - super().__init__() + # pylint: disable=too-many-arguments + """ + #### Parameters + names - + For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. + Otherwise, None. + """ + super().__init__(names=names) self._contract_name = "" if isinstance(function, Function): self._function: Optional[Function] = function diff --git a/slither/slithir/operations/new_array.py b/slither/slithir/operations/new_array.py index 39b989459..917bb11ee 100644 --- a/slither/slithir/operations/new_array.py +++ b/slither/slithir/operations/new_array.py @@ -33,4 +33,4 @@ class NewArray(Call, OperationWithLValue): def __str__(self): args = [str(a) for a in self.arguments] lvalue = self.lvalue - return f"{lvalue}{lvalue.type}) = new {self.array_type}({','.join(args)})" + return f"{lvalue}({lvalue.type}) = new {self.array_type}({','.join(args)})" diff --git a/slither/slithir/operations/new_contract.py b/slither/slithir/operations/new_contract.py index 518a097cb..9ed00b1ac 100644 --- a/slither/slithir/operations/new_contract.py +++ b/slither/slithir/operations/new_contract.py @@ -12,11 +12,20 @@ from slither.slithir.variables.temporary_ssa import TemporaryVariableSSA class NewContract(Call, OperationWithLValue): # pylint: disable=too-many-instance-attributes def __init__( - self, contract_name: Constant, lvalue: Union[TemporaryVariableSSA, TemporaryVariable] + self, + contract_name: Constant, + lvalue: Union[TemporaryVariableSSA, TemporaryVariable], + names: Optional[List[str]] = None, ) -> None: + """ + #### Parameters + names - + For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. + Otherwise, None. + """ assert isinstance(contract_name, Constant) assert is_valid_lvalue(lvalue) - super().__init__() + super().__init__(names=names) self._contract_name = contract_name # todo create analyze to add the contract instance self._lvalue = lvalue diff --git a/slither/slithir/operations/new_structure.py b/slither/slithir/operations/new_structure.py index c50cd6a3e..2aaba28ff 100644 --- a/slither/slithir/operations/new_structure.py +++ b/slither/slithir/operations/new_structure.py @@ -1,4 +1,4 @@ -from typing import List, Union +from typing import List, Optional, Union from slither.slithir.operations.call import Call from slither.slithir.operations.lvalue import OperationWithLValue @@ -17,8 +17,15 @@ class NewStructure(Call, OperationWithLValue): self, structure: StructureContract, lvalue: Union[TemporaryVariableSSA, TemporaryVariable], + names: Optional[List[str]] = None, ) -> None: - super().__init__() + """ + #### Parameters + names - + For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. + Otherwise, None. + """ + super().__init__(names=names) assert isinstance(structure, Structure) assert is_valid_lvalue(lvalue) self._structure = structure diff --git a/slither/slithir/operations/type_conversion.py b/slither/slithir/operations/type_conversion.py index e9998bc65..08b87ab49 100644 --- a/slither/slithir/operations/type_conversion.py +++ b/slither/slithir/operations/type_conversion.py @@ -4,6 +4,7 @@ from slither.core.declarations import Contract from slither.core.solidity_types.elementary_type import ElementaryType from slither.core.solidity_types.type_alias import TypeAlias from slither.core.solidity_types.user_defined_type import UserDefinedType +from slither.core.solidity_types.array_type import ArrayType from slither.core.source_mapping.source_mapping import SourceMapping from slither.slithir.operations.lvalue import OperationWithLValue from slither.slithir.utils.utils import is_valid_lvalue, is_valid_rvalue @@ -21,10 +22,10 @@ class TypeConversion(OperationWithLValue): super().__init__() assert is_valid_rvalue(variable) or isinstance(variable, Contract) assert is_valid_lvalue(result) - assert isinstance(variable_type, (TypeAlias, UserDefinedType, ElementaryType)) + assert isinstance(variable_type, (TypeAlias, UserDefinedType, ElementaryType, ArrayType)) self._variable = variable - self._type: Union[TypeAlias, UserDefinedType, ElementaryType] = variable_type + self._type: Union[TypeAlias, UserDefinedType, ElementaryType, ArrayType] = variable_type self._lvalue = result @property diff --git a/slither/slithir/operations/unary.py b/slither/slithir/operations/unary.py index c6493921d..72e7ac63a 100644 --- a/slither/slithir/operations/unary.py +++ b/slither/slithir/operations/unary.py @@ -5,7 +5,6 @@ from enum import Enum from slither.slithir.operations.lvalue import OperationWithLValue from slither.slithir.utils.utils import is_valid_lvalue, is_valid_rvalue from slither.slithir.exceptions import SlithIRError -from slither.core.expressions.unary_operation import UnaryOperationType from slither.core.variables.local_variable import LocalVariable from slither.slithir.variables.constant import Constant from slither.slithir.variables.local_variable import LocalIRVariable @@ -35,7 +34,7 @@ class Unary(OperationWithLValue): self, result: Union[TemporaryVariableSSA, TemporaryVariable], variable: Union[Constant, LocalIRVariable, LocalVariable], - operation_type: UnaryOperationType, + operation_type: UnaryType, ) -> None: assert is_valid_rvalue(variable) assert is_valid_lvalue(result) @@ -53,7 +52,7 @@ class Unary(OperationWithLValue): return self._variable @property - def type(self) -> UnaryOperationType: + def type(self) -> UnaryType: return self._type @property diff --git a/slither/slithir/tmp_operations/tmp_call.py b/slither/slithir/tmp_operations/tmp_call.py index 2137ebd81..a7bd614c7 100644 --- a/slither/slithir/tmp_operations/tmp_call.py +++ b/slither/slithir/tmp_operations/tmp_call.py @@ -1,4 +1,4 @@ -from typing import Optional, Union +from typing import List, Optional, Union from slither.core.declarations import ( Event, @@ -25,7 +25,15 @@ class TmpCall(OperationWithLValue): # pylint: disable=too-many-instance-attribu nbr_arguments: int, result: Union[TupleVariable, TemporaryVariable], type_call: str, + names: Optional[List[str]] = None, ) -> None: + # pylint: disable=too-many-arguments + """ + #### Parameters + names - + For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. + Otherwise, None. + """ assert isinstance( called, ( @@ -42,6 +50,7 @@ class TmpCall(OperationWithLValue): # pylint: disable=too-many-instance-attribu self._called = called self._nbr_arguments = nbr_arguments self._type_call = type_call + self._names = names self._lvalue = result self._ori = None # self._callid = None @@ -49,6 +58,14 @@ class TmpCall(OperationWithLValue): # pylint: disable=too-many-instance-attribu self._value = None self._salt = None + @property + def names(self) -> Optional[List[str]]: + """ + For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. + Otherwise, None. + """ + return self._names + @property def call_value(self): return self._value diff --git a/slither/slithir/utils/ssa.py b/slither/slithir/utils/ssa.py index 4c958798b..ef908820e 100644 --- a/slither/slithir/utils/ssa.py +++ b/slither/slithir/utils/ssa.py @@ -735,12 +735,17 @@ def copy_ir(ir: Operation, *instances) -> Operation: destination = get_variable(ir, lambda x: x.destination, *instances) function_name = ir.function_name nbr_arguments = ir.nbr_arguments + names = ir.names lvalue = get_variable(ir, lambda x: x.lvalue, *instances) type_call = ir.type_call if isinstance(ir, LibraryCall): - new_ir = LibraryCall(destination, function_name, nbr_arguments, lvalue, type_call) + new_ir = LibraryCall( + destination, function_name, nbr_arguments, lvalue, type_call, names=names + ) else: - new_ir = HighLevelCall(destination, function_name, nbr_arguments, lvalue, type_call) + new_ir = HighLevelCall( + destination, function_name, nbr_arguments, lvalue, type_call, names=names + ) new_ir.call_id = ir.call_id new_ir.call_value = get_variable(ir, lambda x: x.call_value, *instances) new_ir.call_gas = get_variable(ir, lambda x: x.call_gas, *instances) @@ -761,7 +766,8 @@ def copy_ir(ir: Operation, *instances) -> Operation: nbr_arguments = ir.nbr_arguments lvalue = get_variable(ir, lambda x: x.lvalue, *instances) type_call = ir.type_call - new_ir = InternalCall(function, nbr_arguments, lvalue, type_call) + names = ir.names + new_ir = InternalCall(function, nbr_arguments, lvalue, type_call, names=names) new_ir.arguments = get_arguments(ir, *instances) return new_ir if isinstance(ir, InternalDynamicCall): @@ -811,7 +817,8 @@ def copy_ir(ir: Operation, *instances) -> Operation: if isinstance(ir, NewStructure): structure = ir.structure lvalue = get_variable(ir, lambda x: x.lvalue, *instances) - new_ir = NewStructure(structure, lvalue) + names = ir.names + new_ir = NewStructure(structure, lvalue, names=names) new_ir.arguments = get_arguments(ir, *instances) return new_ir if isinstance(ir, Nop): diff --git a/slither/slithir/variables/constant.py b/slither/slithir/variables/constant.py index 5321e5250..19aaaa893 100644 --- a/slither/slithir/variables/constant.py +++ b/slither/slithir/variables/constant.py @@ -11,7 +11,7 @@ from slither.utils.integer_conversion import convert_string_to_int class Constant(SlithIRVariable): def __init__( self, - val: Union[int, str], + val: str, constant_type: Optional[ElementaryType] = None, subdenomination: Optional[str] = None, ) -> None: # pylint: disable=too-many-branches diff --git a/slither/slithir/variables/reference.py b/slither/slithir/variables/reference.py index 9ab51be65..2f99d322e 100644 --- a/slither/slithir/variables/reference.py +++ b/slither/slithir/variables/reference.py @@ -2,6 +2,7 @@ from typing import Optional, TYPE_CHECKING from slither.core.declarations import Contract, Enum, SolidityVariable, Function from slither.core.variables.variable import Variable +from slither.core.variables.top_level_variable import TopLevelVariable if TYPE_CHECKING: from slither.core.cfg.node import Node @@ -46,7 +47,7 @@ class ReferenceVariable(Variable): from slither.slithir.utils.utils import is_valid_lvalue assert is_valid_lvalue(points_to) or isinstance( - points_to, (SolidityVariable, Contract, Enum) + points_to, (SolidityVariable, Contract, Enum, TopLevelVariable) ) self._points_to = points_to diff --git a/slither/solc_parsing/declarations/contract.py b/slither/solc_parsing/declarations/contract.py index 74a1cbcf0..34e2f2430 100644 --- a/slither/solc_parsing/declarations/contract.py +++ b/slither/solc_parsing/declarations/contract.py @@ -4,7 +4,7 @@ from typing import Any, List, Dict, Callable, TYPE_CHECKING, Union, Set, Sequenc from slither.core.declarations import ( Modifier, - Event, + EventContract, EnumContract, StructureContract, Function, @@ -291,10 +291,10 @@ class ContractSolc(CallerContextExpression): alias = item["name"] alias_canonical = self._contract.name + "." + item["name"] - user_defined_type = TypeAliasContract(original_type, alias, self.underlying_contract) - user_defined_type.set_offset(item["src"], self.compilation_unit) - self._contract.file_scope.user_defined_types[alias] = user_defined_type - self._contract.file_scope.user_defined_types[alias_canonical] = user_defined_type + type_alias = TypeAliasContract(original_type, alias, self.underlying_contract) + type_alias.set_offset(item["src"], self.compilation_unit) + self._contract.type_aliases_as_dict[alias] = type_alias + self._contract.file_scope.type_aliases[alias_canonical] = type_alias def _parse_struct(self, struct: Dict) -> None: @@ -319,7 +319,7 @@ class ContractSolc(CallerContextExpression): ce.set_contract(self._contract) ce.set_offset(custom_error["src"], self.compilation_unit) - ce_parser = CustomErrorSolc(ce, custom_error, self._slither_parser) + ce_parser = CustomErrorSolc(ce, custom_error, self, self._slither_parser) self._contract.custom_errors_as_dict[ce.name] = ce self._custom_errors_parser.append(ce_parser) @@ -357,6 +357,8 @@ class ContractSolc(CallerContextExpression): self._variables_parser.append(var_parser) assert var.name + if var_parser.reference_id is not None: + self._contract.state_variables_by_ref_id[var_parser.reference_id] = var self._contract.variables_as_dict[var.name] = var self._contract.add_variables_ordered([var]) @@ -745,12 +747,12 @@ class ContractSolc(CallerContextExpression): self._contract.events_as_dict.update(father.events_as_dict) for event_to_parse in self._eventsNotParsed: - event = Event() + event = EventContract() event.set_contract(self._contract) event.set_offset(event_to_parse["src"], self._contract.compilation_unit) - event_parser = EventSolc(event, event_to_parse, self) # type: ignore - event_parser.analyze(self) # type: ignore + event_parser = EventSolc(event, event_to_parse, self._slither_parser) # type: ignore + event_parser.analyze() # type: ignore self._contract.events_as_dict[event.full_name] = event except (VariableNotFound, KeyError) as e: self.log_incorrect_parsing(f"Missing event {e}") diff --git a/slither/solc_parsing/declarations/custom_error.py b/slither/solc_parsing/declarations/custom_error.py index 8cd459262..34b7ca402 100644 --- a/slither/solc_parsing/declarations/custom_error.py +++ b/slither/solc_parsing/declarations/custom_error.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Dict +from typing import TYPE_CHECKING, Dict, Optional from slither.core.declarations.custom_error import CustomError from slither.core.declarations.custom_error_contract import CustomErrorContract @@ -10,6 +10,7 @@ from slither.solc_parsing.variables.local_variable import LocalVariableSolc if TYPE_CHECKING: from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc from slither.core.compilation_unit import SlitherCompilationUnit + from slither.solc_parsing.declarations.contract import ContractSolc # Part of the code was copied from the function parsing @@ -21,11 +22,13 @@ class CustomErrorSolc(CallerContextExpression): self, custom_error: CustomError, custom_error_data: dict, + contract_parser: Optional["ContractSolc"], slither_parser: "SlitherCompilationUnitSolc", ) -> None: self._slither_parser: "SlitherCompilationUnitSolc" = slither_parser self._custom_error = custom_error custom_error.name = custom_error_data["name"] + self._contract_parser = contract_parser self._params_was_analyzed = False if not self._slither_parser.is_compact_ast: @@ -56,6 +59,10 @@ class CustomErrorSolc(CallerContextExpression): if params: self._parse_params(params) + @property + def contract_parser(self) -> Optional["ContractSolc"]: + return self._contract_parser + @property def is_compact_ast(self) -> bool: return self._slither_parser.is_compact_ast diff --git a/slither/solc_parsing/declarations/event.py b/slither/solc_parsing/declarations/event.py index 6531e6536..4a7d62389 100644 --- a/slither/solc_parsing/declarations/event.py +++ b/slither/solc_parsing/declarations/event.py @@ -8,7 +8,7 @@ from slither.solc_parsing.variables.event_variable import EventVariableSolc from slither.core.declarations.event import Event if TYPE_CHECKING: - from slither.solc_parsing.declarations.contract import ContractSolc + from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc class EventSolc: @@ -16,11 +16,12 @@ class EventSolc: Event class """ - def __init__(self, event: Event, event_data: Dict, contract_parser: "ContractSolc") -> None: + def __init__( + self, event: Event, event_data: Dict, slither_parser: "SlitherCompilationUnitSolc" + ) -> None: self._event = event - event.set_contract(contract_parser.underlying_contract) - self._parser_contract = contract_parser + self._slither_parser = slither_parser if self.is_compact_ast: self._event.name = event_data["name"] @@ -41,18 +42,16 @@ class EventSolc: @property def is_compact_ast(self) -> bool: - return self._parser_contract.is_compact_ast + return self._slither_parser.is_compact_ast - def analyze(self, contract: "ContractSolc") -> None: + def analyze(self) -> None: for elem_to_parse in self._elemsNotParsed: elem = EventVariable() # Todo: check if the source offset is always here if "src" in elem_to_parse: - elem.set_offset( - elem_to_parse["src"], self._parser_contract.underlying_contract.compilation_unit - ) + elem.set_offset(elem_to_parse["src"], self._slither_parser.compilation_unit) elem_parser = EventVariableSolc(elem, elem_to_parse) - elem_parser.analyze(contract) + elem_parser.analyze(self._slither_parser) self._event.elems.append(elem) diff --git a/slither/solc_parsing/declarations/function.py b/slither/solc_parsing/declarations/function.py index a7e2d5569..9b2f3e2ff 100644 --- a/slither/solc_parsing/declarations/function.py +++ b/slither/solc_parsing/declarations/function.py @@ -321,6 +321,9 @@ class FunctionSolc(CallerContextExpression): if return_ast: self._fix_implicit_return(return_ast) + if self._function.entry_point: + self._update_reachability(self._function.entry_point) + # endregion ################################################################################### ################################################################################### @@ -360,7 +363,7 @@ class FunctionSolc(CallerContextExpression): ################################################################################### ################################################################################### - def _parse_if(self, if_statement: Dict, node: NodeSolc) -> NodeSolc: + def _parse_if(self, if_statement: Dict, node: NodeSolc, scope: Scope) -> NodeSolc: # IfStatement = 'if' '(' Expression ')' Statement ( 'else' Statement )? falseStatement = None @@ -368,21 +371,15 @@ class FunctionSolc(CallerContextExpression): condition = if_statement["condition"] # Note: check if the expression could be directly # parsed here - condition_node = self._new_node( - NodeType.IF, condition["src"], node.underlying_node.scope - ) + condition_node = self._new_node(NodeType.IF, condition["src"], scope) condition_node.add_unparsed_expression(condition) link_underlying_nodes(node, condition_node) - true_scope = Scope( - node.underlying_node.scope.is_checked, False, node.underlying_node.scope - ) + true_scope = Scope(scope.is_checked, False, scope) trueStatement = self._parse_statement( if_statement["trueBody"], condition_node, true_scope ) if "falseBody" in if_statement and if_statement["falseBody"]: - false_scope = Scope( - node.underlying_node.scope.is_checked, False, node.underlying_node.scope - ) + false_scope = Scope(scope.is_checked, False, scope) falseStatement = self._parse_statement( if_statement["falseBody"], condition_node, false_scope ) @@ -391,22 +388,16 @@ class FunctionSolc(CallerContextExpression): condition = children[0] # Note: check if the expression could be directly # parsed here - condition_node = self._new_node( - NodeType.IF, condition["src"], node.underlying_node.scope - ) + condition_node = self._new_node(NodeType.IF, condition["src"], scope) condition_node.add_unparsed_expression(condition) link_underlying_nodes(node, condition_node) - true_scope = Scope( - node.underlying_node.scope.is_checked, False, node.underlying_node.scope - ) + true_scope = Scope(scope.is_checked, False, scope) trueStatement = self._parse_statement(children[1], condition_node, true_scope) if len(children) == 3: - false_scope = Scope( - node.underlying_node.scope.is_checked, False, node.underlying_node.scope - ) + false_scope = Scope(scope.is_checked, False, scope) falseStatement = self._parse_statement(children[2], condition_node, false_scope) - endIf_node = self._new_node(NodeType.ENDIF, if_statement["src"], node.underlying_node.scope) + endIf_node = self._new_node(NodeType.ENDIF, if_statement["src"], scope) link_underlying_nodes(trueStatement, endIf_node) if falseStatement: @@ -415,32 +406,26 @@ class FunctionSolc(CallerContextExpression): link_underlying_nodes(condition_node, endIf_node) return endIf_node - def _parse_while(self, whilte_statement: Dict, node: NodeSolc) -> NodeSolc: + def _parse_while(self, whilte_statement: Dict, node: NodeSolc, scope: Scope) -> NodeSolc: # WhileStatement = 'while' '(' Expression ')' Statement - node_startWhile = self._new_node( - NodeType.STARTLOOP, whilte_statement["src"], node.underlying_node.scope - ) + node_startWhile = self._new_node(NodeType.STARTLOOP, whilte_statement["src"], scope) - body_scope = Scope(node.underlying_node.scope.is_checked, False, node.underlying_node.scope) + body_scope = Scope(scope.is_checked, False, scope) if self.is_compact_ast: node_condition = self._new_node( - NodeType.IFLOOP, whilte_statement["condition"]["src"], node.underlying_node.scope + NodeType.IFLOOP, whilte_statement["condition"]["src"], scope ) node_condition.add_unparsed_expression(whilte_statement["condition"]) statement = self._parse_statement(whilte_statement["body"], node_condition, body_scope) else: children = whilte_statement[self.get_children("children")] expression = children[0] - node_condition = self._new_node( - NodeType.IFLOOP, expression["src"], node.underlying_node.scope - ) + node_condition = self._new_node(NodeType.IFLOOP, expression["src"], scope) node_condition.add_unparsed_expression(expression) statement = self._parse_statement(children[1], node_condition, body_scope) - node_endWhile = self._new_node( - NodeType.ENDLOOP, whilte_statement["src"], node.underlying_node.scope - ) + node_endWhile = self._new_node(NodeType.ENDLOOP, whilte_statement["src"], scope) link_underlying_nodes(node, node_startWhile) link_underlying_nodes(node_startWhile, node_condition) @@ -568,7 +553,7 @@ class FunctionSolc(CallerContextExpression): return pre, cond, post, body - def _parse_for(self, statement: Dict, node: NodeSolc) -> NodeSolc: + def _parse_for(self, statement: Dict, node: NodeSolc, scope: Scope) -> NodeSolc: # ForStatement = 'for' '(' (SimpleStatement)? ';' (Expression)? ';' (ExpressionStatement)? ')' Statement if self.is_compact_ast: @@ -576,17 +561,13 @@ class FunctionSolc(CallerContextExpression): else: pre, cond, post, body = self._parse_for_legacy_ast(statement) - node_startLoop = self._new_node( - NodeType.STARTLOOP, statement["src"], node.underlying_node.scope - ) - node_endLoop = self._new_node( - NodeType.ENDLOOP, statement["src"], node.underlying_node.scope - ) + node_startLoop = self._new_node(NodeType.STARTLOOP, statement["src"], scope) + node_endLoop = self._new_node(NodeType.ENDLOOP, statement["src"], scope) - last_scope = node.underlying_node.scope + last_scope = scope if pre: - pre_scope = Scope(node.underlying_node.scope.is_checked, False, last_scope) + pre_scope = Scope(scope.is_checked, False, last_scope) last_scope = pre_scope node_init_expression = self._parse_statement(pre, node, pre_scope) link_underlying_nodes(node_init_expression, node_startLoop) @@ -594,7 +575,7 @@ class FunctionSolc(CallerContextExpression): link_underlying_nodes(node, node_startLoop) if cond: - cond_scope = Scope(node.underlying_node.scope.is_checked, False, last_scope) + cond_scope = Scope(scope.is_checked, False, last_scope) last_scope = cond_scope node_condition = self._new_node(NodeType.IFLOOP, cond["src"], cond_scope) node_condition.add_unparsed_expression(cond) @@ -605,7 +586,7 @@ class FunctionSolc(CallerContextExpression): node_condition = None node_beforeBody = node_startLoop - body_scope = Scope(node.underlying_node.scope.is_checked, False, last_scope) + body_scope = Scope(scope.is_checked, False, last_scope) last_scope = body_scope node_body = self._parse_statement(body, node_beforeBody, body_scope) @@ -625,14 +606,10 @@ class FunctionSolc(CallerContextExpression): return node_endLoop - def _parse_dowhile(self, do_while_statement: Dict, node: NodeSolc) -> NodeSolc: + def _parse_dowhile(self, do_while_statement: Dict, node: NodeSolc, scope: Scope) -> NodeSolc: - node_startDoWhile = self._new_node( - NodeType.STARTLOOP, do_while_statement["src"], node.underlying_node.scope - ) - condition_scope = Scope( - node.underlying_node.scope.is_checked, False, node.underlying_node.scope - ) + node_startDoWhile = self._new_node(NodeType.STARTLOOP, do_while_statement["src"], scope) + condition_scope = Scope(scope.is_checked, False, scope) if self.is_compact_ast: node_condition = self._new_node( @@ -650,7 +627,7 @@ class FunctionSolc(CallerContextExpression): node_condition.add_unparsed_expression(expression) statement = self._parse_statement(children[1], node_condition, condition_scope) - body_scope = Scope(node.underlying_node.scope.is_checked, False, condition_scope) + body_scope = Scope(scope.is_checked, False, condition_scope) node_endDoWhile = self._new_node(NodeType.ENDLOOP, do_while_statement["src"], body_scope) link_underlying_nodes(node, node_startDoWhile) @@ -666,46 +643,124 @@ class FunctionSolc(CallerContextExpression): link_underlying_nodes(node_condition, node_endDoWhile) return node_endDoWhile - def _parse_try_catch(self, statement: Dict, node: NodeSolc) -> NodeSolc: + # pylint: disable=no-self-use + def _construct_try_expression(self, externalCall: Dict, parameters_list: Dict) -> Dict: + # if the parameters are more than 1 we make the leftHandSide of the Assignment node + # a TupleExpression otherwise an Identifier + + # case when there isn't returns(...) + # e.g. external call that doesn't have any return variable + if not parameters_list: + return externalCall + + ret: Dict = {"nodeType": "Assignment", "operator": "=", "src": parameters_list["src"]} + + parameters = parameters_list.get("parameters", None) + + # if the name is "" it means the return variable is not used + if len(parameters) == 1: + if parameters[0]["name"] != "": + self._add_param(parameters[0]) + ret["typeDescriptions"] = { + "typeString": parameters[0]["typeName"]["typeDescriptions"]["typeString"] + } + leftHandSide = { + "name": parameters[0]["name"], + "nodeType": "Identifier", + "src": parameters[0]["src"], + "referencedDeclaration": parameters[0]["id"], + "typeDescriptions": parameters[0]["typeDescriptions"], + } + else: + # we don't need an Assignment so we return only the external call + return externalCall + else: + ret["typeDescriptions"] = {"typeString": "tuple()"} + leftHandSide = { + "components": [], + "nodeType": "TupleExpression", + "src": parameters_list["src"], + } + + for i, p in enumerate(parameters): + if p["name"] == "": + continue + + new_statement = { + "nodeType": "VariableDefinitionStatement", + "src": p["src"], + "declarations": [p], + } + self._add_param_init_tuple(new_statement, i) + + ident = { + "name": p["name"], + "nodeType": "Identifier", + "src": p["src"], + "referencedDeclaration": p["id"], + "typeDescriptions": p["typeDescriptions"], + } + leftHandSide["components"].append(ident) + + ret["leftHandSide"] = leftHandSide + ret["rightHandSide"] = externalCall + + return ret + + def _parse_try_catch(self, statement: Dict, node: NodeSolc, scope: Scope) -> NodeSolc: externalCall = statement.get("externalCall", None) if externalCall is None: raise ParsingError(f"Try/Catch not correctly parsed by Slither {statement}") - catch_scope = Scope( - node.underlying_node.scope.is_checked, False, node.underlying_node.scope - ) + catch_scope = Scope(scope.is_checked, False, scope) new_node = self._new_node(NodeType.TRY, statement["src"], catch_scope) - new_node.add_unparsed_expression(externalCall) + clauses = statement.get("clauses", []) + # the first clause is the try scope + returned_variables = clauses[0].get("parameters", None) + constructed_try_expression = self._construct_try_expression( + externalCall, returned_variables + ) + new_node.add_unparsed_expression(constructed_try_expression) link_underlying_nodes(node, new_node) node = new_node - for clause in statement.get("clauses", []): - self._parse_catch(clause, node) + for index, clause in enumerate(clauses): + # clauses after the first one are related to catch cases + # we set the parameters (e.g. data in this case. catch(string memory data) ...) + # to be initialized so they are not reported by the uninitialized-local-variables detector + if index >= 1: + self._parse_catch(clause, node, catch_scope, True) + else: + # the parameters for the try scope were already added in _construct_try_expression + self._parse_catch(clause, node, catch_scope, False) return node - def _parse_catch(self, statement: Dict, node: NodeSolc) -> NodeSolc: + def _parse_catch( + self, statement: Dict, node: NodeSolc, scope: Scope, add_param: bool + ) -> NodeSolc: block = statement.get("block", None) if block is None: raise ParsingError(f"Catch not correctly parsed by Slither {statement}") - try_scope = Scope(node.underlying_node.scope.is_checked, False, node.underlying_node.scope) + try_scope = Scope(scope.is_checked, False, scope) try_node = self._new_node(NodeType.CATCH, statement["src"], try_scope) link_underlying_nodes(node, try_node) - if self.is_compact_ast: - params = statement.get("parameters", None) - else: - params = statement[self.get_children("children")] + if add_param: + if self.is_compact_ast: + params = statement.get("parameters", None) + else: + params = statement[self.get_children("children")] - if params: - for param in params.get("parameters", []): - assert param[self.get_key()] == "VariableDeclaration" - self._add_param(param) + if params: + for param in params.get("parameters", []): + assert param[self.get_key()] == "VariableDeclaration" + self._add_param(param, True) return self._parse_statement(block, try_node, try_scope) - def _parse_variable_definition(self, statement: Dict, node: NodeSolc) -> NodeSolc: + def _parse_variable_definition(self, statement: Dict, node: NodeSolc, scope: Scope) -> NodeSolc: try: local_var = LocalVariable() local_var.set_function(self._function) @@ -715,9 +770,7 @@ class FunctionSolc(CallerContextExpression): self._add_local_variable(local_var_parser) # local_var.analyze(self) - new_node = self._new_node( - NodeType.VARIABLE, statement["src"], node.underlying_node.scope - ) + new_node = self._new_node(NodeType.VARIABLE, statement["src"], scope) new_node.underlying_node.add_variable_declaration(local_var) link_underlying_nodes(node, new_node) return new_node @@ -747,7 +800,7 @@ class FunctionSolc(CallerContextExpression): "declarations": [variable], "initialValue": init, } - new_node = self._parse_variable_definition(new_statement, new_node) + new_node = self._parse_variable_definition(new_statement, new_node, scope) else: # If we have @@ -769,7 +822,7 @@ class FunctionSolc(CallerContextExpression): variables.append(variable) new_node = self._parse_variable_definition_init_tuple( - new_statement, i, new_node + new_statement, i, new_node, scope ) i = i + 1 @@ -801,9 +854,7 @@ class FunctionSolc(CallerContextExpression): "typeDescriptions": {"typeString": "tuple()"}, } node = new_node - new_node = self._new_node( - NodeType.EXPRESSION, statement["src"], node.underlying_node.scope - ) + new_node = self._new_node(NodeType.EXPRESSION, statement["src"], scope) new_node.add_unparsed_expression(expression) link_underlying_nodes(node, new_node) @@ -834,7 +885,7 @@ class FunctionSolc(CallerContextExpression): self.get_children("children"): [variable, init], } - new_node = self._parse_variable_definition(new_statement, new_node) + new_node = self._parse_variable_definition(new_statement, new_node, scope) else: # If we have # var (a, b) = f() @@ -853,7 +904,7 @@ class FunctionSolc(CallerContextExpression): variables.append(variable) new_node = self._parse_variable_definition_init_tuple( - new_statement, i, new_node + new_statement, i, new_node, scope ) i = i + 1 var_identifiers = [] @@ -883,16 +934,14 @@ class FunctionSolc(CallerContextExpression): ], } node = new_node - new_node = self._new_node( - NodeType.EXPRESSION, statement["src"], node.underlying_node.scope - ) + new_node = self._new_node(NodeType.EXPRESSION, statement["src"], scope) new_node.add_unparsed_expression(expression) link_underlying_nodes(node, new_node) return new_node def _parse_variable_definition_init_tuple( - self, statement: Dict, index: int, node: NodeSolc + self, statement: Dict, index: int, node: NodeSolc, scope ) -> NodeSolc: local_var = LocalVariableInitFromTuple() local_var.set_function(self._function) @@ -902,7 +951,7 @@ class FunctionSolc(CallerContextExpression): self._add_local_variable(local_var_parser) - new_node = self._new_node(NodeType.VARIABLE, statement["src"], node.underlying_node.scope) + new_node = self._new_node(NodeType.VARIABLE, statement["src"], scope) new_node.underlying_node.add_variable_declaration(local_var) link_underlying_nodes(node, new_node) return new_node @@ -923,15 +972,15 @@ class FunctionSolc(CallerContextExpression): name = statement[self.get_key()] # SimpleStatement = VariableDefinition | ExpressionStatement if name == "IfStatement": - node = self._parse_if(statement, node) + node = self._parse_if(statement, node, scope) elif name == "WhileStatement": - node = self._parse_while(statement, node) + node = self._parse_while(statement, node, scope) elif name == "ForStatement": - node = self._parse_for(statement, node) + node = self._parse_for(statement, node, scope) elif name == "Block": - node = self._parse_block(statement, node) + node = self._parse_block(statement, node, scope) elif name == "UncheckedBlock": - node = self._parse_unchecked_block(statement, node) + node = self._parse_unchecked_block(statement, node, scope) elif name == "InlineAssembly": # Added with solc 0.6 - the yul code is an AST if "AST" in statement and not self.compilation_unit.core.skip_assembly: @@ -943,7 +992,9 @@ class FunctionSolc(CallerContextExpression): # technically, entrypoint and exitpoint are YulNodes and we should be returning a NodeSolc here # but they both expose an underlying_node so oh well link_underlying_nodes(node, entrypoint) - node = exitpoint + end_assembly = self._new_node(NodeType.ENDASSEMBLY, statement["src"], scope) + link_underlying_nodes(exitpoint, end_assembly) + node = end_assembly else: asm_node = self._new_node(NodeType.ASSEMBLY, statement["src"], scope) self._function.contains_assembly = True @@ -953,7 +1004,7 @@ class FunctionSolc(CallerContextExpression): link_underlying_nodes(node, asm_node) node = asm_node elif name == "DoWhileStatement": - node = self._parse_dowhile(statement, node) + node = self._parse_dowhile(statement, node, scope) # For Continue / Break / Return / Throw # The is fixed later elif name == "Continue": @@ -994,7 +1045,7 @@ class FunctionSolc(CallerContextExpression): link_underlying_nodes(node, new_node) node = new_node elif name in ["VariableDefinitionStatement", "VariableDeclarationStatement"]: - node = self._parse_variable_definition(statement, node) + node = self._parse_variable_definition(statement, node, scope) elif name == "ExpressionStatement": # assert len(statement[self.get_children('expression')]) == 1 # assert not 'attributes' in statement @@ -1008,7 +1059,7 @@ class FunctionSolc(CallerContextExpression): link_underlying_nodes(node, new_node) node = new_node elif name == "TryStatement": - node = self._parse_try_catch(statement, node) + node = self._parse_try_catch(statement, node, scope) # elif name == 'TryCatchClause': # self._parse_catch(statement, node) elif name == "RevertStatement": @@ -1025,7 +1076,7 @@ class FunctionSolc(CallerContextExpression): return node - def _parse_block(self, block: Dict, node: NodeSolc, check_arithmetic: bool = False) -> NodeSolc: + def _parse_block(self, block: Dict, node: NodeSolc, scope: Scope) -> NodeSolc: """ Return: Node @@ -1037,13 +1088,12 @@ class FunctionSolc(CallerContextExpression): else: statements = block[self.get_children("children")] - check_arithmetic = check_arithmetic | node.underlying_node.scope.is_checked - new_scope = Scope(check_arithmetic, False, node.underlying_node.scope) + new_scope = Scope(scope.is_checked, False, scope) for statement in statements: node = self._parse_statement(statement, node, new_scope) return node - def _parse_unchecked_block(self, block: Dict, node: NodeSolc): + def _parse_unchecked_block(self, block: Dict, node: NodeSolc, scope): """ Return: Node @@ -1055,11 +1105,21 @@ class FunctionSolc(CallerContextExpression): else: statements = block[self.get_children("children")] - new_scope = Scope(False, False, node.underlying_node.scope) + new_scope = Scope(False, False, scope) + for statement in statements: node = self._parse_statement(statement, node, new_scope) return node + def _update_reachability(self, node: Node) -> None: + worklist = [node] + while worklist: + current = worklist.pop() + # fix point + if not current.is_reachable: + current.set_is_reachable(True) + worklist.extend(current.sons) + def _parse_cfg(self, cfg: Dict) -> None: assert cfg[self.get_key()] == "Block" @@ -1076,8 +1136,7 @@ class FunctionSolc(CallerContextExpression): self._function.is_empty = True else: self._function.is_empty = False - check_arithmetic = self.compilation_unit.solc_version >= "0.8.0" - self._parse_block(cfg, node, check_arithmetic=check_arithmetic) + self._parse_block(cfg, node, self.underlying_function) self._remove_incorrect_edges() self._remove_alone_endif() @@ -1182,7 +1241,7 @@ class FunctionSolc(CallerContextExpression): ################################################################################### ################################################################################### - def _add_param(self, param: Dict) -> LocalVariableSolc: + def _add_param(self, param: Dict, initialized: bool = False) -> LocalVariableSolc: local_var = LocalVariable() local_var.set_function(self._function) @@ -1192,6 +1251,9 @@ class FunctionSolc(CallerContextExpression): local_var_parser.analyze(self) + if initialized: + local_var.initialized = True + # see https://solidity.readthedocs.io/en/v0.4.24/types.html?highlight=storage%20location#data-location if local_var.location == "default": local_var.set_location("memory") @@ -1199,6 +1261,17 @@ class FunctionSolc(CallerContextExpression): self._add_local_variable(local_var_parser) return local_var_parser + def _add_param_init_tuple(self, statement: Dict, index: int) -> LocalVariableInitFromTupleSolc: + + local_var = LocalVariableInitFromTuple() + local_var.set_function(self._function) + local_var.set_offset(statement["src"], self._function.compilation_unit) + + local_var_parser = LocalVariableInitFromTupleSolc(local_var, statement, index) + + self._add_local_variable(local_var_parser) + return local_var_parser + def _parse_params(self, params: Dict): assert params[self.get_key()] == "ParameterList" diff --git a/slither/solc_parsing/declarations/using_for_top_level.py b/slither/solc_parsing/declarations/using_for_top_level.py index 707ad83ac..bfed3c417 100644 --- a/slither/solc_parsing/declarations/using_for_top_level.py +++ b/slither/solc_parsing/declarations/using_for_top_level.py @@ -55,22 +55,29 @@ class UsingForTopLevelSolc(CallerContextExpression): # pylint: disable=too-few- self._propagate_global(type_name) else: for f in self._functions: - full_name_split = f["function"]["name"].split(".") - if len(full_name_split) == 1: + # User defined operator + if "operator" in f: # Top level function - function_name: str = full_name_split[0] - self._analyze_top_level_function(function_name, type_name) - elif len(full_name_split) == 2: - # It can be a top level function behind an aliased import - # or a library function - first_part = full_name_split[0] - function_name = full_name_split[1] - self._check_aliased_import(first_part, function_name, type_name) + function_name: str = f["definition"]["name"] + operator: str = f["operator"] + self._analyze_operator(operator, function_name, type_name) else: - # MyImport.MyLib.a we don't care of the alias - library_name_str = full_name_split[1] - function_name = full_name_split[2] - self._analyze_library_function(library_name_str, function_name, type_name) + full_name_split = f["function"]["name"].split(".") + if len(full_name_split) == 1: + # Top level function + function_name: str = full_name_split[0] + self._analyze_top_level_function(function_name, type_name) + elif len(full_name_split) == 2: + # It can be a top level function behind an aliased import + # or a library function + first_part = full_name_split[0] + function_name = full_name_split[1] + self._check_aliased_import(first_part, function_name, type_name) + else: + # MyImport.MyLib.a we don't care of the alias + library_name_str = full_name_split[1] + function_name = full_name_split[2] + self._analyze_library_function(library_name_str, function_name, type_name) def _check_aliased_import( self, @@ -101,6 +108,19 @@ class UsingForTopLevelSolc(CallerContextExpression): # pylint: disable=too-few- self._propagate_global(type_name) break + def _analyze_operator( + self, operator: str, function_name: str, type_name: TypeAliasTopLevel + ) -> None: + for tl_function in self._using_for.file_scope.functions: + # The library function is bound to the first parameter's type + if ( + tl_function.name == function_name + and tl_function.parameters + and type_name == tl_function.parameters[0].type + ): + type_name.operators[operator] = tl_function + break + def _analyze_library_function( self, library_name: str, @@ -132,7 +152,7 @@ class UsingForTopLevelSolc(CallerContextExpression): # pylint: disable=too-few- if self._global: for scope in self.compilation_unit.scopes.values(): if isinstance(type_name, TypeAliasTopLevel): - for alias in scope.user_defined_types.values(): + for alias in scope.type_aliases.values(): if alias == type_name: scope.using_for_directives.add(self._using_for) elif isinstance(type_name, UserDefinedType): diff --git a/slither/solc_parsing/expressions/expression_parsing.py b/slither/solc_parsing/expressions/expression_parsing.py index 945a60b8f..4100d16ad 100644 --- a/slither/solc_parsing/expressions/expression_parsing.py +++ b/slither/solc_parsing/expressions/expression_parsing.py @@ -1,6 +1,6 @@ import logging import re -from typing import Union, Dict, TYPE_CHECKING +from typing import Union, Dict, TYPE_CHECKING, List, Any import slither.core.expressions.type_conversion from slither.core.declarations.solidity_variables import ( @@ -175,11 +175,12 @@ def parse_call( called = parse_expression(children[0], caller_context) arguments = [parse_expression(a, caller_context) for a in children[1::]] - if isinstance(called, SuperCallExpression): + if isinstance(called, SuperIdentifier): sp = SuperCallExpression(called, arguments, type_return) sp.set_offset(expression["src"], caller_context.compilation_unit) return sp - call_expression = CallExpression(called, arguments, type_return) + names = expression["names"] if "names" in expression and len(expression["names"]) > 0 else None + call_expression = CallExpression(called, arguments, type_return, names=names) call_expression.set_offset(src, caller_context.compilation_unit) # Only available if the syntax {gas:, value:} was used @@ -236,6 +237,24 @@ if TYPE_CHECKING: pass +def _user_defined_op_call( + caller_context: CallerContextExpression, src, function_id: int, args: List[Any], type_call: str +) -> CallExpression: + var, was_created = find_variable(None, caller_context, function_id) + + if was_created: + var.set_offset(src, caller_context.compilation_unit) + + identifier = Identifier(var) + identifier.set_offset(src, caller_context.compilation_unit) + + var.references.append(identifier.source_mapping) + + call = CallExpression(identifier, args, type_call) + call.set_offset(src, caller_context.compilation_unit) + return call + + def parse_expression(expression: Dict, caller_context: CallerContextExpression) -> "Expression": # pylint: disable=too-many-nested-blocks,too-many-statements """ @@ -274,16 +293,24 @@ def parse_expression(expression: Dict, caller_context: CallerContextExpression) if name == "UnaryOperation": if is_compact_ast: attributes = expression - else: - attributes = expression["attributes"] - assert "prefix" in attributes - operation_type = UnaryOperationType.get_type(attributes["operator"], attributes["prefix"]) - - if is_compact_ast: expression = parse_expression(expression["subExpression"], caller_context) else: + attributes = expression["attributes"] assert len(expression["children"]) == 1 expression = parse_expression(expression["children"][0], caller_context) + assert "prefix" in attributes + + # Use of user defined operation + if "function" in attributes: + return _user_defined_op_call( + caller_context, + src, + attributes["function"], + [expression], + attributes["typeDescriptions"]["typeString"], + ) + + operation_type = UnaryOperationType.get_type(attributes["operator"], attributes["prefix"]) unary_op = UnaryOperation(expression, operation_type) unary_op.set_offset(src, caller_context.compilation_unit) return unary_op @@ -291,17 +318,25 @@ def parse_expression(expression: Dict, caller_context: CallerContextExpression) if name == "BinaryOperation": if is_compact_ast: attributes = expression - else: - attributes = expression["attributes"] - operation_type = BinaryOperationType.get_type(attributes["operator"]) - - if is_compact_ast: left_expression = parse_expression(expression["leftExpression"], caller_context) right_expression = parse_expression(expression["rightExpression"], caller_context) else: assert len(expression["children"]) == 2 + attributes = expression["attributes"] left_expression = parse_expression(expression["children"][0], caller_context) right_expression = parse_expression(expression["children"][1], caller_context) + + # Use of user defined operation + if "function" in attributes: + return _user_defined_op_call( + caller_context, + src, + attributes["function"], + [left_expression, right_expression], + attributes["typeDescriptions"]["typeString"], + ) + + operation_type = BinaryOperationType.get_type(attributes["operator"]) binary_op = BinaryOperation(left_expression, right_expression, operation_type) binary_op.set_offset(src, caller_context.compilation_unit) return binary_op @@ -433,6 +468,8 @@ def parse_expression(expression: Dict, caller_context: CallerContextExpression) type_candidate = ElementaryType("uint256") else: type_candidate = ElementaryType("string") + elif type_candidate.startswith("rational_const "): + type_candidate = ElementaryType("uint256") elif type_candidate.startswith("int_const "): type_candidate = ElementaryType("uint256") elif type_candidate.startswith("bool"): @@ -450,13 +487,18 @@ def parse_expression(expression: Dict, caller_context: CallerContextExpression) t = None + referenced_declaration = None if caller_context.is_compact_ast: value = expression["name"] t = expression["typeDescriptions"]["typeString"] + if "referencedDeclaration" in expression: + referenced_declaration = expression["referencedDeclaration"] else: value = expression["attributes"]["value"] if "type" in expression["attributes"]: t = expression["attributes"]["type"] + if "referencedDeclaration" in expression["attributes"]: + referenced_declaration = expression["attributes"]["referencedDeclaration"] if t: found = re.findall(r"[struct|enum|function|modifier] \(([\[\] ()a-zA-Z0-9\.,_]*)\)", t) @@ -465,10 +507,6 @@ def parse_expression(expression: Dict, caller_context: CallerContextExpression) value = value + "(" + found[0] + ")" value = filter_name(value) - if "referencedDeclaration" in expression: - referenced_declaration = expression["referencedDeclaration"] - else: - referenced_declaration = None var, was_created = find_variable(value, caller_context, referenced_declaration) if was_created: var.set_offset(src, caller_context.compilation_unit) diff --git a/slither/solc_parsing/expressions/find_variable.py b/slither/solc_parsing/expressions/find_variable.py index 32f5afc58..e7fa99521 100644 --- a/slither/solc_parsing/expressions/find_variable.py +++ b/slither/solc_parsing/expressions/find_variable.py @@ -3,6 +3,8 @@ from typing import TYPE_CHECKING, Optional, Union, List, Tuple from slither.core.declarations import Event, Enum, Structure from slither.core.declarations.contract import Contract from slither.core.declarations.custom_error import CustomError +from slither.core.declarations.custom_error_contract import CustomErrorContract +from slither.core.declarations.custom_error_top_level import CustomErrorTopLevel from slither.core.declarations.function import Function from slither.core.declarations.function_contract import FunctionContract from slither.core.declarations.function_top_level import FunctionTopLevel @@ -54,10 +56,24 @@ def _find_variable_from_ref_declaration( referenced_declaration: Optional[int], all_contracts: List["Contract"], all_functions: List["Function"], + function_parser: Optional["FunctionSolc"], + contract_declarer: Optional["Contract"], ) -> Optional[Union[Contract, Function]]: + """ + Reference declarations take the highest priority, but they are not available for legacy AST. + """ if referenced_declaration is None: return None - # id of the contracts is the referenced declaration + # We look for variable declared with the referencedDeclaration attribute + if function_parser is not None and referenced_declaration in function_parser.variables_renamed: + return function_parser.variables_renamed[referenced_declaration].underlying_variable + + if ( + contract_declarer is not None + and referenced_declaration in contract_declarer.state_variables_by_ref_id + ): + return contract_declarer.state_variables_by_ref_id[referenced_declaration] + # Ccontracts ids are the referenced declaration # This is not true for the functions, as we dont always have the referenced_declaration # But maybe we could? (TODO) for contract_candidate in all_contracts: @@ -72,14 +88,9 @@ def _find_variable_from_ref_declaration( def _find_variable_in_function_parser( var_name: str, function_parser: Optional["FunctionSolc"], - referenced_declaration: Optional[int] = None, ) -> Optional[Variable]: if function_parser is None: return None - # We look for variable declared with the referencedDeclaration attr - func_variables_renamed = function_parser.variables_renamed - if referenced_declaration and referenced_declaration in func_variables_renamed: - return func_variables_renamed[referenced_declaration].underlying_variable # If not found, check for name func_variables = function_parser.underlying_function.variables_as_dict if var_name in func_variables: @@ -114,6 +125,8 @@ def find_top_level( :return: :rtype: """ + if var_name in scope.type_aliases: + return scope.type_aliases[var_name], False if var_name in scope.structures: return scope.structures[var_name], False @@ -121,6 +134,9 @@ def find_top_level( if var_name in scope.enums: return scope.enums[var_name], False + if var_name in scope.events: + return scope.events[var_name], False + for import_directive in scope.imports: if import_directive.alias == var_name: new_val = SolidityImportPlaceHolder(import_directive) @@ -205,6 +221,10 @@ def _find_in_contract( if sig == var_name: return modifier + type_aliases = contract.type_aliases_as_dict + if var_name in type_aliases: + return type_aliases[var_name] + # structures are looked on the contract declarer structures = contract.structures_as_dict if var_name in structures: @@ -240,6 +260,7 @@ def _find_in_contract( return None +# pylint: disable=too-many-statements def _find_variable_init( caller_context: CallerContextExpression, ) -> Tuple[List[Contract], List["Function"], FileScope,]: @@ -247,6 +268,7 @@ def _find_variable_init( from slither.solc_parsing.declarations.function import FunctionSolc from slither.solc_parsing.declarations.structure_top_level import StructureTopLevelSolc from slither.solc_parsing.variables.top_level_variable import TopLevelVariableSolc + from slither.solc_parsing.declarations.custom_error import CustomErrorSolc direct_contracts: List[Contract] direct_functions_parser: List[Function] @@ -289,6 +311,24 @@ def _find_variable_init( direct_contracts = [] direct_functions_parser = [] scope = caller_context.underlying_variable.file_scope + elif isinstance(caller_context, CustomErrorSolc): + if caller_context.contract_parser: + direct_contracts = [caller_context.contract_parser.underlying_contract] + direct_functions_parser = [ + f.underlying_function + for f in caller_context.contract_parser.functions_parser + + caller_context.contract_parser.modifiers_parser + ] + else: + # Top level custom error + direct_contracts = [] + direct_functions_parser = [] + underlying_custom_error = caller_context.underlying_custom_error + if isinstance(underlying_custom_error, CustomErrorTopLevel): + scope = underlying_custom_error.file_scope + else: + assert isinstance(underlying_custom_error, CustomErrorContract) + scope = underlying_custom_error.contract.file_scope else: raise SlitherError( f"{type(caller_context)} ({caller_context} is not valid for find_variable" @@ -337,6 +377,7 @@ def find_variable( """ from slither.solc_parsing.declarations.function import FunctionSolc from slither.solc_parsing.declarations.contract import ContractSolc + from slither.solc_parsing.declarations.custom_error import CustomErrorSolc # variable are looked from the contract declarer # functions can be shadowed, but are looked from the contract instance, rather than the contract declarer @@ -362,23 +403,6 @@ def find_variable( if var_name in current_scope.renaming: var_name = current_scope.renaming[var_name] - if var_name in current_scope.user_defined_types: - return current_scope.user_defined_types[var_name], False - - # Use ret0/ret1 to help mypy - ret0 = _find_variable_from_ref_declaration( - referenced_declaration, direct_contracts, direct_functions - ) - if ret0: - return ret0, False - - function_parser: Optional[FunctionSolc] = ( - caller_context if isinstance(caller_context, FunctionSolc) else None - ) - ret1 = _find_variable_in_function_parser(var_name, function_parser, referenced_declaration) - if ret1: - return ret1, False - contract: Optional[Contract] = None contract_declarer: Optional[Contract] = None if isinstance(caller_context, ContractSolc): @@ -391,6 +415,33 @@ def find_variable( contract_declarer = underlying_func.contract_declarer else: assert isinstance(underlying_func, FunctionTopLevel) + elif isinstance(caller_context, CustomErrorSolc): + underlying_custom_error = caller_context.underlying_custom_error + if isinstance(underlying_custom_error, CustomErrorContract): + contract = underlying_custom_error.contract + # We check for contract variables here because _find_in_contract + # will return since in this case the contract_declarer is None + for var in contract.variables: + if var_name == var.name: + return var, False + + function_parser: Optional[FunctionSolc] = ( + caller_context if isinstance(caller_context, FunctionSolc) else None + ) + # Use ret0/ret1 to help mypy + ret0 = _find_variable_from_ref_declaration( + referenced_declaration, + direct_contracts, + direct_functions, + function_parser, + contract_declarer, + ) + if ret0: + return ret0, False + + ret1 = _find_variable_in_function_parser(var_name, function_parser) + if ret1: + return ret1, False ret = _find_in_contract(var_name, contract, contract_declarer, is_super, is_identifier_path) if ret: @@ -442,6 +493,8 @@ def find_variable( referenced_declaration, list(current_scope.contracts.values()), list(current_scope.functions), + None, + None, ) if ret: return ret, False diff --git a/slither/solc_parsing/slither_compilation_unit_solc.py b/slither/solc_parsing/slither_compilation_unit_solc.py index f4258cd41..08ee62d80 100644 --- a/slither/solc_parsing/slither_compilation_unit_solc.py +++ b/slither/solc_parsing/slither_compilation_unit_solc.py @@ -10,6 +10,7 @@ from slither.core.compilation_unit import SlitherCompilationUnit from slither.core.declarations import Contract from slither.core.declarations.custom_error_top_level import CustomErrorTopLevel from slither.core.declarations.enum_top_level import EnumTopLevel +from slither.core.declarations.event_top_level import EventTopLevel from slither.core.declarations.function_top_level import FunctionTopLevel from slither.core.declarations.import_directive import Import from slither.core.declarations.pragma_directive import Pragma @@ -23,6 +24,7 @@ from slither.solc_parsing.declarations.caller_context import CallerContextExpres from slither.solc_parsing.declarations.contract import ContractSolc from slither.solc_parsing.declarations.custom_error import CustomErrorSolc from slither.solc_parsing.declarations.function import FunctionSolc +from slither.solc_parsing.declarations.event import EventSolc from slither.solc_parsing.declarations.structure_top_level import StructureTopLevelSolc from slither.solc_parsing.declarations.using_for_top_level import UsingForTopLevelSolc from slither.solc_parsing.exceptions import VariableNotFound @@ -33,6 +35,10 @@ logger = logging.getLogger("SlitherSolcParsing") logger.setLevel(logging.INFO) +class InheritanceResolutionError(SlitherException): + pass + + def _handle_import_aliases( symbol_aliases: Dict, import_directive: Import, scope: FileScope ) -> None: @@ -71,9 +77,12 @@ class SlitherCompilationUnitSolc(CallerContextExpression): def __init__(self, compilation_unit: SlitherCompilationUnit) -> None: super().__init__() + self._compilation_unit: SlitherCompilationUnit = compilation_unit + self._contracts_by_id: Dict[int, ContractSolc] = {} self._parsed = False self._analyzed = False + self._is_compact_ast = False self._underlying_contract_to_parser: Dict[Contract, ContractSolc] = {} self._structures_top_level_parser: List[StructureTopLevelSolc] = [] @@ -81,11 +90,6 @@ class SlitherCompilationUnitSolc(CallerContextExpression): self._variables_top_level_parser: List[TopLevelVariableSolc] = [] self._functions_top_level_parser: List[FunctionSolc] = [] self._using_for_top_level_parser: List[UsingForTopLevelSolc] = [] - - self._is_compact_ast = False - # self._core: SlitherCore = core - self._compilation_unit = compilation_unit - self._all_functions_and_modifier_parser: List[FunctionSolc] = [] self._top_level_contracts_counter = 0 @@ -141,14 +145,14 @@ class SlitherCompilationUnitSolc(CallerContextExpression): data_loaded = json.loads(json_data) # Truffle AST if "ast" in data_loaded: - self.parse_top_level_from_loaded_json(data_loaded["ast"], data_loaded["sourcePath"]) + self.parse_top_level_items(data_loaded["ast"], data_loaded["sourcePath"]) return True # solc AST, where the non-json text was removed if "attributes" in data_loaded: filename = data_loaded["attributes"]["absolutePath"] else: filename = data_loaded["absolutePath"] - self.parse_top_level_from_loaded_json(data_loaded, filename) + self.parse_top_level_items(data_loaded, filename) return True except ValueError: @@ -159,7 +163,7 @@ class SlitherCompilationUnitSolc(CallerContextExpression): json_data = json_data[first:last] data_loaded = json.loads(json_data) - self.parse_top_level_from_loaded_json(data_loaded, filename) + self.parse_top_level_items(data_loaded, filename) return True return False @@ -193,7 +197,14 @@ class SlitherCompilationUnitSolc(CallerContextExpression): self._compilation_unit.enums_top_level.append(enum) # pylint: disable=too-many-branches,too-many-statements,too-many-locals - def parse_top_level_from_loaded_json(self, data_loaded: Dict, filename: str) -> None: + def parse_top_level_items(self, data_loaded: Dict, filename: str) -> None: + if not data_loaded or data_loaded is None: + logger.error( + "crytic-compile returned an empty AST. " + "If you are trying to analyze a contract from etherscan or similar make sure it has source code available." + ) + return + if "nodeType" in data_loaded: self._is_compact_ast = True @@ -315,7 +326,7 @@ class SlitherCompilationUnitSolc(CallerContextExpression): custom_error = CustomErrorTopLevel(self._compilation_unit, scope) custom_error.set_offset(top_level_data["src"], self._compilation_unit) - custom_error_parser = CustomErrorSolc(custom_error, top_level_data, self) + custom_error_parser = CustomErrorSolc(custom_error, top_level_data, None, self) scope.custom_errors.add(custom_error) self._compilation_unit.custom_errors.append(custom_error) self._custom_error_parser.append(custom_error_parser) @@ -333,10 +344,19 @@ class SlitherCompilationUnitSolc(CallerContextExpression): original_type = ElementaryType(underlying_type["name"]) - user_defined_type = TypeAliasTopLevel(original_type, alias, scope) - user_defined_type.set_offset(top_level_data["src"], self._compilation_unit) - self._compilation_unit.user_defined_value_types[alias] = user_defined_type - scope.user_defined_types[alias] = user_defined_type + type_alias = TypeAliasTopLevel(original_type, alias, scope) + type_alias.set_offset(top_level_data["src"], self._compilation_unit) + self._compilation_unit.type_aliases[alias] = type_alias + scope.type_aliases[alias] = type_alias + + elif top_level_data[self.get_key()] == "EventDefinition": + event = EventTopLevel(scope) + event.set_offset(top_level_data["src"], self._compilation_unit) + + event_parser = EventSolc(event, top_level_data, self) # type: ignore + event_parser.analyze() # type: ignore + scope.events[event.full_name] = event + self._compilation_unit.events_top_level.append(event) else: raise SlitherException(f"Top level {top_level_data[self.get_key()]} not supported") @@ -394,7 +414,7 @@ class SlitherCompilationUnitSolc(CallerContextExpression): def parse_contracts(self) -> None: # pylint: disable=too-many-statements,too-many-branches if not self._underlying_contract_to_parser: logger.info( - f"No contract were found in {self._compilation_unit.core.filename}, check the correct compilation" + f"No contracts were found in {self._compilation_unit.core.filename}, check the correct compilation" ) if self._parsed: raise Exception("Contract analysis can be run only once!") @@ -432,7 +452,12 @@ Please rename it, this name is reserved for Slither's internals""" target = contract_parser.underlying_contract.file_scope.get_contract_from_name( contract_name ) - assert target + if target == contract_parser.underlying_contract: + raise InheritanceResolutionError( + "Could not resolve contract inheritance. This is likely caused by an import renaming that collides with existing names (see https://github.com/crytic/slither/issues/1758)." + f"\n Try changing `contract {target}` ({target.source_mapping}) to a unique name." + ) + assert target, f"Contract {contract_name} not found" ancestors.append(target) elif i in self._contracts_by_id: ancestors.append(self._contracts_by_id[i]) @@ -523,8 +548,8 @@ Please rename it, this name is reserved for Slither's internals""" if not self._parsed: raise SlitherException("Parse the contract before running analyses") self._convert_to_slithir() - - compute_dependency(self._compilation_unit) + if not self._compilation_unit.core.skip_data_dependency: + compute_dependency(self._compilation_unit) self._compilation_unit.compute_storage_layout() self._analyzed = True diff --git a/slither/solc_parsing/solidity_types/type_parsing.py b/slither/solc_parsing/solidity_types/type_parsing.py index e12290722..82c1ac392 100644 --- a/slither/solc_parsing/solidity_types/type_parsing.py +++ b/slither/solc_parsing/solidity_types/type_parsing.py @@ -82,9 +82,9 @@ def _find_from_type_name( # pylint: disable=too-many-locals,too-many-branches,t # all_enums = [c.enums for c in contracts] # all_enums = [item for sublist in all_enums for item in sublist] # all_enums += contract.slither.enums_top_level - var_type = next((e for e in all_enums if e.name == enum_name), None) + var_type = next((e for e in all_enums if e.canonical_name == enum_name), None) if not var_type: - var_type = next((e for e in all_enums if e.canonical_name == enum_name), None) + var_type = next((e for e in all_enums if e.name == enum_name), None) if not var_type: # any contract can refer to another contract's structure name_struct = name @@ -94,9 +94,9 @@ def _find_from_type_name( # pylint: disable=too-many-locals,too-many-branches,t # all_structures = [c.structures for c in contracts] # all_structures = [item for sublist in all_structures for item in sublist] # all_structures += contract.slither.structures_top_level - var_type = next((st for st in all_structures if st.name == name_struct), None) + var_type = next((st for st in all_structures if st.canonical_name == name_struct), None) if not var_type: - var_type = next((st for st in all_structures if st.canonical_name == name_struct), None) + var_type = next((st for st in all_structures if st.name == name_struct), None) # case where struct xxx.xx[] where not well formed in the AST if not var_type: depth = 0 @@ -235,7 +235,7 @@ def parse_type( sl: "SlitherCompilationUnit" renaming: Dict[str, str] - user_defined_types: Dict[str, TypeAlias] + type_aliases: Dict[str, TypeAlias] enums_direct_access: List["Enum"] = [] # Note: for convenicence top level functions use the same parser than function in contract # but contract_parser is set to None @@ -247,13 +247,13 @@ def parse_type( sl = caller_context.compilation_unit next_context = caller_context renaming = {} - user_defined_types = sl.user_defined_value_types + type_aliases = sl.type_aliases else: assert isinstance(caller_context, FunctionSolc) sl = caller_context.underlying_function.compilation_unit next_context = caller_context.slither_parser renaming = caller_context.underlying_function.file_scope.renaming - user_defined_types = caller_context.underlying_function.file_scope.user_defined_types + type_aliases = caller_context.underlying_function.file_scope.type_aliases structures_direct_access = sl.structures_top_level all_structuress = [c.structures for c in sl.contracts] all_structures = [item for sublist in all_structuress for item in sublist] @@ -299,7 +299,7 @@ def parse_type( functions = list(scope.functions) renaming = scope.renaming - user_defined_types = scope.user_defined_types + type_aliases = scope.type_aliases elif isinstance(caller_context, (ContractSolc, FunctionSolc)): sl = caller_context.compilation_unit if isinstance(caller_context, FunctionSolc): @@ -329,7 +329,7 @@ def parse_type( functions = contract.functions + contract.modifiers renaming = scope.renaming - user_defined_types = scope.user_defined_types + type_aliases = scope.type_aliases else: raise ParsingError(f"Incorrect caller context: {type(caller_context)}") @@ -343,8 +343,8 @@ def parse_type( name = t.name if name in renaming: name = renaming[name] - if name in user_defined_types: - return user_defined_types[name] + if name in type_aliases: + return type_aliases[name] return _find_from_type_name( name, functions, @@ -365,9 +365,9 @@ def parse_type( name = t["typeDescriptions"]["typeString"] if name in renaming: name = renaming[name] - if name in user_defined_types: - _add_type_references(user_defined_types[name], t["src"], sl) - return user_defined_types[name] + if name in type_aliases: + _add_type_references(type_aliases[name], t["src"], sl) + return type_aliases[name] type_found = _find_from_type_name( name, functions, @@ -386,9 +386,9 @@ def parse_type( name = t["attributes"][type_name_key] if name in renaming: name = renaming[name] - if name in user_defined_types: - _add_type_references(user_defined_types[name], t["src"], sl) - return user_defined_types[name] + if name in type_aliases: + _add_type_references(type_aliases[name], t["src"], sl) + return type_aliases[name] type_found = _find_from_type_name( name, functions, @@ -407,8 +407,8 @@ def parse_type( name = t["name"] if name in renaming: name = renaming[name] - if name in user_defined_types: - return user_defined_types[name] + if name in type_aliases: + return type_aliases[name] type_found = _find_from_type_name( name, functions, diff --git a/slither/solc_parsing/variables/local_variable_init_from_tuple.py b/slither/solc_parsing/variables/local_variable_init_from_tuple.py index 1a551c695..f1c872848 100644 --- a/slither/solc_parsing/variables/local_variable_init_from_tuple.py +++ b/slither/solc_parsing/variables/local_variable_init_from_tuple.py @@ -16,3 +16,21 @@ class LocalVariableInitFromTupleSolc(VariableDeclarationSolc): # Todo: Not sure how to overcome this with mypy assert isinstance(self._variable, LocalVariableInitFromTuple) return self._variable + + def _analyze_variable_attributes(self, attributes: Dict) -> None: + """' + Variable Location + Can be storage/memory or default + """ + if "storageLocation" in attributes: + location = attributes["storageLocation"] + self.underlying_variable.set_location(location) + else: + if "memory" in attributes["type"]: + self.underlying_variable.set_location("memory") + elif "storage" in attributes["type"]: + self.underlying_variable.set_location("storage") + else: + self.underlying_variable.set_location("default") + + super()._analyze_variable_attributes(attributes) diff --git a/slither/solc_parsing/yul/evm_functions.py b/slither/solc_parsing/yul/evm_functions.py index dfb52a244..28ea70e93 100644 --- a/slither/solc_parsing/yul/evm_functions.py +++ b/slither/solc_parsing/yul/evm_functions.py @@ -51,6 +51,7 @@ evm_opcodes = [ "TIMESTAMP", "NUMBER", "DIFFICULTY", + "PREVRANDAO", "GASLIMIT", "CHAINID", "SELFBALANCE", @@ -168,6 +169,7 @@ builtins = [ ) ] + yul_funcs +# "identifier": [input_count, output_count] function_args = { "byte": [2, 1], "addmod": [3, 1], @@ -221,6 +223,7 @@ function_args = { "timestamp": [0, 1], "number": [0, 1], "difficulty": [0, 1], + "prevrandao": [0, 1], "gaslimit": [0, 1], } diff --git a/slither/solc_parsing/yul/parse_yul.py b/slither/solc_parsing/yul/parse_yul.py index 76a124a7d..5dcc33a9a 100644 --- a/slither/solc_parsing/yul/parse_yul.py +++ b/slither/solc_parsing/yul/parse_yul.py @@ -181,7 +181,7 @@ class YulScope(metaclass=abc.ABCMeta): def add_yul_local_function(self, func: "YulFunction") -> None: self._yul_local_functions.append(func) - def get_yul_local_function_from_name(self, func_name: str) -> Optional["YulLocalVariable"]: + def get_yul_local_function_from_name(self, func_name: str) -> Optional["YulFunction"]: return next( (v for v in self._yul_local_functions if v.underlying.name == func_name), None, @@ -252,6 +252,10 @@ class YulFunction(YulScope): def function(self) -> Function: return self._function + @property + def root(self) -> YulScope: + return self._root + def convert_body(self) -> None: node = self.new_node(NodeType.ENTRYPOINT, self._ast["src"]) link_underlying_nodes(self._entrypoint, node) @@ -271,6 +275,9 @@ class YulFunction(YulScope): def parse_body(self) -> None: for node in self._nodes: node.analyze_expressions() + for f in self._yul_local_functions: + if f != self: + f.parse_body() def new_node(self, node_type: NodeType, src: str) -> YulNode: if self._function: @@ -329,7 +336,10 @@ class YulBlock(YulScope): return yul_node def convert(self, ast: Dict) -> YulNode: - return convert_yul(self, self._entrypoint, ast, self.node_scope) + yul_node = convert_yul(self, self._entrypoint, ast, self.node_scope) + for f in self._yul_local_functions: + f.parse_body() + return yul_node def analyze_expressions(self) -> None: for node in self._nodes: @@ -394,7 +404,6 @@ def convert_yul_function_definition( root.add_yul_local_function(yul_function) yul_function.convert_body() - yul_function.parse_body() return parent @@ -743,7 +752,7 @@ def parse_yul_function_call(root: YulScope, node: YulNode, ast: Dict) -> Optiona def _check_for_state_variable_name(root: YulScope, potential_name: str) -> Optional[Identifier]: root_function = root.function if isinstance(root_function, FunctionContract): - var = root_function.contract.get_state_variable_from_name(potential_name) + var = root_function.contract_declarer.get_state_variable_from_name(potential_name) if var: return Identifier(var) return None @@ -782,6 +791,7 @@ def _parse_yul_magic_suffixes(name: str, root: YulScope) -> Optional[Expression] return None +# pylint: disable=too-many-branches def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[Expression]: name = ast["name"] @@ -813,6 +823,23 @@ def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[ if func: return Identifier(func.underlying) + # check yul-block scoped function + if isinstance(root, YulFunction): + yul_block = root.root + + # Iterate until we searched in all the scopes until the YulBlock scope + while not isinstance(yul_block, YulBlock): + func = yul_block.get_yul_local_function_from_name(name) + if func: + return Identifier(func.underlying) + + if isinstance(yul_block, YulFunction): + yul_block = yul_block.root + + func = yul_block.get_yul_local_function_from_name(name) + if func: + return Identifier(func.underlying) + magic_suffix = _parse_yul_magic_suffixes(name, root) if magic_suffix: return magic_suffix diff --git a/slither/tools/documentation/__main__.py b/slither/tools/documentation/__main__.py index 39b1eacda..0244dd6c6 100644 --- a/slither/tools/documentation/__main__.py +++ b/slither/tools/documentation/__main__.py @@ -21,7 +21,10 @@ def parse_args() -> argparse.Namespace: Parse the underlying arguments for the program. :return: Returns the arguments for the program. """ - parser = argparse.ArgumentParser(description="Demo", usage="slither-documentation filename") + parser = argparse.ArgumentParser( + description="Auto-generate NatSpec documentation for every function using OpenAI Codex.", + usage="slither-documentation filename", + ) parser.add_argument("project", help="The target directory/Solidity file.") diff --git a/slither/tools/flattening/flattening.py b/slither/tools/flattening/flattening.py index 55e1af21d..9cb2abc3f 100644 --- a/slither/tools/flattening/flattening.py +++ b/slither/tools/flattening/flattening.py @@ -77,6 +77,7 @@ class Flattening: self._get_source_code_top_level(compilation_unit.structures_top_level) self._get_source_code_top_level(compilation_unit.enums_top_level) + self._get_source_code_top_level(compilation_unit.events_top_level) self._get_source_code_top_level(compilation_unit.custom_errors) self._get_source_code_top_level(compilation_unit.variables_top_level) self._get_source_code_top_level(compilation_unit.functions_top_level) diff --git a/slither/tools/interface/README.md b/slither/tools/interface/README.md new file mode 100644 index 000000000..a77e780b0 --- /dev/null +++ b/slither/tools/interface/README.md @@ -0,0 +1,21 @@ +# Slither-interface + +Generates code for a Solidity interface from contract + +## Usage + +Run `slither-interface `. + +## CLI Interface +```shell +positional arguments: + contract_source The name of the contract (case sensitive) followed by the deployed contract address if verified on etherscan or project directory/filename for local contracts. + +optional arguments: + -h, --help show this help message and exit + --unroll-structs Whether to use structures' underlying types instead of the user-defined type + --exclude-events Excludes event signatures in the interface + --exclude-errors Excludes custom error signatures in the interface + --exclude-enums Excludes enum definitions in the interface + --exclude-structs Exclude struct definitions in the interface +``` \ No newline at end of file diff --git a/slither/tools/interface/__main__.py b/slither/tools/interface/__main__.py index e56c4b3eb..0705f0373 100644 --- a/slither/tools/interface/__main__.py +++ b/slither/tools/interface/__main__.py @@ -86,10 +86,11 @@ def main() -> None: ) # add version pragma - interface = ( - f"pragma solidity {_contract.compilation_unit.pragma_directives[0].version};\n\n" - + interface - ) + if _contract.compilation_unit.pragma_directives: + interface = ( + f"pragma solidity {_contract.compilation_unit.pragma_directives[0].version};\n\n" + + interface + ) # write interface to file export = Path("crytic-export", "interfaces") diff --git a/slither/tools/mutator/README.md b/slither/tools/mutator/README.md new file mode 100644 index 000000000..8af977b08 --- /dev/null +++ b/slither/tools/mutator/README.md @@ -0,0 +1,33 @@ +# Slither-mutate + +`slither-mutate` is a mutation testing tool for solidity based smart contracts. + +## Usage + +`slither-mutate --test-cmd ` + +To view the list of mutators available `slither-mutate --list-mutators` + +### CLI Interface + +```shell +positional arguments: + codebase Codebase to analyze (.sol file, project directory, ...) + +options: + -h, --help show this help message and exit + --list-mutators List available detectors + --test-cmd TEST_CMD Command to run the tests for your project + --test-dir TEST_DIR Tests directory + --ignore-dirs IGNORE_DIRS + Directories to ignore + --timeout TIMEOUT Set timeout for test command (by default 30 seconds) + --output-dir OUTPUT_DIR + Name of output directory (by default 'mutation_campaign') + --verbose output all mutants generated + --mutators-to-run MUTATORS_TO_RUN + mutant generators to run + --contract-names CONTRACT_NAMES + list of contract names you want to mutate + --quick to stop full mutation if revert mutator passes +``` diff --git a/slither/tools/mutator/__main__.py b/slither/tools/mutator/__main__.py index 84286ce66..5c13d7aea 100644 --- a/slither/tools/mutator/__main__.py +++ b/slither/tools/mutator/__main__.py @@ -2,20 +2,25 @@ import argparse import inspect import logging import sys -from typing import Type, List, Any - +import os +import shutil +from typing import Type, List, Any, Optional from crytic_compile import cryticparser - from slither import Slither from slither.tools.mutator.mutators import all_mutators +from slither.utils.colors import yellow, magenta from .mutators.abstract_mutator import AbstractMutator from .utils.command_line import output_mutators +from .utils.file_handling import ( + transfer_and_delete, + backup_source_file, + get_sol_file_list, +) logging.basicConfig() -logger = logging.getLogger("Slither") +logger = logging.getLogger("Slither-Mutate") logger.setLevel(logging.INFO) - ################################################################################### ################################################################################### # region Cli Arguments @@ -24,12 +29,16 @@ logger.setLevel(logging.INFO) def parse_args() -> argparse.Namespace: + """ + Parse the underlying arguments for the program. + Returns: The arguments for the program. + """ parser = argparse.ArgumentParser( description="Experimental smart contract mutator. Based on https://arxiv.org/abs/2006.11597", - usage="slither-mutate target", + usage="slither-mutate --test-cmd ", ) - parser.add_argument("codebase", help="Codebase to analyze (.sol file, truffle directory, ...)") + parser.add_argument("codebase", help="Codebase to analyze (.sol file, project directory, ...)") parser.add_argument( "--list-mutators", @@ -39,6 +48,51 @@ def parse_args() -> argparse.Namespace: default=False, ) + # argument to add the test command + parser.add_argument("--test-cmd", help="Command to run the tests for your project") + + # argument to add the test directory - containing all the tests + parser.add_argument("--test-dir", help="Tests directory") + + # argument to ignore the interfaces, libraries + parser.add_argument("--ignore-dirs", help="Directories to ignore") + + # time out argument + parser.add_argument("--timeout", help="Set timeout for test command (by default 30 seconds)") + + # output directory argument + parser.add_argument( + "--output-dir", help="Name of output directory (by default 'mutation_campaign')" + ) + + # to print just all the mutants + parser.add_argument( + "--verbose", + help="output all mutants generated", + action="store_true", + default=False, + ) + + # select list of mutators to run + parser.add_argument( + "--mutators-to-run", + help="mutant generators to run", + ) + + # list of contract names you want to mutate + parser.add_argument( + "--contract-names", + help="list of contract names you want to mutate", + ) + + # flag to run full mutation based revert mutator output + parser.add_argument( + "--quick", + help="to stop full mutation if revert mutator passes", + action="store_true", + default=False, + ) + # Initiate all the crytic config cli options cryticparser.init(parser) @@ -49,9 +103,18 @@ def parse_args() -> argparse.Namespace: return parser.parse_args() -def _get_mutators() -> List[Type[AbstractMutator]]: +def _get_mutators(mutators_list: List[str] | None) -> List[Type[AbstractMutator]]: detectors_ = [getattr(all_mutators, name) for name in dir(all_mutators)] - detectors = [c for c in detectors_ if inspect.isclass(c) and issubclass(c, AbstractMutator)] + if mutators_list is not None: + detectors = [ + c + for c in detectors_ + if inspect.isclass(c) + and issubclass(c, AbstractMutator) + and str(c.NAME) in mutators_list + ] + else: + detectors = [c for c in detectors_ if inspect.isclass(c) and issubclass(c, AbstractMutator)] return detectors @@ -59,7 +122,7 @@ class ListMutators(argparse.Action): # pylint: disable=too-few-public-methods def __call__( self, parser: Any, *args: Any, **kwargs: Any ) -> None: # pylint: disable=signature-differs - checks = _get_mutators() + checks = _get_mutators(None) output_mutators(checks) parser.exit() @@ -72,17 +135,120 @@ class ListMutators(argparse.Action): # pylint: disable=too-few-public-methods ################################################################################### -def main() -> None: - +def main() -> (None): # pylint: disable=too-many-statements,too-many-branches,too-many-locals args = parse_args() - print(args.codebase) - sl = Slither(args.codebase, **vars(args)) - - for compilation_unit in sl.compilation_units: - for M in _get_mutators(): - m = M(compilation_unit) - m.mutate() + # arguments + test_command: str = args.test_cmd + test_directory: Optional[str] = args.test_dir + paths_to_ignore: Optional[str] = args.ignore_dirs + output_dir: Optional[str] = args.output_dir + timeout: Optional[int] = args.timeout + solc_remappings: Optional[str] = args.solc_remaps + verbose: Optional[bool] = args.verbose + mutators_to_run: Optional[List[str]] = args.mutators_to_run + contract_names: Optional[List[str]] = args.contract_names + quick_flag: Optional[bool] = args.quick + + logger.info(magenta(f"Starting Mutation Campaign in '{args.codebase} \n")) + + if paths_to_ignore: + paths_to_ignore_list = paths_to_ignore.strip("][").split(",") + logger.info(magenta(f"Ignored paths - {', '.join(paths_to_ignore_list)} \n")) + else: + paths_to_ignore_list = [] + + # get all the contracts as a list from given codebase + sol_file_list: List[str] = get_sol_file_list(args.codebase, paths_to_ignore_list) + + # folder where backup files and valid mutants created + if output_dir is None: + output_dir = "/mutation_campaign" + output_folder = os.getcwd() + output_dir + if os.path.exists(output_folder): + shutil.rmtree(output_folder) + + # set default timeout + if timeout is None: + timeout = 30 + + # setting RR mutator as first mutator + mutators_list = _get_mutators(mutators_to_run) + + # insert RR and CR in front of the list + CR_RR_list = [] + duplicate_list = mutators_list.copy() + for M in duplicate_list: + if M.NAME == "RR": + mutators_list.remove(M) + CR_RR_list.insert(0, M) + elif M.NAME == "CR": + mutators_list.remove(M) + CR_RR_list.insert(1, M) + mutators_list = CR_RR_list + mutators_list + + for filename in sol_file_list: # pylint: disable=too-many-nested-blocks + contract_name = os.path.split(filename)[1].split(".sol")[0] + # slither object + sl = Slither(filename, **vars(args)) + # create a backup files + files_dict = backup_source_file(sl.source_code, output_folder) + # total count of mutants + total_count = 0 + # count of valid mutants + v_count = 0 + # lines those need not be mutated (taken from RR and CR) + dont_mutate_lines = [] + + # mutation + try: + for compilation_unit_of_main_file in sl.compilation_units: + contract_instance = "" + for contract in compilation_unit_of_main_file.contracts: + if contract_names is not None and contract.name in contract_names: + contract_instance = contract + elif str(contract.name).lower() == contract_name.lower(): + contract_instance = contract + if contract_instance == "": + logger.error("Can't find the contract") + else: + for M in mutators_list: + m = M( + compilation_unit_of_main_file, + int(timeout), + test_command, + test_directory, + contract_instance, + solc_remappings, + verbose, + output_folder, + dont_mutate_lines, + ) + (count_valid, count_invalid, lines_list) = m.mutate() + v_count += count_valid + total_count += count_valid + count_invalid + dont_mutate_lines = lines_list + if not quick_flag: + dont_mutate_lines = [] + except Exception as e: # pylint: disable=broad-except + logger.error(e) + + except KeyboardInterrupt: + # transfer and delete the backup files if interrupted + logger.error("\nExecution interrupted by user (Ctrl + C). Cleaning up...") + transfer_and_delete(files_dict) + + # transfer and delete the backup files + transfer_and_delete(files_dict) + + # output + logger.info( + yellow( + f"Done mutating, '{filename}'. Valid mutant count: '{v_count}' and Total mutant count '{total_count}'.\n" + ) + ) + + logger.info(magenta(f"Finished Mutation Campaign in '{args.codebase}' \n")) # endregion diff --git a/slither/tools/mutator/mutators/AOR.py b/slither/tools/mutator/mutators/AOR.py new file mode 100644 index 000000000..0bf0fb2a2 --- /dev/null +++ b/slither/tools/mutator/mutators/AOR.py @@ -0,0 +1,54 @@ +from typing import Dict +from slither.slithir.operations import Binary, BinaryType +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator +from slither.core.expressions.unary_operation import UnaryOperation + +arithmetic_operators = [ + BinaryType.ADDITION, + BinaryType.DIVISION, + BinaryType.MULTIPLICATION, + BinaryType.SUBTRACTION, + BinaryType.MODULO, +] + + +class AOR(AbstractMutator): # pylint: disable=too-few-public-methods + NAME = "AOR" + HELP = "Arithmetic operator replacement" + + def _mutate(self) -> Dict: + result: Dict = {} + for ( # pylint: disable=too-many-nested-blocks + function + ) in self.contract.functions_and_modifiers_declared: + for node in function.nodes: + try: + ir_expression = node.expression + except: # pylint: disable=bare-except + continue + for ir in node.irs: + if isinstance(ir, Binary) and ir.type in arithmetic_operators: + if isinstance(ir_expression, UnaryOperation): + continue + alternative_ops = arithmetic_operators[:] + alternative_ops.remove(ir.type) + for op in alternative_ops: + # Get the string + start = node.source_mapping.start + stop = start + node.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = node.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + # Replace the expression with true + new_str = f"{old_str.split(ir.type.value)[0]}{op.value}{old_str.split(ir.type.value)[1]}" + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + return result diff --git a/slither/tools/mutator/mutators/ASOR.py b/slither/tools/mutator/mutators/ASOR.py new file mode 100644 index 000000000..2ff403b38 --- /dev/null +++ b/slither/tools/mutator/mutators/ASOR.py @@ -0,0 +1,65 @@ +from typing import Dict +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator +from slither.core.expressions.assignment_operation import ( + AssignmentOperationType, + AssignmentOperation, +) + +assignment_operators = [ + AssignmentOperationType.ASSIGN_ADDITION, + AssignmentOperationType.ASSIGN_SUBTRACTION, + AssignmentOperationType.ASSIGN, + AssignmentOperationType.ASSIGN_OR, + AssignmentOperationType.ASSIGN_CARET, + AssignmentOperationType.ASSIGN_AND, + AssignmentOperationType.ASSIGN_LEFT_SHIFT, + AssignmentOperationType.ASSIGN_RIGHT_SHIFT, + AssignmentOperationType.ASSIGN_MULTIPLICATION, + AssignmentOperationType.ASSIGN_DIVISION, + AssignmentOperationType.ASSIGN_MODULO, +] + + +class ASOR(AbstractMutator): # pylint: disable=too-few-public-methods + NAME = "ASOR" + HELP = "Assignment Operator Replacement" + + def _mutate(self) -> Dict: + result: Dict = {} + + for ( # pylint: disable=too-many-nested-blocks + function + ) in self.contract.functions_and_modifiers_declared: + for node in function.nodes: + for ir in node.irs: + if ( + isinstance(ir.expression, AssignmentOperation) + and ir.expression.type in assignment_operators + ): + if ir.expression.type == AssignmentOperationType.ASSIGN: + continue + alternative_ops = assignment_operators[:] + try: + alternative_ops.remove(ir.expression.type) + except: # pylint: disable=bare-except + continue + for op in alternative_ops: + if op != ir.expression: + start = node.source_mapping.start + stop = start + node.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = node.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + # Replace the expression with true + new_str = f"{old_str.split(str(ir.expression.type))[0]}{op}{old_str.split(str(ir.expression.type))[1]}" + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + return result diff --git a/slither/tools/mutator/mutators/BOR.py b/slither/tools/mutator/mutators/BOR.py new file mode 100644 index 000000000..a8720a4b6 --- /dev/null +++ b/slither/tools/mutator/mutators/BOR.py @@ -0,0 +1,48 @@ +from typing import Dict +from slither.slithir.operations import Binary, BinaryType +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator + +bitwise_operators = [ + BinaryType.AND, + BinaryType.OR, + BinaryType.LEFT_SHIFT, + BinaryType.RIGHT_SHIFT, + BinaryType.CARET, +] + + +class BOR(AbstractMutator): # pylint: disable=too-few-public-methods + NAME = "BOR" + HELP = "Bitwise Operator Replacement" + + def _mutate(self) -> Dict: + result: Dict = {} + + for ( # pylint: disable=too-many-nested-blocks + function + ) in self.contract.functions_and_modifiers_declared: + for node in function.nodes: + for ir in node.irs: + if isinstance(ir, Binary) and ir.type in bitwise_operators: + alternative_ops = bitwise_operators[:] + alternative_ops.remove(ir.type) + for op in alternative_ops: + # Get the string + start = node.source_mapping.start + stop = start + node.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = node.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + # Replace the expression with true + new_str = f"{old_str.split(ir.type.value)[0]}{op.value}{old_str.split(ir.type.value)[1]}" + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + return result diff --git a/slither/tools/mutator/mutators/CR.py b/slither/tools/mutator/mutators/CR.py new file mode 100644 index 000000000..ebf93bf18 --- /dev/null +++ b/slither/tools/mutator/mutators/CR.py @@ -0,0 +1,39 @@ +from typing import Dict +from slither.core.cfg.node import NodeType +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator + + +class CR(AbstractMutator): # pylint: disable=too-few-public-methods + NAME = "CR" + HELP = "Comment Replacement" + + def _mutate(self) -> Dict: + result: Dict = {} + + for ( # pylint: disable=too-many-nested-blocks + function + ) in self.contract.functions_and_modifiers_declared: + for node in function.nodes: + if node.type not in ( + NodeType.ENTRYPOINT, + NodeType.ENDIF, + NodeType.ENDLOOP, + ): + # Get the string + start = node.source_mapping.start + stop = start + node.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = node.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + new_str = "//" + old_str + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + return result diff --git a/slither/tools/mutator/mutators/FHR.py b/slither/tools/mutator/mutators/FHR.py new file mode 100644 index 000000000..028c1916c --- /dev/null +++ b/slither/tools/mutator/mutators/FHR.py @@ -0,0 +1,42 @@ +from typing import Dict +import re +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator + + +function_header_replacements = [ + "pure ==> view", + "view ==> pure", + "(\\s)(external|public|internal) ==> \\1private", + "(\\s)(external|public) ==> \\1internal", +] + + +class FHR(AbstractMutator): # pylint: disable=too-few-public-methods + NAME = "FHR" + HELP = "Function Header Replacement" + + def _mutate(self) -> Dict: + result: Dict = {} + + for function in self.contract.functions_and_modifiers_declared: + start = function.source_mapping.start + stop = start + function.source_mapping.content.find("{") + old_str = self.in_file_str[start:stop] + line_no = function.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + for value in function_header_replacements: + left_value = value.split(" ==> ", maxsplit=1)[0] + right_value = value.split(" ==> ")[1] + if re.search(re.compile(left_value), old_str) is not None: + new_str = re.sub(re.compile(left_value), right_value, old_str) + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + return result diff --git a/slither/tools/mutator/mutators/LIR.py b/slither/tools/mutator/mutators/LIR.py new file mode 100644 index 000000000..cc58cbae1 --- /dev/null +++ b/slither/tools/mutator/mutators/LIR.py @@ -0,0 +1,86 @@ +from typing import Dict +from slither.core.expressions import Literal +from slither.core.variables.variable import Variable +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.core.solidity_types import ElementaryType + +literal_replacements = [] + + +class LIR(AbstractMutator): # pylint: disable=too-few-public-methods + NAME = "LIR" + HELP = "Literal Interger Replacement" + + def _mutate(self) -> Dict: # pylint: disable=too-many-branches + result: Dict = {} + variable: Variable + + # Create fault for state variables declaration + for ( # pylint: disable=too-many-nested-blocks + variable + ) in self.contract.state_variables_declared: + if variable.initialized: + # Cannot remove the initialization of constant variables + if variable.is_constant: + continue + + if isinstance(variable.expression, Literal): + if isinstance(variable.type, ElementaryType): + literal_replacements.append(variable.type.min) # append data type min value + literal_replacements.append(variable.type.max) # append data type max value + if str(variable.type).startswith("uint"): + literal_replacements.append("1") + elif str(variable.type).startswith("uint"): + literal_replacements.append("-1") + # Get the string + start = variable.source_mapping.start + stop = start + variable.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = variable.node_initialization.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + for value in literal_replacements: + old_value = old_str[old_str.find("=") + 1 :].strip() + if old_value != value: + new_str = f"{old_str.split('=')[0]}= {value}" + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + + for ( # pylint: disable=too-many-nested-blocks + function + ) in self.contract.functions_and_modifiers_declared: + for variable in function.local_variables: + if variable.initialized and isinstance(variable.expression, Literal): + if isinstance(variable.type, ElementaryType): + literal_replacements.append(variable.type.min) + literal_replacements.append(variable.type.max) + if str(variable.type).startswith("uint"): + literal_replacements.append("1") + elif str(variable.type).startswith("uint"): + literal_replacements.append("-1") + start = variable.source_mapping.start + stop = start + variable.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = variable.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + for new_value in literal_replacements: + old_value = old_str[old_str.find("=") + 1 :].strip() + if old_value != new_value: + new_str = f"{old_str.split('=')[0]}= {new_value}" + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + return result diff --git a/slither/tools/mutator/mutators/LOR.py b/slither/tools/mutator/mutators/LOR.py new file mode 100644 index 000000000..2d1535b1a --- /dev/null +++ b/slither/tools/mutator/mutators/LOR.py @@ -0,0 +1,46 @@ +from typing import Dict +from slither.slithir.operations import Binary, BinaryType +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator + +logical_operators = [ + BinaryType.OROR, + BinaryType.ANDAND, +] + + +class LOR(AbstractMutator): # pylint: disable=too-few-public-methods + NAME = "LOR" + HELP = "Logical Operator Replacement" + + def _mutate(self) -> Dict: + result: Dict = {} + + for ( # pylint: disable=too-many-nested-blocks + function + ) in self.contract.functions_and_modifiers_declared: + for node in function.nodes: + for ir in node.irs: + if isinstance(ir, Binary) and ir.type in logical_operators: + alternative_ops = logical_operators[:] + alternative_ops.remove(ir.type) + + for op in alternative_ops: + # Get the string + start = node.source_mapping.start + stop = start + node.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = node.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + # Replace the expression with true + new_str = f"{old_str.split(ir.type.value)[0]} {op.value} {old_str.split(ir.type.value)[1]}" + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + return result diff --git a/slither/tools/mutator/mutators/MIA.py b/slither/tools/mutator/mutators/MIA.py index 405888f8b..f29569f63 100644 --- a/slither/tools/mutator/mutators/MIA.py +++ b/slither/tools/mutator/mutators/MIA.py @@ -1,39 +1,47 @@ from typing import Dict - from slither.core.cfg.node import NodeType -from slither.formatters.utils.patches import create_patch -from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator, FaultNature, FaultClass +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator +from slither.core.expressions.unary_operation import UnaryOperationType, UnaryOperation class MIA(AbstractMutator): # pylint: disable=too-few-public-methods NAME = "MIA" HELP = '"if" construct around statement' - FAULTCLASS = FaultClass.Checking - FAULTNATURE = FaultNature.Missing def _mutate(self) -> Dict: - result: Dict = {} - - for contract in self.slither.contracts: - - for function in contract.functions_declared + list(contract.modifiers_declared): - - for node in function.nodes: - if node.type == NodeType.IF: - # Retrieve the file - in_file = contract.source_mapping.filename.absolute - # Retrieve the source code - in_file_str = contract.compilation_unit.core.source_code[in_file] - - # Get the string - start = node.source_mapping.start - stop = start + node.source_mapping.length - old_str = in_file_str[start:stop] - - # Replace the expression with true - new_str = "true" - - create_patch(result, in_file, start, stop, old_str, new_str) - + for function in self.contract.functions_and_modifiers_declared: + for node in function.nodes: + if node.type == NodeType.IF: + # Get the string + start = node.expression.source_mapping.start + stop = start + node.expression.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = node.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + # Replace the expression with true and false + for value in ["true", "false"]: + new_str = value + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + + if not isinstance(node.expression, UnaryOperation): + new_str = str(UnaryOperationType.BANG) + "(" + old_str + ")" + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) return result diff --git a/slither/tools/mutator/mutators/MVIE.py b/slither/tools/mutator/mutators/MVIE.py index a16a8252e..ce51792ff 100644 --- a/slither/tools/mutator/mutators/MVIE.py +++ b/slither/tools/mutator/mutators/MVIE.py @@ -1,36 +1,60 @@ from typing import Dict - from slither.core.expressions import Literal from slither.core.variables.variable import Variable -from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator, FaultNature, FaultClass -from slither.tools.mutator.utils.generic_patching import remove_assignement +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator +from slither.tools.mutator.utils.patch import create_patch_with_line class MVIE(AbstractMutator): # pylint: disable=too-few-public-methods NAME = "MVIE" HELP = "variable initialization using an expression" - FAULTCLASS = FaultClass.Assignement - FAULTNATURE = FaultNature.Missing def _mutate(self) -> Dict: - result: Dict = {} variable: Variable - for contract in self.slither.contracts: - - # Create fault for state variables declaration - for variable in contract.state_variables_declared: - if variable.initialized: - # Cannot remove the initialization of constant variables - if variable.is_constant: - continue - - if not isinstance(variable.expression, Literal): - remove_assignement(variable, contract, result) - - for function in contract.functions_declared + list(contract.modifiers_declared): - for variable in function.local_variables: - if variable.initialized and not isinstance(variable.expression, Literal): - remove_assignement(variable, contract, result) + # Create fault for state variables declaration + for variable in self.contract.state_variables_declared: + if variable.initialized: + # Cannot remove the initialization of constant variables + if variable.is_constant: + continue + + if not isinstance(variable.expression, Literal): + # Get the string + start = variable.source_mapping.start + stop = variable.expression.source_mapping.start + old_str = self.in_file_str[start:stop] + new_str = old_str[: old_str.find("=")] + line_no = variable.node_initialization.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + create_patch_with_line( + result, + self.in_file, + start, + stop + variable.expression.source_mapping.length, + old_str, + new_str, + line_no[0], + ) + + for function in self.contract.functions_and_modifiers_declared: + for variable in function.local_variables: + if variable.initialized and not isinstance(variable.expression, Literal): + # Get the string + start = variable.source_mapping.start + stop = variable.expression.source_mapping.start + old_str = self.in_file_str[start:stop] + new_str = old_str[: old_str.find("=")] + line_no = variable.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + create_patch_with_line( + result, + self.in_file, + start, + stop + variable.expression.source_mapping.length, + old_str, + new_str, + line_no[0], + ) return result diff --git a/slither/tools/mutator/mutators/MVIV.py b/slither/tools/mutator/mutators/MVIV.py index d4a7c5486..f9e51c553 100644 --- a/slither/tools/mutator/mutators/MVIV.py +++ b/slither/tools/mutator/mutators/MVIV.py @@ -1,37 +1,59 @@ from typing import Dict - from slither.core.expressions import Literal from slither.core.variables.variable import Variable -from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator, FaultNature, FaultClass -from slither.tools.mutator.utils.generic_patching import remove_assignement +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator +from slither.tools.mutator.utils.patch import create_patch_with_line class MVIV(AbstractMutator): # pylint: disable=too-few-public-methods NAME = "MVIV" HELP = "variable initialization using a value" - FAULTCLASS = FaultClass.Assignement - FAULTNATURE = FaultNature.Missing def _mutate(self) -> Dict: - result: Dict = {} variable: Variable - for contract in self.slither.contracts: - - # Create fault for state variables declaration - for variable in contract.state_variables_declared: - if variable.initialized: - # Cannot remove the initialization of constant variables - if variable.is_constant: - continue - - if isinstance(variable.expression, Literal): - remove_assignement(variable, contract, result) - - for function in contract.functions_declared + list(contract.modifiers_declared): - for variable in function.local_variables: - if variable.initialized and isinstance(variable.expression, Literal): - remove_assignement(variable, contract, result) - + # Create fault for state variables declaration + for variable in self.contract.state_variables_declared: + if variable.initialized: + # Cannot remove the initialization of constant variables + if variable.is_constant: + continue + + if isinstance(variable.expression, Literal): + # Get the string + start = variable.source_mapping.start + stop = variable.expression.source_mapping.start + old_str = self.in_file_str[start:stop] + new_str = old_str[: old_str.find("=")] + line_no = variable.node_initialization.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + create_patch_with_line( + result, + self.in_file, + start, + stop + variable.expression.source_mapping.length, + old_str, + new_str, + line_no[0], + ) + + for function in self.contract.functions_and_modifiers_declared: + for variable in function.local_variables: + if variable.initialized and isinstance(variable.expression, Literal): + start = variable.source_mapping.start + stop = variable.expression.source_mapping.start + old_str = self.in_file_str[start:stop] + new_str = old_str[: old_str.find("=")] + line_no = variable.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + create_patch_with_line( + result, + self.in_file, + start, + stop + variable.expression.source_mapping.length, + old_str, + new_str, + line_no[0], + ) return result diff --git a/slither/tools/mutator/mutators/MWA.py b/slither/tools/mutator/mutators/MWA.py new file mode 100644 index 000000000..9682f10ca --- /dev/null +++ b/slither/tools/mutator/mutators/MWA.py @@ -0,0 +1,35 @@ +from typing import Dict +from slither.core.cfg.node import NodeType +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator +from slither.core.expressions.unary_operation import UnaryOperationType, UnaryOperation + + +class MWA(AbstractMutator): # pylint: disable=too-few-public-methods + NAME = "MWA" + HELP = '"while" construct around statement' + + def _mutate(self) -> Dict: + result: Dict = {} + + for function in self.contract.functions_and_modifiers_declared: + for node in function.nodes: + if node.type == NodeType.IFLOOP: + # Get the string + start = node.source_mapping.start + stop = start + node.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = node.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + if not isinstance(node.expression, UnaryOperation): + new_str = str(UnaryOperationType.BANG) + "(" + old_str + ")" + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + return result diff --git a/slither/tools/mutator/mutators/ROR.py b/slither/tools/mutator/mutators/ROR.py new file mode 100644 index 000000000..9daae0663 --- /dev/null +++ b/slither/tools/mutator/mutators/ROR.py @@ -0,0 +1,53 @@ +from typing import Dict +from slither.slithir.operations import Binary, BinaryType +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator + +relational_operators = [ + BinaryType.LESS, + BinaryType.GREATER, + BinaryType.LESS_EQUAL, + BinaryType.GREATER_EQUAL, + BinaryType.EQUAL, + BinaryType.NOT_EQUAL, +] + + +class ROR(AbstractMutator): # pylint: disable=too-few-public-methods + NAME = "ROR" + HELP = "Relational Operator Replacement" + + def _mutate(self) -> Dict: + result: Dict = {} + + for ( # pylint: disable=too-many-nested-blocks + function + ) in self.contract.functions_and_modifiers_declared: + for node in function.nodes: + for ir in node.irs: + if isinstance(ir, Binary) and ir.type in relational_operators: + if ( + str(ir.variable_left.type) != "address" + and str(ir.variable_right) != "address" + ): + alternative_ops = relational_operators[:] + alternative_ops.remove(ir.type) + for op in alternative_ops: + # Get the string + start = ir.expression.source_mapping.start + stop = start + ir.expression.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = node.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + # Replace the expression with true + new_str = f"{old_str.split(ir.type.value)[0]} {op.value} {old_str.split(ir.type.value)[1]}" + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + return result diff --git a/slither/tools/mutator/mutators/RR.py b/slither/tools/mutator/mutators/RR.py new file mode 100644 index 000000000..e285d7a3f --- /dev/null +++ b/slither/tools/mutator/mutators/RR.py @@ -0,0 +1,38 @@ +from typing import Dict +from slither.core.cfg.node import NodeType +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator + + +class RR(AbstractMutator): # pylint: disable=too-few-public-methods + NAME = "RR" + HELP = "Revert Replacement" + + def _mutate(self) -> Dict: + result: Dict = {} + + for function in self.contract.functions_and_modifiers_declared: + for node in function.nodes: + if node.type not in ( + NodeType.ENTRYPOINT, + NodeType.ENDIF, + NodeType.ENDLOOP, + ): + # Get the string + start = node.source_mapping.start + stop = start + node.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = node.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + if old_str != "revert()": + new_str = "revert()" + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + return result diff --git a/slither/tools/mutator/mutators/SBR.py b/slither/tools/mutator/mutators/SBR.py new file mode 100644 index 000000000..efbda4877 --- /dev/null +++ b/slither/tools/mutator/mutators/SBR.py @@ -0,0 +1,109 @@ +from typing import Dict +import re +from slither.core.cfg.node import NodeType +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator +from slither.core.variables.variable import Variable + +solidity_rules = [ + "abi\\.encode\\( ==> abi.encodePacked(", + "abi\\.encodePacked\\( ==> abi.encode(", + "\\.call([({]) ==> .delegatecall\\1", + "\\.call([({]) ==> .staticcall\\1", + "\\.delegatecall([({]) ==> .call\\1", + "\\.delegatecall([({]) ==> .staticcall\\1", + "\\.staticcall([({]) ==> .delegatecall\\1", + "\\.staticcall([({]) ==> .call\\1", + "^now$ ==> 0", + "block.timestamp ==> 0", + "msg.value ==> 0", + "msg.value ==> 1", + "(\\s)(wei|gwei) ==> \\1ether", + "(\\s)(ether|gwei) ==> \\1wei", + "(\\s)(wei|ether) ==> \\1gwei", + "(\\s)(minutes|days|hours|weeks) ==> \\1seconds", + "(\\s)(seconds|days|hours|weeks) ==> \\1minutes", + "(\\s)(seconds|minutes|hours|weeks) ==> \\1days", + "(\\s)(seconds|minutes|days|weeks) ==> \\1hours", + "(\\s)(seconds|minutes|days|hours) ==> \\1weeks", + "(\\s)(memory) ==> \\1storage", + "(\\s)(storage) ==> \\1memory", + "(\\s)(constant) ==> \\1immutable", + "addmod ==> mulmod", + "mulmod ==> addmod", + "msg.sender ==> tx.origin", + "tx.origin ==> msg.sender", + "([^u])fixed ==> \\1ufixed", + "ufixed ==> fixed", + "(u?)int16 ==> \\1int8", + "(u?)int32 ==> \\1int16", + "(u?)int64 ==> \\1int32", + "(u?)int128 ==> \\1int64", + "(u?)int256 ==> \\1int128", + "while ==> if", +] + + +class SBR(AbstractMutator): # pylint: disable=too-few-public-methods + NAME = "SBR" + HELP = "Solidity Based Replacement" + + def _mutate(self) -> Dict: + result: Dict = {} + variable: Variable + + for ( # pylint: disable=too-many-nested-blocks + function + ) in self.contract.functions_and_modifiers_declared: + for node in function.nodes: + if node.type not in ( + NodeType.ENTRYPOINT, + NodeType.ENDIF, + NodeType.ENDLOOP, + ): + # Get the string + start = node.source_mapping.start + stop = start + node.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = node.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + for value in solidity_rules: + left_value = value.split(" ==> ", maxsplit=1)[0] + right_value = value.split(" ==> ")[1] + if re.search(re.compile(left_value), old_str) is not None: + new_str = re.sub(re.compile(left_value), right_value, old_str) + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + + for ( # pylint: disable=too-many-nested-blocks + variable + ) in self.contract.state_variables_declared: + node = variable.node_initialization + if node: + start = node.source_mapping.start + stop = start + node.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = node.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + for value in solidity_rules: + left_value = value.split(" ==> ", maxsplit=1)[0] + right_value = value.split(" ==> ")[1] + if re.search(re.compile(left_value), old_str) is not None: + new_str = re.sub(re.compile(left_value), right_value, old_str) + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + return result diff --git a/slither/tools/mutator/mutators/UOR.py b/slither/tools/mutator/mutators/UOR.py new file mode 100644 index 000000000..f427c2fbf --- /dev/null +++ b/slither/tools/mutator/mutators/UOR.py @@ -0,0 +1,88 @@ +from typing import Dict +from slither.core.expressions.unary_operation import UnaryOperationType, UnaryOperation +from slither.tools.mutator.utils.patch import create_patch_with_line +from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator + +unary_operators = [ + UnaryOperationType.PLUSPLUS_PRE, + UnaryOperationType.MINUSMINUS_PRE, + UnaryOperationType.PLUSPLUS_POST, + UnaryOperationType.MINUSMINUS_POST, + UnaryOperationType.MINUS_PRE, +] + + +class UOR(AbstractMutator): # pylint: disable=too-few-public-methods + NAME = "UOR" + HELP = "Unary Operator Replacement" + + def _mutate(self) -> Dict: + result: Dict = {} + + for ( # pylint: disable=too-many-nested-blocks + function + ) in self.contract.functions_and_modifiers_declared: + for node in function.nodes: + try: + ir_expression = node.expression + except: # pylint: disable=bare-except + continue + start = node.source_mapping.start + stop = start + node.source_mapping.length + old_str = self.in_file_str[start:stop] + line_no = node.source_mapping.lines + if not line_no[0] in self.dont_mutate_line: + if ( + isinstance(ir_expression, UnaryOperation) + and ir_expression.type in unary_operators + ): + for op in unary_operators: + if not node.expression.is_prefix: + if node.expression.type != op: + variable_read = node.variables_read[0] + new_str = str(variable_read) + str(op) + if new_str != old_str and str(op) != "-": + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + new_str = str(op) + str(variable_read) + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + else: + if node.expression.type != op: + variable_read = node.variables_read[0] + new_str = str(op) + str(variable_read) + if new_str != old_str and str(op) != "-": + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + new_str = str(variable_read) + str(op) + create_patch_with_line( + result, + self.in_file, + start, + stop, + old_str, + new_str, + line_no[0], + ) + return result diff --git a/slither/tools/mutator/mutators/abstract_mutator.py b/slither/tools/mutator/mutators/abstract_mutator.py index 169d8725e..375af1e6f 100644 --- a/slither/tools/mutator/mutators/abstract_mutator.py +++ b/slither/tools/mutator/mutators/abstract_mutator.py @@ -1,46 +1,55 @@ import abc import logging -from enum import Enum -from typing import Optional, Dict - +from typing import Optional, Dict, Tuple, List from slither.core.compilation_unit import SlitherCompilationUnit from slither.formatters.utils.patches import apply_patch, create_diff +from slither.tools.mutator.utils.testing_generated_mutant import test_patch +from slither.utils.colors import yellow +from slither.core.declarations import Contract -logger = logging.getLogger("Slither") +logger = logging.getLogger("Slither-Mutate") class IncorrectMutatorInitialization(Exception): pass -class FaultClass(Enum): - Assignement = 0 - Checking = 1 - Interface = 2 - Algorithm = 3 - Undefined = 100 - - -class FaultNature(Enum): - Missing = 0 - Wrong = 1 - Extraneous = 2 - Undefined = 100 - - -class AbstractMutator(metaclass=abc.ABCMeta): # pylint: disable=too-few-public-methods +class AbstractMutator( + metaclass=abc.ABCMeta +): # pylint: disable=too-few-public-methods,too-many-instance-attributes NAME = "" HELP = "" - FAULTCLASS = FaultClass.Undefined - FAULTNATURE = FaultNature.Undefined - - def __init__( - self, compilation_unit: SlitherCompilationUnit, rate: int = 10, seed: Optional[int] = None - ): + VALID_MUTANTS_COUNT = 0 + INVALID_MUTANTS_COUNT = 0 + + def __init__( # pylint: disable=too-many-arguments + self, + compilation_unit: SlitherCompilationUnit, + timeout: int, + testing_command: str, + testing_directory: str, + contract_instance: Contract, + solc_remappings: str | None, + verbose: bool, + output_folder: str, + dont_mutate_line: List[int], + rate: int = 10, + seed: Optional[int] = None, + ) -> None: self.compilation_unit = compilation_unit self.slither = compilation_unit.core self.seed = seed self.rate = rate + self.test_command = testing_command + self.test_directory = testing_directory + self.timeout = timeout + self.solc_remappings = solc_remappings + self.verbose = verbose + self.output_folder = output_folder + self.contract = contract_instance + self.in_file = self.contract.source_mapping.filename.absolute + self.in_file_str = self.contract.compilation_unit.core.source_code[self.in_file] + self.dont_mutate_line = dont_mutate_line if not self.NAME: raise IncorrectMutatorInitialization( @@ -52,16 +61,6 @@ class AbstractMutator(metaclass=abc.ABCMeta): # pylint: disable=too-few-public- f"HELP is not initialized {self.__class__.__name__}" ) - if self.FAULTCLASS == FaultClass.Undefined: - raise IncorrectMutatorInitialization( - f"FAULTCLASS is not initialized {self.__class__.__name__}" - ) - - if self.FAULTNATURE == FaultNature.Undefined: - raise IncorrectMutatorInitialization( - f"FAULTNATURE is not initialized {self.__class__.__name__}" - ) - if rate < 0 or rate > 100: raise IncorrectMutatorInitialization( f"rate must be between 0 and 100 {self.__class__.__name__}" @@ -72,25 +71,50 @@ class AbstractMutator(metaclass=abc.ABCMeta): # pylint: disable=too-few-public- """TODO Documentation""" return {} - def mutate(self) -> None: - all_patches = self._mutate() - + def mutate(self) -> Tuple[int, int, List[int]]: + # call _mutate function from different mutators + (all_patches) = self._mutate() if "patches" not in all_patches: - logger.debug(f"No patches found by {self.NAME}") - return + logger.debug("No patches found by %s", self.NAME) + return (0, 0, self.dont_mutate_line) for file in all_patches["patches"]: original_txt = self.slither.source_code[file].encode("utf8") - patched_txt = original_txt - offset = 0 patches = all_patches["patches"][file] patches.sort(key=lambda x: x["start"]) - if not all(patches[i]["end"] <= patches[i + 1]["end"] for i in range(len(patches) - 1)): - logger.info(f"Impossible to generate patch; patches collisions: {patches}") - continue + logger.info(yellow(f"Mutating {file} with {self.NAME} \n")) for patch in patches: - patched_txt, offset = apply_patch(patched_txt, patch, offset) - diff = create_diff(self.compilation_unit, original_txt, patched_txt, file) - if not diff: - logger.info(f"Impossible to generate patch; empty {patches}") - print(diff) + # test the patch + flag = test_patch( + file, + patch, + self.test_command, + self.VALID_MUTANTS_COUNT, + self.NAME, + self.timeout, + self.solc_remappings, + self.verbose, + ) + # if RR or CR and valid mutant, add line no. + if self.NAME in ("RR", "CR") and flag: + self.dont_mutate_line.append(patch["line_number"]) + # count the valid and invalid mutants + if not flag: + self.INVALID_MUTANTS_COUNT += 1 + continue + self.VALID_MUTANTS_COUNT += 1 + patched_txt, _ = apply_patch(original_txt, patch, 0) + diff = create_diff(self.compilation_unit, original_txt, patched_txt, file) + if not diff: + logger.info(f"Impossible to generate patch; empty {patches}") + + # add valid mutant patches to a output file + with open( + self.output_folder + "/patches_file.txt", "a", encoding="utf8" + ) as patches_file: + patches_file.write(diff + "\n") + return ( + self.VALID_MUTANTS_COUNT, + self.INVALID_MUTANTS_COUNT, + self.dont_mutate_line, + ) diff --git a/slither/tools/mutator/mutators/all_mutators.py b/slither/tools/mutator/mutators/all_mutators.py index 5508fb68e..b02a2cc9b 100644 --- a/slither/tools/mutator/mutators/all_mutators.py +++ b/slither/tools/mutator/mutators/all_mutators.py @@ -1,4 +1,16 @@ # pylint: disable=unused-import -from slither.tools.mutator.mutators.MVIV import MVIV -from slither.tools.mutator.mutators.MVIE import MVIE -from slither.tools.mutator.mutators.MIA import MIA +from slither.tools.mutator.mutators.MVIV import MVIV # severity low +from slither.tools.mutator.mutators.MVIE import MVIE # severity low +from slither.tools.mutator.mutators.LOR import LOR # severity medium +from slither.tools.mutator.mutators.UOR import UOR # severity medium +from slither.tools.mutator.mutators.SBR import SBR # severity medium +from slither.tools.mutator.mutators.AOR import AOR # severity medium +from slither.tools.mutator.mutators.BOR import BOR # severity medium +from slither.tools.mutator.mutators.ASOR import ASOR # severity medium +from slither.tools.mutator.mutators.MWA import MWA # severity medium +from slither.tools.mutator.mutators.LIR import LIR # severity medium +from slither.tools.mutator.mutators.FHR import FHR # severity medium +from slither.tools.mutator.mutators.MIA import MIA # severity medium +from slither.tools.mutator.mutators.ROR import ROR # severity medium +from slither.tools.mutator.mutators.RR import RR # severity high +from slither.tools.mutator.mutators.CR import CR # severity high diff --git a/slither/tools/mutator/utils/command_line.py b/slither/tools/mutator/utils/command_line.py index feb479c5c..79d705097 100644 --- a/slither/tools/mutator/utils/command_line.py +++ b/slither/tools/mutator/utils/command_line.py @@ -1,5 +1,4 @@ from typing import List, Type - from slither.tools.mutator.mutators.abstract_mutator import AbstractMutator from slither.utils.myprettytable import MyPrettyTable @@ -9,15 +8,13 @@ def output_mutators(mutators_classes: List[Type[AbstractMutator]]) -> None: for detector in mutators_classes: argument = detector.NAME help_info = detector.HELP - fault_class = detector.FAULTCLASS.name - fault_nature = detector.FAULTNATURE.name - mutators_list.append((argument, help_info, fault_class, fault_nature)) - table = MyPrettyTable(["Num", "Name", "What it Does", "Fault Class", "Fault Nature"]) + mutators_list.append((argument, help_info)) + table = MyPrettyTable(["Num", "Name", "What it Does"]) - # Sort by class, nature, name - mutators_list = sorted(mutators_list, key=lambda element: (element[2], element[3], element[0])) + # Sort by class + mutators_list = sorted(mutators_list, key=lambda element: (element[0])) idx = 1 - for (argument, help_info, fault_class, fault_nature) in mutators_list: - table.add_row([str(idx), argument, help_info, fault_class, fault_nature]) + for argument, help_info in mutators_list: + table.add_row([str(idx), argument, help_info]) idx = idx + 1 print(table) diff --git a/slither/tools/mutator/utils/file_handling.py b/slither/tools/mutator/utils/file_handling.py new file mode 100644 index 000000000..ddb3efb50 --- /dev/null +++ b/slither/tools/mutator/utils/file_handling.py @@ -0,0 +1,130 @@ +import os +from typing import Dict, List +import logging + +logger = logging.getLogger("Slither-Mutate") + +duplicated_files = {} + + +def backup_source_file(source_code: Dict, output_folder: str) -> Dict: + """ + function to backup the source file + returns: dictionary of duplicated files + """ + os.makedirs(output_folder, exist_ok=True) + + for file_path, content in source_code.items(): + directory, filename = os.path.split(file_path) + new_filename = f"{output_folder}/backup_{filename}" + new_file_path = os.path.join(directory, new_filename) + + with open(new_file_path, "w", encoding="utf8") as new_file: + new_file.write(content) + duplicated_files[file_path] = new_file_path + + return duplicated_files + + +def transfer_and_delete(files_dict: Dict) -> None: + """function to transfer the original content to the sol file after campaign""" + try: + files_dict_copy = files_dict.copy() + for item, value in files_dict_copy.items(): + with open(value, "r", encoding="utf8") as duplicated_file: + content = duplicated_file.read() + + with open(item, "w", encoding="utf8") as original_file: + original_file.write(content) + + os.remove(value) + + # delete elements from the global dict + del duplicated_files[item] + + except Exception as e: # pylint: disable=broad-except + logger.error(f"Error transferring content: {e}") + + +def create_mutant_file(file: str, count: int, rule: str) -> None: + """function to create new mutant file""" + try: + _, filename = os.path.split(file) + # Read content from the duplicated file + with open(file, "r", encoding="utf8") as source_file: + content = source_file.read() + + # Write content to the original file + mutant_name = filename.split(".")[0] + + # create folder for each contract + os.makedirs("mutation_campaign/" + mutant_name, exist_ok=True) + with open( + "mutation_campaign/" + + mutant_name + + "/" + + mutant_name + + "_" + + rule + + "_" + + str(count) + + ".sol", + "w", + encoding="utf8", + ) as mutant_file: + mutant_file.write(content) + + # reset the file + with open(duplicated_files[file], "r", encoding="utf8") as duplicated_file: + duplicate_content = duplicated_file.read() + + with open(file, "w", encoding="utf8") as source_file: + source_file.write(duplicate_content) + + except Exception as e: # pylint: disable=broad-except + logger.error(f"Error creating mutant: {e}") + + +def reset_file(file: str) -> None: + """function to reset the file""" + try: + # directory, filename = os.path.split(file) + # reset the file + with open(duplicated_files[file], "r", encoding="utf8") as duplicated_file: + duplicate_content = duplicated_file.read() + + with open(file, "w", encoding="utf8") as source_file: + source_file.write(duplicate_content) + + except Exception as e: # pylint: disable=broad-except + logger.error(f"Error resetting file: {e}") + + +def get_sol_file_list(codebase: str, ignore_paths: List[str] | None) -> List[str]: + """ + function to get the contracts list + returns: list of .sol files + """ + sol_file_list = [] + if ignore_paths is None: + ignore_paths = [] + + # if input is contract file + if os.path.isfile(codebase): + return [codebase] + + # if input is folder + if os.path.isdir(codebase): + directory = os.path.abspath(codebase) + for file in os.listdir(directory): + filename = os.path.join(directory, file) + if os.path.isfile(filename): + sol_file_list.append(filename) + elif os.path.isdir(filename): + _, dirname = os.path.split(filename) + if dirname in ignore_paths: + continue + for i in get_sol_file_list(filename, ignore_paths): + sol_file_list.append(i) + + return sol_file_list diff --git a/slither/tools/mutator/utils/generic_patching.py b/slither/tools/mutator/utils/generic_patching.py deleted file mode 100644 index d773ea784..000000000 --- a/slither/tools/mutator/utils/generic_patching.py +++ /dev/null @@ -1,36 +0,0 @@ -from typing import Dict - -from slither.core.declarations import Contract -from slither.core.variables.variable import Variable -from slither.formatters.utils.patches import create_patch - - -def remove_assignement(variable: Variable, contract: Contract, result: Dict): - """ - Remove the variable's initial assignement - - :param variable: - :param contract: - :param result: - :return: - """ - # Retrieve the file - in_file = contract.source_mapping.filename.absolute - # Retrieve the source code - in_file_str = contract.compilation_unit.core.source_code[in_file] - - # Get the string - start = variable.source_mapping.start - stop = variable.expression.source_mapping.start - old_str = in_file_str[start:stop] - - new_str = old_str[: old_str.find("=")] - - create_patch( - result, - in_file, - start, - stop + variable.expression.source_mapping.length, - old_str, - new_str, - ) diff --git a/slither/tools/mutator/utils/patch.py b/slither/tools/mutator/utils/patch.py new file mode 100644 index 000000000..54ff81e60 --- /dev/null +++ b/slither/tools/mutator/utils/patch.py @@ -0,0 +1,29 @@ +from typing import Dict, Union +from collections import defaultdict + + +# pylint: disable=too-many-arguments +def create_patch_with_line( + result: Dict, + file: str, + start: int, + end: int, + old_str: Union[str, bytes], + new_str: Union[str, bytes], + line_no: int, +) -> None: + if isinstance(old_str, bytes): + old_str = old_str.decode("utf8") + if isinstance(new_str, bytes): + new_str = new_str.decode("utf8") + p = { + "start": start, + "end": end, + "old_string": old_str, + "new_string": new_str, + "line_number": line_no, + } + if "patches" not in result: + result["patches"] = defaultdict(list) + if p not in result["patches"][file]: + result["patches"][file].append(p) diff --git a/slither/tools/mutator/utils/testing_generated_mutant.py b/slither/tools/mutator/utils/testing_generated_mutant.py new file mode 100644 index 000000000..4c51b7e5a --- /dev/null +++ b/slither/tools/mutator/utils/testing_generated_mutant.py @@ -0,0 +1,100 @@ +import subprocess +import os +import logging +import time +import signal +from typing import Dict +import crytic_compile +from slither.tools.mutator.utils.file_handling import create_mutant_file, reset_file +from slither.utils.colors import green, red + +logger = logging.getLogger("Slither-Mutate") + + +def compile_generated_mutant(file_path: str, mappings: str) -> bool: + """ + function to compile the generated mutant + returns: status of compilation + """ + try: + crytic_compile.CryticCompile(file_path, solc_remaps=mappings) + return True + except: # pylint: disable=bare-except + return False + + +def run_test_cmd(cmd: str, test_dir: str, timeout: int) -> bool: + """ + function to run codebase tests + returns: boolean whether the tests passed or not + """ + # future purpose + _ = test_dir + # add --fail-fast for foundry tests, to exit after first failure + if "forge test" in cmd and "--fail-fast" not in cmd: + cmd += " --fail-fast" + # add --bail for hardhat and truffle tests, to exit after first failure + elif "hardhat test" in cmd or "truffle test" in cmd and "--bail" not in cmd: + cmd += " --bail" + + start = time.time() + + # starting new process + with subprocess.Popen([cmd], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as P: + try: + # checking whether the process is completed or not within 30 seconds(default) + while P.poll() is None and (time.time() - start) < timeout: + time.sleep(0.05) + finally: + if P.poll() is None: + logger.error("HAD TO TERMINATE ANALYSIS (TIMEOUT OR EXCEPTION)") + # sends a SIGTERM signal to process group - bascially killing the process + os.killpg(os.getpgid(P.pid), signal.SIGTERM) + # Avoid any weird race conditions from grabbing the return code + time.sleep(0.05) + # indicates whether the command executed sucessfully or not + r = P.returncode + + # if r is 0 then it is valid mutant because tests didn't fail + return r == 0 + + +def test_patch( # pylint: disable=too-many-arguments + file: str, + patch: Dict, + command: str, + index: int, + generator_name: str, + timeout: int, + mappings: str | None, + verbose: bool, +) -> bool: + """ + function to verify the validity of each patch + returns: valid or invalid patch + """ + with open(file, "r", encoding="utf-8") as filepath: + content = filepath.read() + # Perform the replacement based on the index values + replaced_content = content[: patch["start"]] + patch["new_string"] + content[patch["end"] :] + # Write the modified content back to the file + with open(file, "w", encoding="utf-8") as filepath: + filepath.write(replaced_content) + if compile_generated_mutant(file, mappings): + if run_test_cmd(command, file, timeout): + create_mutant_file(file, index, generator_name) + print( + green( + f"String '{patch['old_string']}' replaced with '{patch['new_string']}' at line no. '{patch['line_number']}' ---> VALID\n" + ) + ) + return True + + reset_file(file) + if verbose: + print( + red( + f"String '{patch['old_string']}' replaced with '{patch['new_string']}' at line no. '{patch['line_number']}' ---> INVALID\n" + ) + ) + return False diff --git a/slither/tools/properties/__main__.py b/slither/tools/properties/__main__.py index 10837bb4b..b5e5c911a 100644 --- a/slither/tools/properties/__main__.py +++ b/slither/tools/properties/__main__.py @@ -68,13 +68,13 @@ def parse_args() -> argparse.Namespace: :return: Returns the arguments for the program. """ parser = argparse.ArgumentParser( - description="Demo", - usage="slither-demo filename", + description="Generates code properties (e.g., invariants) that can be tested with unit tests or Echidna, entirely automatically.", + usage="slither-prop filename", formatter_class=argparse.RawDescriptionHelpFormatter, ) parser.add_argument( - "filename", help="The filename of the contract or truffle directory to analyze." + "filename", help="The filename of the contract or project directory to analyze." ) parser.add_argument("--contract", help="The targeted contract.") diff --git a/slither/tools/read_storage/README.md b/slither/tools/read_storage/README.md index 677b2c772..dd7ef2865 100644 --- a/slither/tools/read_storage/README.md +++ b/slither/tools/read_storage/README.md @@ -8,20 +8,29 @@ Slither-read-storage is a tool to retrieve the storage slots and values of entir ```shell positional arguments: - contract_source (DIR) ADDRESS The deployed contract address if verified on etherscan. Prepend project directory for unverified contracts. + contract_source The deployed contract address if verified on etherscan. Prepend project directory for unverified contracts. optional arguments: - --variable-name VARIABLE_NAME The name of the variable whose value will be returned. - --rpc-url RPC_URL An endpoint for web3 requests. - --key KEY The key/ index whose value will be returned from a mapping or array. - --deep-key DEEP_KEY The key/ index whose value will be returned from a deep mapping or multidimensional array. - --struct-var STRUCT_VAR The name of the variable whose value will be returned from a struct. - --storage-address STORAGE_ADDRESS The address of the storage contract (if a proxy pattern is used). - --contract-name CONTRACT_NAME The name of the logic contract. - --json FILE Write the entire storage layout in JSON format to the specified FILE - --value Toggle used to include values in output. - --max-depth MAX_DEPTH Max depth to search in data structure. - --block BLOCK_NUMBER Block number to retrieve storage from (requires archive rpc node) + -h, --help show this help message and exit + --variable-name VARIABLE_NAME + The name of the variable whose value will be returned. + --rpc-url RPC_URL An endpoint for web3 requests. + --key KEY The key/ index whose value will be returned from a mapping or array. + --deep-key DEEP_KEY The key/ index whose value will be returned from a deep mapping or multidimensional array. + --struct-var STRUCT_VAR + The name of the variable whose value will be returned from a struct. + --storage-address STORAGE_ADDRESS + The address of the storage contract (if a proxy pattern is used). + --contract-name CONTRACT_NAME + The name of the logic contract. + --json JSON Save the result in a JSON file. + --value Toggle used to include values in output. + --table Print table view of storage layout + --silent Silence log outputs + --max-depth MAX_DEPTH + Max depth to search in data structure. + --block BLOCK The block number to read storage from. Requires an archive node to be provided as the RPC url. + --unstructured Include unstructured storage slots ``` ### Examples diff --git a/slither/tools/read_storage/__init__.py b/slither/tools/read_storage/__init__.py index dbc1e5bc0..df9b8280d 100644 --- a/slither/tools/read_storage/__init__.py +++ b/slither/tools/read_storage/__init__.py @@ -1 +1 @@ -from .read_storage import SlitherReadStorage +from .read_storage import SlitherReadStorage, RpcInfo diff --git a/slither/tools/read_storage/__main__.py b/slither/tools/read_storage/__main__.py index 1a8901321..3baa5d351 100644 --- a/slither/tools/read_storage/__main__.py +++ b/slither/tools/read_storage/__main__.py @@ -7,7 +7,8 @@ import argparse from crytic_compile import cryticparser from slither import Slither -from slither.tools.read_storage.read_storage import SlitherReadStorage +from slither.exceptions import SlitherError +from slither.tools.read_storage.read_storage import SlitherReadStorage, RpcInfo def parse_args() -> argparse.Namespace: @@ -104,6 +105,12 @@ def parse_args() -> argparse.Namespace: default="latest", ) + parser.add_argument( + "--unstructured", + action="store_true", + help="Include unstructured storage slots", + ) + cryticparser.init(parser) return parser.parse_args() @@ -123,25 +130,25 @@ def main() -> None: if args.contract_name: contracts = slither.get_contract_from_name(args.contract_name) + if len(contracts) == 0: + raise SlitherError(f"Contract {args.contract_name} not found.") else: contracts = slither.contracts - srs = SlitherReadStorage(contracts, args.max_depth) - - try: - srs.block = int(args.block) - except ValueError: - srs.block = str(args.block or "latest") - + rpc_info = None if args.rpc_url: - # Remove target prefix e.g. rinkeby:0x0 -> 0x0. - address = target[target.find(":") + 1 :] - # Default to implementation address unless a storage address is given. - if not args.storage_address: - args.storage_address = address - srs.storage_address = args.storage_address - - srs.rpc = args.rpc_url + valid = ["latest", "earliest", "pending", "safe", "finalized"] + block = args.block if args.block in valid else int(args.block) + rpc_info = RpcInfo(args.rpc_url, block) + + srs = SlitherReadStorage(contracts, args.max_depth, rpc_info) + srs.unstructured = bool(args.unstructured) + # Remove target prefix e.g. rinkeby:0x0 -> 0x0. + address = target[target.find(":") + 1 :] + # Default to implementation address unless a storage address is given. + if not args.storage_address: + args.storage_address = address + srs.storage_address = args.storage_address if args.variable_name: # Use a lambda func to only return variables that have same name as target. diff --git a/slither/tools/read_storage/read_storage.py b/slither/tools/read_storage/read_storage.py index 2947081da..8c0cf515d 100644 --- a/slither/tools/read_storage/read_storage.py +++ b/slither/tools/read_storage/read_storage.py @@ -6,15 +6,30 @@ import dataclasses from eth_abi import decode, encode from eth_typing.evm import ChecksumAddress -from eth_utils import keccak +from eth_utils import keccak, to_checksum_address from web3 import Web3 +from web3.types import BlockIdentifier +from web3.exceptions import ExtraDataLengthError +from web3.middleware import geth_poa_middleware from slither.core.declarations import Contract, Structure from slither.core.solidity_types import ArrayType, ElementaryType, MappingType, UserDefinedType from slither.core.solidity_types.type import Type +from slither.core.cfg.node import NodeType from slither.core.variables.state_variable import StateVariable from slither.core.variables.structure_variable import StructureVariable +from slither.core.expressions import ( + AssignmentOperation, + Literal, + Identifier, + BinaryOperation, + UnaryOperation, + TupleExpression, + TypeConversion, + CallExpression, +) from slither.utils.myprettytable import MyPrettyTable +from slither.visitors.expression.constants_folding import ConstantFolding, NotConstant from .utils import coerce_type, get_offset_value, get_storage_data @@ -42,20 +57,47 @@ class SlitherReadStorageException(Exception): pass -# pylint: disable=too-many-instance-attributes +class RpcInfo: + def __init__(self, rpc_url: str, block: BlockIdentifier = "latest") -> None: + assert isinstance(block, int) or block in [ + "latest", + "earliest", + "pending", + "safe", + "finalized", + ] + self.rpc: str = rpc_url + self._web3: Web3 = Web3(Web3.HTTPProvider(self.rpc)) + """If the RPC is for a POA network, the first call to get_block fails, so we inject geth_poa_middleware""" + try: + self._block: int = self.web3.eth.get_block(block)["number"] + except ExtraDataLengthError: + self._web3.middleware_onion.inject(geth_poa_middleware, layer=0) + self._block: int = self.web3.eth.get_block(block)["number"] + + @property + def web3(self) -> Web3: + return self._web3 + + @property + def block(self) -> int: + return self._block + + +# pylint: disable=too-many-instance-attributes,too-many-public-methods class SlitherReadStorage: - def __init__(self, contracts: List[Contract], max_depth: int) -> None: + def __init__(self, contracts: List[Contract], max_depth: int, rpc_info: RpcInfo = None) -> None: self._checksum_address: Optional[ChecksumAddress] = None self._contracts: List[Contract] = contracts self._log: str = "" self._max_depth: int = max_depth self._slot_info: Dict[str, SlotInfo] = {} self._target_variables: List[Tuple[Contract, StateVariable]] = [] - self._web3: Optional[Web3] = None - self.block: Union[str, int] = "latest" - self.rpc: Optional[str] = None + self._constant_storage_slots: List[Tuple[Contract, StateVariable]] = [] + self.rpc_info: Optional[RpcInfo] = rpc_info self.storage_address: Optional[str] = None self.table: Optional[MyPrettyTable] = None + self.unstructured: bool = False @property def contracts(self) -> List[Contract]: @@ -73,18 +115,12 @@ class SlitherReadStorage: def log(self, log: str) -> None: self._log = log - @property - def web3(self) -> Web3: - if not self._web3: - self._web3 = Web3(Web3.HTTPProvider(self.rpc)) - return self._web3 - @property def checksum_address(self) -> ChecksumAddress: if not self.storage_address: raise ValueError if not self._checksum_address: - self._checksum_address = self.web3.to_checksum_address(self.storage_address) + self._checksum_address = to_checksum_address(self.storage_address) return self._checksum_address @property @@ -92,6 +128,11 @@ class SlitherReadStorage: """Storage variables (not constant or immutable) and their associated contract.""" return self._target_variables + @property + def constant_slots(self) -> List[Tuple[Contract, StateVariable]]: + """Constant bytes32 variables and their associated contract.""" + return self._constant_storage_slots + @property def slot_info(self) -> Dict[str, SlotInfo]: """Contains the location, type, size, offset, and value of contract slots.""" @@ -111,9 +152,48 @@ class SlitherReadStorage: elif isinstance(type_, ArrayType): elems = self._all_array_slots(var, contract, type_, info.slot) tmp[var.name].elems = elems - + if self.unstructured: + tmp.update(self.get_unstructured_layout()) self._slot_info = tmp + def get_unstructured_layout(self) -> Dict[str, SlotInfo]: + tmp: Dict[str, SlotInfo] = {} + for _, var in self.constant_slots: + var_name = var.name + try: + exp = var.expression + if isinstance( + exp, + ( + BinaryOperation, + UnaryOperation, + Identifier, + TupleExpression, + TypeConversion, + CallExpression, + ), + ): + exp = ConstantFolding(exp, "bytes32").result() + if isinstance(exp, Literal): + slot = coerce_type("int", exp.value) + else: + continue + offset = 0 + type_string, size = self.find_constant_slot_storage_type(var) + if type_string: + tmp[var.name] = SlotInfo( + name=var_name, type_string=type_string, slot=slot, size=size, offset=offset + ) + self.log += ( + f"\nSlot Name: {var_name}\nType: bytes32" + f"\nStorage Type: {type_string}\nSlot: {str(exp)}\n" + ) + logger.info(self.log) + self.log = "" + except NotConstant: + continue + return tmp + # TODO: remove this pylint exception (montyly) # pylint: disable=too-many-locals def get_storage_slot( @@ -122,7 +202,8 @@ class SlitherReadStorage: contract: Contract, **kwargs: Any, ) -> Union[SlotInfo, None]: - """Finds the storage slot of a variable in a given contract. + """ + Finds the storage slot of a variable in a given contract. Args: target_variable (`StateVariable`): The variable to retrieve the slot for. contracts (`Contract`): The contract that contains the given state variable. @@ -208,6 +289,78 @@ class SlitherReadStorage: if slot_info: self._slot_info[f"{contract.name}.{var.name}"] = slot_info + def find_constant_slot_storage_type( + self, var: StateVariable + ) -> Tuple[Optional[str], Optional[int]]: + """ + Given a constant bytes32 StateVariable, tries to determine which variable type is stored there, using the + heuristic that if a function reads from the slot and returns a value, it probably stores that type of value. + Also uses the StorageSlot library as a heuristic when a function has no return but uses the library's getters. + Args: + var (StateVariable): The constant bytes32 storage slot. + + Returns: + type (str): The type of value stored in the slot. + size (int): The type's size in bits. + """ + assert var.is_constant and var.type == ElementaryType("bytes32") + storage_type = None + size = None + funcs = [] + for c in self.contracts: + c_funcs = c.get_functions_reading_from_variable(var) + c_funcs.extend( + f + for f in c.functions + if any(str(v.expression) == str(var.expression) for v in f.variables) + ) + c_funcs = list(set(c_funcs)) + funcs.extend(c_funcs) + fallback = [f for f in var.contract.functions if f.is_fallback] + funcs += fallback + for func in funcs: + rets = func.return_type if func.return_type is not None else [] + for ret in rets: + size, _ = ret.storage_size + if size <= 32: + return str(ret), size * 8 + for node in func.all_nodes(): + exp = node.expression + # Look for use of the common OpenZeppelin StorageSlot library + if f"getAddressSlot({var.name})" in str(exp): + return "address", 160 + if f"getBooleanSlot({var.name})" in str(exp): + return "bool", 1 + if f"getBytes32Slot({var.name})" in str(exp): + return "bytes32", 256 + if f"getUint256Slot({var.name})" in str(exp): + return "uint256", 256 + # Look for variable assignment in assembly loaded from a hardcoded slot + if ( + isinstance(exp, AssignmentOperation) + and isinstance(exp.expression_left, Identifier) + and isinstance(exp.expression_right, CallExpression) + and "sload" in str(exp.expression_right.called) + and str(exp.expression_right.arguments[0]) == str(var.expression) + ): + if func.is_fallback: + return "address", 160 + storage_type = exp.expression_left.value.type.name + size, _ = exp.expression_left.value.type.storage_size + return storage_type, size * 8 + # Look for variable storage in assembly stored to a hardcoded slot + if ( + isinstance(exp, CallExpression) + and "sstore" in str(exp.called) + and isinstance(exp.arguments[0], Identifier) + and isinstance(exp.arguments[1], Identifier) + and str(exp.arguments[0].value.expression) == str(var.expression) + ): + storage_type = exp.arguments[1].value.type.name + size, _ = exp.arguments[1].value.type.storage_size + return storage_type, size * 8 + return storage_type, size + def walk_slot_info(self, func: Callable) -> None: stack = list(self.slot_info.values()) while stack: @@ -220,39 +373,178 @@ class SlitherReadStorage: func(slot_info) def get_slot_values(self, slot_info: SlotInfo) -> None: - """Fetches the slot value of `SlotInfo` object + """ + Fetches the slot value of `SlotInfo` object :param slot_info: """ + assert self.rpc_info is not None hex_bytes = get_storage_data( - self.web3, + self.rpc_info.web3, self.checksum_address, int.to_bytes(slot_info.slot, 32, byteorder="big"), - self.block, + self.rpc_info.block, ) slot_info.value = self.convert_value_to_type( hex_bytes, slot_info.size, slot_info.offset, slot_info.type_string ) logger.info(f"\nValue: {slot_info.value}\n") - def get_all_storage_variables(self, func: Callable = None) -> None: - """Fetches all storage variables from a list of contracts. + def get_all_storage_variables(self, func: Callable = lambda x: x) -> None: + """ + Fetches all storage variables from a list of contracts. kwargs: func (Callable, optional): A criteria to filter functions e.g. name. """ for contract in self.contracts: - self._target_variables.extend( - filter( - func, - [ - (contract, var) - for var in contract.state_variables_ordered - if not var.is_constant and not var.is_immutable - ], - ) + for var in contract.state_variables_ordered: + if func(var): + if not var.is_constant and not var.is_immutable: + self._target_variables.append((contract, var)) + elif ( + self.unstructured + and var.is_constant + and var.type == ElementaryType("bytes32") + ): + self._constant_storage_slots.append((contract, var)) + if self.unstructured: + hardcoded_slot = self.find_hardcoded_slot_in_fallback(contract) + if hardcoded_slot is not None: + self._constant_storage_slots.append((contract, hardcoded_slot)) + + def find_hardcoded_slot_in_fallback(self, contract: Contract) -> Optional[StateVariable]: + """ + Searches the contract's fallback function for a sload from a literal storage slot, i.e., + `let contractLogic := sload(0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7)`. + + Args: + contract: a Contract object, which should have a fallback function. + + Returns: + A newly created StateVariable representing the Literal bytes32 slot, if one is found, otherwise None. + """ + fallback = None + for func in contract.functions_entry_points: + if func.is_fallback: + fallback = func + break + if fallback is None: + return None + queue = [fallback.entry_point] + visited = [] + while len(queue) > 0: + node = queue.pop(0) + visited.append(node) + queue.extend(son for son in node.sons if son not in visited) + if node.type == NodeType.ASSEMBLY and isinstance(node.inline_asm, str): + return SlitherReadStorage.find_hardcoded_slot_in_asm_str(node.inline_asm, contract) + if node.type == NodeType.EXPRESSION: + sv = self.find_hardcoded_slot_in_exp(node.expression, contract) + if sv is not None: + return sv + return None + + @staticmethod + def find_hardcoded_slot_in_asm_str( + inline_asm: str, contract: Contract + ) -> Optional[StateVariable]: + """ + Searches a block of assembly code (given as a string) for a sload from a literal storage slot. + Does not work if the argument passed to sload does not start with "0x", i.e., `sload(add(1,1))` + or `and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)`. + + Args: + inline_asm: a string containing all the code in an assembly node (node.inline_asm for solc < 0.6.0). + + Returns: + A newly created StateVariable representing the Literal bytes32 slot, if one is found, otherwise None. + """ + asm_split = inline_asm.split("\n") + for asm in asm_split: + if "sload(" in asm: # Only handle literals + arg = asm.split("sload(")[1].split(")")[0] + if arg.startswith("0x"): + exp = Literal(arg, ElementaryType("bytes32")) + sv = StateVariable() + sv.name = "fallback_sload_hardcoded" + sv.expression = exp + sv.is_constant = True + sv.type = exp.type + sv.set_contract(contract) + return sv + return None + + def find_hardcoded_slot_in_exp( + self, exp: "Expression", contract: Contract + ) -> Optional[StateVariable]: + """ + Parses an expression to see if it contains a sload from a literal storage slot, + unrolling nested expressions if necessary to determine which slot it loads from. + Args: + exp: an Expression object to search. + contract: the Contract containing exp. + + Returns: + A newly created StateVariable representing the Literal bytes32 slot, if one is found, otherwise None. + """ + if isinstance(exp, AssignmentOperation): + exp = exp.expression_right + while isinstance(exp, BinaryOperation): + exp = next( + (e for e in exp.expressions if isinstance(e, (CallExpression, BinaryOperation))), + exp.expression_left, ) + while isinstance(exp, CallExpression) and len(exp.arguments) > 0: + called = exp.called + exp = exp.arguments[0] + if "sload" in str(called): + break + if isinstance( + exp, + ( + BinaryOperation, + UnaryOperation, + Identifier, + TupleExpression, + TypeConversion, + CallExpression, + ), + ): + try: + exp = ConstantFolding(exp, "bytes32").result() + except NotConstant: + return None + if ( + isinstance(exp, Literal) + and isinstance(exp.type, ElementaryType) + and exp.type.name in ["bytes32", "uint256"] + ): + sv = StateVariable() + sv.name = "fallback_sload_hardcoded" + value = exp.value + str_value = str(value) + if str_value.isdecimal(): + value = int(value) + if isinstance(value, (int, bytes)): + if isinstance(value, bytes): + str_value = "0x" + value.hex() + value = int(str_value, 16) + exp = Literal(str_value, ElementaryType("bytes32")) + state_var_slots = [ + self.get_variable_info(contract, var)[0] + for contract, var in self.target_variables + ] + if value in state_var_slots: + return None + sv.expression = exp + sv.is_constant = True + sv.type = ElementaryType("bytes32") + sv.set_contract(contract) + return sv + return None def convert_slot_info_to_rows(self, slot_info: SlotInfo) -> None: - """Convert and append slot info to table. Create table if it + """ + Convert and append slot info to table. Create table if it does not yet exist :param slot_info: """ @@ -270,7 +562,8 @@ class SlitherReadStorage: def _find_struct_var_slot( elems: List[StructureVariable], slot_as_bytes: bytes, struct_var: str ) -> Tuple[str, str, bytes, int, int]: - """Finds the slot of a structure variable. + """ + Finds the slot of a structure variable. Args: elems (List[StructureVariable]): Ordered list of structure variables. slot_as_bytes (bytes): The slot of the struct to begin searching at. @@ -312,7 +605,8 @@ class SlitherReadStorage: deep_key: int = None, struct_var: str = None, ) -> Tuple[str, str, bytes, int, int]: - """Finds the slot of array's index. + """ + Finds the slot of array's index. Args: target_variable (`StateVariable`): The array that contains the target variable. slot (bytes): The starting slot of the array. @@ -415,7 +709,8 @@ class SlitherReadStorage: deep_key: Union[int, str] = None, struct_var: str = None, ) -> Tuple[str, str, bytes, int, int]: - """Finds the data slot of a target variable within a mapping. + """ + Finds the data slot of a target variable within a mapping. target_variable (`StateVariable`): The mapping that contains the target variable. slot (bytes): The starting slot of the mapping. key (Union[int, str]): The key the variable is stored at. @@ -486,7 +781,7 @@ class SlitherReadStorage: ) info += info_tmp - # TODO: suppory mapping with dynamic arrays + # TODO: support mapping with dynamic arrays # mapping(elem => elem) elif isinstance(target_variable_type.type_to, ElementaryType): @@ -592,7 +887,8 @@ class SlitherReadStorage: return elems def _get_array_length(self, type_: Type, slot: int) -> int: - """Gets the length of dynamic and fixed arrays. + """ + Gets the length of dynamic and fixed arrays. Args: type_ (`AbstractType`): The array type. slot (int): Slot a dynamic array's length is stored at. @@ -600,15 +896,15 @@ class SlitherReadStorage: (int): The length of the array. """ val = 0 - if self.rpc: + if self.rpc_info: # The length of dynamic arrays is stored at the starting slot. # Convert from hexadecimal to decimal. val = int( get_storage_data( - self.web3, + self.rpc_info.web3, self.checksum_address, int.to_bytes(slot, 32, byteorder="big"), - self.block, + self.rpc_info.block, ).hex(), 16, ) diff --git a/slither/tools/read_storage/utils/utils.py b/slither/tools/read_storage/utils/utils.py index 4a04a5b6d..20e7c1372 100644 --- a/slither/tools/read_storage/utils/utils.py +++ b/slither/tools/read_storage/utils/utils.py @@ -37,6 +37,8 @@ def coerce_type( (Union[int, bool, str, ChecksumAddress, hex]): The type representation of the value. """ if "int" in solidity_type: + if str(value).startswith("0x"): + return to_int(hexstr=value) return to_int(value) if "bool" in solidity_type: return bool(to_int(value)) diff --git a/slither/utils/ck.py b/slither/utils/ck.py new file mode 100644 index 000000000..ffba663ad --- /dev/null +++ b/slither/utils/ck.py @@ -0,0 +1,348 @@ +""" + CK Metrics are a suite of six software metrics proposed by Chidamber and Kemerer in 1994. + These metrics are used to measure the complexity of a class. + https://en.wikipedia.org/wiki/Programming_complexity + + - Response For a Class (RFC) is a metric that measures the number of unique method calls within a class. + - Number of Children (NOC) is a metric that measures the number of children a class has. + - Depth of Inheritance Tree (DIT) is a metric that measures the number of parent classes a class has. + - Coupling Between Object Classes (CBO) is a metric that measures the number of classes a class is coupled to. + + Not implemented: + - Lack of Cohesion of Methods (LCOM) is a metric that measures the lack of cohesion in methods. + - Weighted Methods per Class (WMC) is a metric that measures the complexity of a class. + + During the calculation of the metrics above, there are a number of other intermediate metrics that are calculated. + These are also included in the output: + - State variables: total number of state variables + - Constants: total number of constants + - Immutables: total number of immutables + - Public: total number of public functions + - External: total number of external functions + - Internal: total number of internal functions + - Private: total number of private functions + - Mutating: total number of state mutating functions + - View: total number of view functions + - Pure: total number of pure functions + - External mutating: total number of external mutating functions + - No auth or onlyOwner: total number of functions without auth or onlyOwner modifiers + - No modifiers: total number of functions without modifiers + - Ext calls: total number of external calls + +""" +from collections import OrderedDict +from typing import Tuple, List, Dict +from dataclasses import dataclass, field +from slither.utils.colors import bold +from slither.core.declarations import Contract +from slither.utils.myprettytable import make_pretty_table, MyPrettyTable +from slither.utils.martin import MartinMetrics +from slither.slithir.operations.high_level_call import HighLevelCall + + +# Utility functions + + +def compute_dit(contract: Contract, depth: int = 0) -> int: + """ + Recursively compute the depth of inheritance tree (DIT) of a contract + Args: + contract(core.declarations.contract.Contract): contract to compute DIT for + depth(int): current depth of the contract + Returns: + int: depth of the contract + """ + if not contract.inheritance: + return depth + max_dit = depth + for inherited_contract in contract.inheritance: + dit = compute_dit(inherited_contract, depth + 1) + max_dit = max(max_dit, dit) + return max_dit + + +def has_auth(func) -> bool: + """ + Check if a function has no auth or only_owner modifiers + Args: + func(core.declarations.function.Function): function to check + Returns: + bool True if it does have auth or only_owner modifiers + """ + for modifier in func.modifiers: + if "auth" in modifier.name or "only_owner" in modifier.name: + return True + return False + + +# Utility classes for calculating CK metrics + + +@dataclass +# pylint: disable=too-many-instance-attributes +class CKContractMetrics: + """Class to hold the CK metrics for a single contract.""" + + contract: Contract + + # Used to calculate CBO - should be passed in as a constructor arg + martin_metrics: Dict + + # Used to calculate NOC + dependents: Dict + + state_variables: int = 0 + constants: int = 0 + immutables: int = 0 + public: int = 0 + external: int = 0 + internal: int = 0 + private: int = 0 + mutating: int = 0 + view: int = 0 + pure: int = 0 + external_mutating: int = 0 + no_auth_or_only_owner: int = 0 + no_modifiers: int = 0 + ext_calls: int = 0 + rfc: int = 0 + noc: int = 0 + dit: int = 0 + cbo: int = 0 + + def __post_init__(self) -> None: + if not hasattr(self.contract, "functions"): + return + self.count_variables() + self.noc = len(self.dependents[self.contract.name]) + self.dit = compute_dit(self.contract) + self.cbo = ( + self.martin_metrics[self.contract.name].ca + self.martin_metrics[self.contract.name].ce + ) + self.calculate_metrics() + + # pylint: disable=too-many-locals + # pylint: disable=too-many-branches + def calculate_metrics(self) -> None: + """Calculate the metrics for a contract""" + rfc = self.public # initialize with public getter count + for func in self.contract.functions: + if func.name == "constructor": + continue + pure = func.pure + view = not pure and func.view + mutating = not pure and not view + external = func.visibility == "external" + public = func.visibility == "public" + internal = func.visibility == "internal" + private = func.visibility == "private" + external_public_mutating = external or public and mutating + external_no_auth = external_public_mutating and not has_auth(func) + external_no_modifiers = external_public_mutating and len(func.modifiers) == 0 + if external or public: + rfc += 1 + + high_level_calls = [ + ir for node in func.nodes for ir in node.irs_ssa if isinstance(ir, HighLevelCall) + ] + + # convert irs to string with target function and contract name + external_calls = [] + for high_level_call in high_level_calls: + if isinstance(high_level_call.destination, Contract): + destination_contract = high_level_call.destination.name + elif isinstance(high_level_call.destination, str): + destination_contract = high_level_call.destination + elif not hasattr(high_level_call.destination, "type"): + continue + elif isinstance(high_level_call.destination.type, Contract): + destination_contract = high_level_call.destination.type.name + elif isinstance(high_level_call.destination.type, str): + destination_contract = high_level_call.destination.type + elif not hasattr(high_level_call.destination.type, "type"): + continue + elif isinstance(high_level_call.destination.type.type, Contract): + destination_contract = high_level_call.destination.type.type.name + elif isinstance(high_level_call.destination.type.type, str): + destination_contract = high_level_call.destination.type.type + else: + continue + external_calls.append(f"{high_level_call.function_name}{destination_contract}") + rfc += len(set(external_calls)) + + self.public += public + self.external += external + self.internal += internal + self.private += private + + self.mutating += mutating + self.view += view + self.pure += pure + + self.external_mutating += external_public_mutating + self.no_auth_or_only_owner += external_no_auth + self.no_modifiers += external_no_modifiers + + self.ext_calls += len(external_calls) + self.rfc = rfc + + def count_variables(self) -> None: + """Count the number of variables in a contract""" + state_variable_count = 0 + constant_count = 0 + immutable_count = 0 + public_getter_count = 0 + for variable in self.contract.variables: + if variable.is_constant: + constant_count += 1 + elif variable.is_immutable: + immutable_count += 1 + else: + state_variable_count += 1 + if variable.visibility == "Public": + public_getter_count += 1 + self.state_variables = state_variable_count + self.constants = constant_count + self.immutables = immutable_count + + # initialize RFC with public getter count + # self.public is used count public functions not public variables + self.rfc = public_getter_count + + def to_dict(self) -> Dict[str, float]: + """Return the metrics as a dictionary.""" + return OrderedDict( + { + "State variables": self.state_variables, + "Constants": self.constants, + "Immutables": self.immutables, + "Public": self.public, + "External": self.external, + "Internal": self.internal, + "Private": self.private, + "Mutating": self.mutating, + "View": self.view, + "Pure": self.pure, + "External mutating": self.external_mutating, + "No auth or onlyOwner": self.no_auth_or_only_owner, + "No modifiers": self.no_modifiers, + "Ext calls": self.ext_calls, + "RFC": self.rfc, + "NOC": self.noc, + "DIT": self.dit, + "CBO": self.cbo, + } + ) + + +@dataclass +class SectionInfo: + """Class to hold the information for a section of the report.""" + + title: str + pretty_table: MyPrettyTable + txt: str + + +@dataclass +# pylint: disable=too-many-instance-attributes +class CKMetrics: + """Class to hold the CK metrics for all contracts. Contains methods useful for reporting. + + There are 5 sections in the report: + 1. Variable count by type (state, constant, immutable) + 2. Function count by visibility (public, external, internal, private) + 3. Function count by mutability (mutating, view, pure) + 4. External mutating function count by modifier (external mutating, no auth or onlyOwner, no modifiers) + 5. CK metrics (RFC, NOC, DIT, CBO) + """ + + contracts: List[Contract] = field(default_factory=list) + contract_metrics: OrderedDict = field(default_factory=OrderedDict) + title: str = "CK complexity metrics" + full_text: str = "" + auxiliary1: SectionInfo = field(default=SectionInfo) + auxiliary2: SectionInfo = field(default=SectionInfo) + auxiliary3: SectionInfo = field(default=SectionInfo) + auxiliary4: SectionInfo = field(default=SectionInfo) + core: SectionInfo = field(default=SectionInfo) + AUXILIARY1_KEYS = ( + "State variables", + "Constants", + "Immutables", + ) + AUXILIARY2_KEYS = ( + "Public", + "External", + "Internal", + "Private", + ) + AUXILIARY3_KEYS = ( + "Mutating", + "View", + "Pure", + ) + AUXILIARY4_KEYS = ( + "External mutating", + "No auth or onlyOwner", + "No modifiers", + ) + CORE_KEYS = ( + "Ext calls", + "RFC", + "NOC", + "DIT", + "CBO", + ) + SECTIONS: Tuple[Tuple[str, str, Tuple[str]]] = ( + ("Variables", "auxiliary1", AUXILIARY1_KEYS), + ("Function visibility", "auxiliary2", AUXILIARY2_KEYS), + ("State mutability", "auxiliary3", AUXILIARY3_KEYS), + ("External mutating functions", "auxiliary4", AUXILIARY4_KEYS), + ("Core", "core", CORE_KEYS), + ) + + def __post_init__(self) -> None: + martin_metrics = MartinMetrics(self.contracts).contract_metrics + dependents = { + inherited.name: { + contract.name + for contract in self.contracts + if inherited.name in contract.inheritance + } + for inherited in self.contracts + } + for contract in self.contracts: + self.contract_metrics[contract.name] = CKContractMetrics( + contract=contract, martin_metrics=martin_metrics, dependents=dependents + ) + + # Create the table and text for each section. + data = { + contract.name: self.contract_metrics[contract.name].to_dict() + for contract in self.contracts + } + + subtitle = "" + # Update each section + for (title, attr, keys) in self.SECTIONS: + if attr == "core": + # Special handling for core section + totals_enabled = False + subtitle += bold("RFC: Response For a Class\n") + subtitle += bold("NOC: Number of Children\n") + subtitle += bold("DIT: Depth of Inheritance Tree\n") + subtitle += bold("CBO: Coupling Between Object Classes\n") + else: + totals_enabled = True + subtitle = "" + + pretty_table = make_pretty_table(["Contract", *keys], data, totals=totals_enabled) + section_title = f"{self.title} ({title})" + txt = f"\n\n{section_title}:\n{subtitle}{pretty_table}\n" + self.full_text += txt + setattr( + self, + attr, + SectionInfo(title=section_title, pretty_table=pretty_table, txt=txt), + ) diff --git a/slither/utils/code_generation.py b/slither/utils/code_generation.py index bb8344d8f..215757010 100644 --- a/slither/utils/code_generation.py +++ b/slither/utils/code_generation.py @@ -12,16 +12,18 @@ from slither.core.solidity_types import ( MappingType, ArrayType, ElementaryType, + TypeAlias, ) -from slither.core.declarations import Structure, Enum, Contract +from slither.core.declarations import Structure, StructureContract, Enum, Contract if TYPE_CHECKING: from slither.core.declarations import FunctionContract, CustomErrorContract from slither.core.variables.state_variable import StateVariable from slither.core.variables.local_variable import LocalVariable + from slither.core.variables.structure_variable import StructureVariable -# pylint: disable=too-many-arguments +# pylint: disable=too-many-arguments,too-many-locals,too-many-branches def generate_interface( contract: "Contract", unroll_structs: bool = True, @@ -56,12 +58,47 @@ def generate_interface( for enum in contract.enums: interface += f" enum {enum.name} {{ {', '.join(enum.values)} }}\n" if include_structs: - for struct in contract.structures: + # Include structures defined in this contract and at the top level + structs = contract.structures + contract.compilation_unit.structures_top_level + # Function signatures may reference other structures as well + # Include structures defined in libraries used for them + for _for in contract.using_for.keys(): + if ( + isinstance(_for, UserDefinedType) + and isinstance(_for.type, StructureContract) + and _for.type not in structs + ): + structs.append(_for.type) + # Include any other structures used as function arguments/returns + for func in contract.functions_entry_points: + for arg in func.parameters + func.returns: + _type = arg.type + if isinstance(_type, ArrayType): + _type = _type.type + while isinstance(_type, MappingType): + _type = _type.type_to + if isinstance(_type, UserDefinedType): + _type = _type.type + if isinstance(_type, Structure) and _type not in structs: + structs.append(_type) + for struct in structs: interface += generate_struct_interface_str(struct, indent=4) + for elem in struct.elems_ordered: + if ( + isinstance(elem.type, UserDefinedType) + and isinstance(elem.type.type, StructureContract) + and elem.type.type not in structs + ): + structs.append(elem.type.type) for var in contract.state_variables_entry_points: - interface += f" function {generate_interface_variable_signature(var, unroll_structs)};\n" + # if any(func.name == var.name for func in contract.functions_entry_points): + # # ignore public variables that override a public function + # continue + var_sig = generate_interface_variable_signature(var, unroll_structs) + if var_sig is not None and var_sig != "": + interface += f" function {var_sig};\n" for func in contract.functions_entry_points: - if func.is_constructor or func.is_fallback or func.is_receive: + if func.is_constructor or func.is_fallback or func.is_receive or not func.is_implemented: continue interface += ( f" function {generate_interface_function_signature(func, unroll_structs)};\n" @@ -75,6 +112,10 @@ def generate_interface_variable_signature( ) -> Optional[str]: if var.visibility in ["private", "internal"]: return None + if isinstance(var.type, UserDefinedType) and isinstance(var.type.type, Structure): + for elem in var.type.type.elems_ordered: + if isinstance(elem.type, MappingType): + return "" if unroll_structs: params = [ convert_type_for_solidity_signature_to_string(x).replace("(", "").replace(")", "") @@ -93,6 +134,11 @@ def generate_interface_variable_signature( _type = _type.type_to while isinstance(_type, (ArrayType, UserDefinedType)): _type = _type.type + if isinstance(_type, TypeAlias): + _type = _type.type + if isinstance(_type, Structure): + if any(isinstance(elem.type, MappingType) for elem in _type.elems_ordered): + return "" ret = str(_type) if isinstance(_type, Structure) or (isinstance(_type, Type) and _type.is_dynamic): ret += " memory" @@ -125,6 +171,8 @@ def generate_interface_function_signature( .replace("(", "") .replace(")", "") ) + if var.type.is_dynamic: + return f"{_handle_dynamic_struct_elem(var.type)} {var.location}" if isinstance(var.type, ArrayType) and isinstance( var.type.type, (UserDefinedType, ElementaryType) ): @@ -135,12 +183,14 @@ def generate_interface_function_signature( + f" {var.location}" ) if isinstance(var.type, UserDefinedType): - if isinstance(var.type.type, (Structure, Enum)): + if isinstance(var.type.type, Structure): return f"{str(var.type.type)} memory" + if isinstance(var.type.type, Enum): + return str(var.type.type) if isinstance(var.type.type, Contract): return "address" - if var.type.is_dynamic: - return f"{var.type} {var.location}" + if isinstance(var.type, TypeAlias): + return str(var.type.type) return str(var.type) name, _, _ = func.signature @@ -154,6 +204,12 @@ def generate_interface_function_signature( view = " view" if func.view and not func.pure else "" pure = " pure" if func.pure else "" payable = " payable" if func.payable else "" + # Make sure the function doesn't return a struct with nested mappings + for ret in func.returns: + if isinstance(ret.type, UserDefinedType) and isinstance(ret.type.type, Structure): + for elem in ret.type.type.elems_ordered: + if isinstance(elem.type, MappingType): + return "" returns = [format_var(ret, unroll_structs) for ret in func.returns] parameters = [format_var(param, unroll_structs) for param in func.parameters] _interface_signature_str = ( @@ -184,17 +240,49 @@ def generate_struct_interface_str(struct: "Structure", indent: int = 0) -> str: spaces += " " definition = f"{spaces}struct {struct.name} {{\n" for elem in struct.elems_ordered: - if isinstance(elem.type, UserDefinedType): - if isinstance(elem.type.type, (Structure, Enum)): + if elem.type.is_dynamic: + definition += f"{spaces} {_handle_dynamic_struct_elem(elem.type)} {elem.name};\n" + elif isinstance(elem.type, UserDefinedType): + if isinstance(elem.type.type, Structure): definition += f"{spaces} {elem.type.type} {elem.name};\n" - elif isinstance(elem.type.type, Contract): - definition += f"{spaces} address {elem.name};\n" + else: + definition += f"{spaces} {convert_type_for_solidity_signature_to_string(elem.type)} {elem.name};\n" + elif isinstance(elem.type, TypeAlias): + definition += f"{spaces} {elem.type.type} {elem.name};\n" else: definition += f"{spaces} {elem.type} {elem.name};\n" definition += f"{spaces}}}\n" return definition +def _handle_dynamic_struct_elem(elem_type: Type) -> str: + assert elem_type.is_dynamic + if isinstance(elem_type, ElementaryType): + return f"{elem_type}" + if isinstance(elem_type, ArrayType): + base_type = elem_type.type + if isinstance(base_type, UserDefinedType): + if isinstance(base_type.type, Contract): + return "address[]" + if isinstance(base_type.type, Enum): + return convert_type_for_solidity_signature_to_string(elem_type) + return f"{base_type.type.name}[]" + return f"{base_type}[]" + if isinstance(elem_type, MappingType): + type_to = elem_type.type_to + type_from = elem_type.type_from + if isinstance(type_from, UserDefinedType) and isinstance(type_from.type, Contract): + type_from = ElementaryType("address") + if isinstance(type_to, MappingType): + return f"mapping({type_from} => {_handle_dynamic_struct_elem(type_to)})" + if isinstance(type_to, UserDefinedType): + if isinstance(type_to.type, Contract): + return f"mapping({type_from} => address)" + return f"mapping({type_from} => {type_to.type.name})" + return f"{elem_type}" + return "" + + def generate_custom_error_interface( error: "CustomErrorContract", unroll_structs: bool = True ) -> str: diff --git a/slither/utils/command_line.py b/slither/utils/command_line.py index 911609bf6..6c50fcab9 100644 --- a/slither/utils/command_line.py +++ b/slither/utils/command_line.py @@ -1,4 +1,5 @@ import argparse +import enum import json import os import re @@ -27,6 +28,15 @@ JSON_OUTPUT_TYPES = [ "list-printers", ] + +class FailOnLevel(enum.Enum): + PEDANTIC = "pedantic" + LOW = "low" + MEDIUM = "medium" + HIGH = "high" + NONE = "none" + + # Those are the flags shared by the command line and the config file defaults_flag_in_config = { "codex": False, @@ -44,10 +54,7 @@ defaults_flag_in_config = { "exclude_low": False, "exclude_medium": False, "exclude_high": False, - "fail_pedantic": True, - "fail_low": False, - "fail_medium": False, - "fail_high": False, + "fail_on": FailOnLevel.PEDANTIC, "json": None, "sarif": None, "json-types": ",".join(DEFAULT_JSON_OUTPUT_TYPES), @@ -61,9 +68,18 @@ defaults_flag_in_config = { "zip_type": "lzma", "show_ignored_findings": False, "no_fail": False, + "sarif_input": "export.sarif", + "sarif_triage": "export.sarif.sarifexplorer", **DEFAULTS_FLAG_IN_CONFIG_CRYTIC_COMPILE, } +deprecated_flags = { + "fail_pedantic": True, + "fail_low": False, + "fail_medium": False, + "fail_high": False, +} + def read_config_file(args: argparse.Namespace) -> None: # No config file was provided as an argument @@ -80,6 +96,12 @@ def read_config_file(args: argparse.Namespace) -> None: with open(args.config_file, encoding="utf8") as f: config = json.load(f) for key, elem in config.items(): + if key in deprecated_flags: + logger.info( + yellow(f"{args.config_file} has a deprecated key: {key} : {elem}") + ) + migrate_config_options(args, key, elem) + continue if key not in defaults_flag_in_config: logger.info( yellow(f"{args.config_file} has an unknown key: {key} : {elem}") @@ -94,6 +116,28 @@ def read_config_file(args: argparse.Namespace) -> None: logger.error(yellow("Falling back to the default settings...")) +def migrate_config_options(args: argparse.Namespace, key: str, elem): + if key.startswith("fail_") and getattr(args, "fail_on") == defaults_flag_in_config["fail_on"]: + if key == "fail_pedantic": + pedantic_setting = elem + fail_on = FailOnLevel.PEDANTIC if pedantic_setting else FailOnLevel.NONE + setattr(args, "fail_on", fail_on) + logger.info(f"Migrating fail_pedantic: {pedantic_setting} as fail_on: {fail_on.value}") + elif key == "fail_low" and elem is True: + logger.info("Migrating fail_low: true -> fail_on: low") + setattr(args, "fail_on", FailOnLevel.LOW) + + elif key == "fail_medium" and elem is True: + logger.info("Migrating fail_medium: true -> fail_on: medium") + setattr(args, "fail_on", FailOnLevel.MEDIUM) + + elif key == "fail_high" and elem is True: + logger.info("Migrating fail_high: true -> fail_on: high") + setattr(args, "fail_on", FailOnLevel.HIGH) + else: + logger.warning(yellow(f"Key {key} was deprecated but no migration was provided")) + + def output_to_markdown( detector_classes: List[Type[AbstractDetector]], printer_classes: List[Type[AbstractPrinter]], diff --git a/slither/utils/encoding.py b/slither/utils/encoding.py new file mode 100644 index 000000000..288b58150 --- /dev/null +++ b/slither/utils/encoding.py @@ -0,0 +1,202 @@ +from typing import Union + +from slither.core import variables +from slither.core.declarations import ( + SolidityVariable, + SolidityVariableComposed, + Structure, + Enum, + Contract, +) +from slither.core import solidity_types +from slither.slithir import operations +from slither.slithir import variables as SlitherIRVariable + + +# pylint: disable=too-many-branches +def ntype(_type: Union[solidity_types.Type, str]) -> str: + if isinstance(_type, solidity_types.ElementaryType): + _type = str(_type) + elif isinstance(_type, solidity_types.ArrayType): + if isinstance(_type.type, solidity_types.ElementaryType): + _type = str(_type) + else: + _type = "user_defined_array" + elif isinstance(_type, Structure): + _type = str(_type) + elif isinstance(_type, Enum): + _type = str(_type) + elif isinstance(_type, solidity_types.MappingType): + _type = str(_type) + elif isinstance(_type, solidity_types.UserDefinedType): + if isinstance(_type.type, Contract): + _type = f"contract({_type.type.name})" + elif isinstance(_type.type, Structure): + _type = f"struct({_type.type.name})" + elif isinstance(_type.type, Enum): + _type = f"enum({_type.type.name})" + else: + _type = str(_type) + + _type = _type.replace(" memory", "") + _type = _type.replace(" storage ref", "") + + if "struct" in _type: + return "struct" + if "enum" in _type: + return "enum" + if "tuple" in _type: + return "tuple" + if "contract" in _type: + return "contract" + if "mapping" in _type: + return "mapping" + return _type.replace(" ", "_") + + +# pylint: disable=too-many-branches +def encode_var_for_compare(var: Union[variables.Variable, SolidityVariable]) -> str: + + # variables + if isinstance(var, SlitherIRVariable.Constant): + return f"constant({ntype(var.type)},{var.value})" + if isinstance(var, SolidityVariableComposed): + return f"solidity_variable_composed({var.name})" + if isinstance(var, SolidityVariable): + return f"solidity_variable{var.name}" + if isinstance(var, SlitherIRVariable.TemporaryVariable): + return "temporary_variable" + if isinstance(var, SlitherIRVariable.ReferenceVariable): + return f"reference({ntype(var.type)})" + if isinstance(var, variables.LocalVariable): + return f"local_solc_variable({ntype(var.type)},{var.location})" + if isinstance(var, variables.StateVariable): + if not (var.is_constant or var.is_immutable): + try: + slot, _ = var.contract.compilation_unit.storage_layout_of(var.contract, var) + except KeyError: + slot = var.name + else: + slot = var.name + return f"state_solc_variable({ntype(var.type)},{slot})" + if isinstance(var, variables.LocalVariableInitFromTuple): + return "local_variable_init_tuple" + if isinstance(var, SlitherIRVariable.TupleVariable): + return "tuple_variable" + + # default + return "" + + +# pylint: disable=too-many-branches +def encode_ir_for_upgradeability_compare(ir: operations.Operation) -> str: + # operations + if isinstance(ir, operations.Assignment): + return f"({encode_var_for_compare(ir.lvalue)}):=({encode_var_for_compare(ir.rvalue)})" + if isinstance(ir, operations.Index): + return f"index({ntype(ir.variable_right.type)})" + if isinstance(ir, operations.Member): + return "member" # .format(ntype(ir._type)) + if isinstance(ir, operations.Length): + return "length" + if isinstance(ir, operations.Binary): + return f"binary({encode_var_for_compare(ir.variable_left)}{ir.type}{encode_var_for_compare(ir.variable_right)})" + if isinstance(ir, operations.Unary): + return f"unary({str(ir.type)})" + if isinstance(ir, operations.Condition): + return f"condition({encode_var_for_compare(ir.value)})" + if isinstance(ir, operations.NewStructure): + return "new_structure" + if isinstance(ir, operations.NewContract): + return "new_contract" + if isinstance(ir, operations.NewArray): + return f"new_array({ntype(ir.array_type)})" + if isinstance(ir, operations.NewElementaryType): + return f"new_elementary({ntype(ir.type)})" + if isinstance(ir, operations.Delete): + return f"delete({encode_var_for_compare(ir.lvalue)},{encode_var_for_compare(ir.variable)})" + if isinstance(ir, operations.SolidityCall): + return f"solidity_call({ir.function.full_name})" + if isinstance(ir, operations.InternalCall): + return f"internal_call({ntype(ir.type_call)})" + if isinstance(ir, operations.EventCall): # is this useful? + return "event" + if isinstance(ir, operations.LibraryCall): + return "library_call" + if isinstance(ir, operations.InternalDynamicCall): + return "internal_dynamic_call" + if isinstance(ir, operations.HighLevelCall): # TODO: improve + return "high_level_call" + if isinstance(ir, operations.LowLevelCall): # TODO: improve + return "low_level_call" + if isinstance(ir, operations.TypeConversion): + return f"type_conversion({ntype(ir.type)})" + if isinstance(ir, operations.Return): # this can be improved using values + return "return" # .format(ntype(ir.type)) + if isinstance(ir, operations.Transfer): + return f"transfer({encode_var_for_compare(ir.call_value)})" + if isinstance(ir, operations.Send): + return f"send({encode_var_for_compare(ir.call_value)})" + if isinstance(ir, operations.Unpack): # TODO: improve + return "unpack" + if isinstance(ir, operations.InitArray): # TODO: improve + return "init_array" + + # default + return "" + + +def encode_ir_for_halstead(ir: operations.Operation) -> str: + # operations + if isinstance(ir, operations.Assignment): + return "assignment" + if isinstance(ir, operations.Index): + return "index" + if isinstance(ir, operations.Member): + return "member" # .format(ntype(ir._type)) + if isinstance(ir, operations.Length): + return "length" + if isinstance(ir, operations.Binary): + return f"binary({str(ir.type)})" + if isinstance(ir, operations.Unary): + return f"unary({str(ir.type)})" + if isinstance(ir, operations.Condition): + return f"condition({encode_var_for_compare(ir.value)})" + if isinstance(ir, operations.NewStructure): + return "new_structure" + if isinstance(ir, operations.NewContract): + return "new_contract" + if isinstance(ir, operations.NewArray): + return f"new_array({ntype(ir.array_type)})" + if isinstance(ir, operations.NewElementaryType): + return f"new_elementary({ntype(ir.type)})" + if isinstance(ir, operations.Delete): + return "delete" + if isinstance(ir, operations.SolidityCall): + return f"solidity_call({ir.function.full_name})" + if isinstance(ir, operations.InternalCall): + return f"internal_call({ntype(ir.type_call)})" + if isinstance(ir, operations.EventCall): # is this useful? + return "event" + if isinstance(ir, operations.LibraryCall): + return "library_call" + if isinstance(ir, operations.InternalDynamicCall): + return "internal_dynamic_call" + if isinstance(ir, operations.HighLevelCall): # TODO: improve + return "high_level_call" + if isinstance(ir, operations.LowLevelCall): # TODO: improve + return "low_level_call" + if isinstance(ir, operations.TypeConversion): + return f"type_conversion({ntype(ir.type)})" + if isinstance(ir, operations.Return): # this can be improved using values + return "return" # .format(ntype(ir.type)) + if isinstance(ir, operations.Transfer): + return "transfer" + if isinstance(ir, operations.Send): + return "send" + if isinstance(ir, operations.Unpack): # TODO: improve + return "unpack" + if isinstance(ir, operations.InitArray): # TODO: improve + return "init_array" + # default + raise NotImplementedError(f"encode_ir_for_halstead: {ir}") diff --git a/slither/utils/expression_manipulations.py b/slither/utils/expression_manipulations.py index 75d97042c..32b88e9b3 100644 --- a/slither/utils/expression_manipulations.py +++ b/slither/utils/expression_manipulations.py @@ -147,7 +147,7 @@ class SplitTernaryExpression: for next_expr in expression.expressions: # TODO: can we get rid of `NoneType` expressions in `TupleExpression`? # montyly: this might happen with unnamed tuple (ex: (,,,) = f()), but it needs to be checked - if next_expr: + if next_expr is not None: if self.conditional_not_ahead( next_expr, true_expression, false_expression, f_expressions @@ -158,6 +158,9 @@ class SplitTernaryExpression: true_expression.expressions[-1], false_expression.expressions[-1], ) + else: + true_expression.expressions.append(None) + false_expression.expressions.append(None) def convert_index_access( self, next_expr: IndexAccess, true_expression: Expression, false_expression: Expression diff --git a/slither/utils/halstead.py b/slither/utils/halstead.py new file mode 100644 index 000000000..9ec952e48 --- /dev/null +++ b/slither/utils/halstead.py @@ -0,0 +1,233 @@ +""" + Halstead complexity metrics + https://en.wikipedia.org/wiki/Halstead_complexity_measures + + 12 metrics based on the number of unique operators and operands: + + Core metrics: + n1 = the number of distinct operators + n2 = the number of distinct operands + N1 = the total number of operators + N2 = the total number of operands + + Extended metrics1: + n = n1 + n2 # Program vocabulary + N = N1 + N2 # Program length + S = n1 * log2(n1) + n2 * log2(n2) # Estimated program length + V = N * log2(n) # Volume + + Extended metrics2: + D = (n1 / 2) * (N2 / n2) # Difficulty + E = D * V # Effort + T = E / 18 seconds # Time required to program + B = (E^(2/3)) / 3000 # Number of delivered bugs + + +""" +import math +from collections import OrderedDict +from dataclasses import dataclass, field +from typing import Tuple, List, Dict + +from slither.core.declarations import Contract +from slither.slithir.variables.temporary import TemporaryVariable +from slither.utils.encoding import encode_ir_for_halstead +from slither.utils.myprettytable import make_pretty_table, MyPrettyTable + + +# pylint: disable=too-many-branches + + +@dataclass +# pylint: disable=too-many-instance-attributes +class HalsteadContractMetrics: + """Class to hold the Halstead metrics for a single contract.""" + + contract: Contract + all_operators: List[str] = field(default_factory=list) + all_operands: List[str] = field(default_factory=list) + n1: int = 0 + n2: int = 0 + N1: int = 0 + N2: int = 0 + n: int = 0 + N: int = 0 + S: float = 0 + V: float = 0 + D: float = 0 + E: float = 0 + T: float = 0 + B: float = 0 + + def __post_init__(self) -> None: + """Operators and operands can be passed in as constructor args to avoid computing + them based on the contract. Useful for computing metrics for ALL_CONTRACTS""" + + if len(self.all_operators) == 0: + if not hasattr(self.contract, "functions"): + return + self.populate_operators_and_operands() + if len(self.all_operators) > 0: + self.compute_metrics() + + def to_dict(self) -> Dict[str, float]: + """Return the metrics as a dictionary.""" + return OrderedDict( + { + "Total Operators": self.N1, + "Unique Operators": self.n1, + "Total Operands": self.N2, + "Unique Operands": self.n2, + "Vocabulary": str(self.n1 + self.n2), + "Program Length": str(self.N1 + self.N2), + "Estimated Length": f"{self.S:.0f}", + "Volume": f"{self.V:.0f}", + "Difficulty": f"{self.D:.0f}", + "Effort": f"{self.E:.0f}", + "Time": f"{self.T:.0f}", + "Estimated Bugs": f"{self.B:.3f}", + } + ) + + def populate_operators_and_operands(self) -> None: + """Populate the operators and operands lists.""" + operators = [] + operands = [] + + for func in self.contract.functions: + for node in func.nodes: + for operation in node.irs: + # use operation.expression.type to get the unique operator type + encoded_operator = encode_ir_for_halstead(operation) + operators.append(encoded_operator) + + # use operation.used to get the operands of the operation ignoring the temporary variables + operands.extend( + [op for op in operation.used if not isinstance(op, TemporaryVariable)] + ) + self.all_operators.extend(operators) + self.all_operands.extend(operands) + + def compute_metrics(self, all_operators=None, all_operands=None) -> None: + """Compute the Halstead metrics.""" + if all_operators is None: + all_operators = self.all_operators + all_operands = self.all_operands + + # core metrics + self.n1 = len(set(all_operators)) + self.n2 = len(set(all_operands)) + self.N1 = len(all_operators) + self.N2 = len(all_operands) + if any(number <= 0 for number in [self.n1, self.n2, self.N1, self.N2]): + raise ValueError("n1 and n2 must be greater than 0") + + # extended metrics 1 + self.n = self.n1 + self.n2 + self.N = self.N1 + self.N2 + self.S = self.n1 * math.log2(self.n1) + self.n2 * math.log2(self.n2) + self.V = self.N * math.log2(self.n) + + # extended metrics 2 + self.D = (self.n1 / 2) * (self.N2 / self.n2) + self.E = self.D * self.V + self.T = self.E / 18 + self.B = (self.E ** (2 / 3)) / 3000 + + +@dataclass +class SectionInfo: + """Class to hold the information for a section of the report.""" + + title: str + pretty_table: MyPrettyTable + txt: str + + +@dataclass +# pylint: disable=too-many-instance-attributes +class HalsteadMetrics: + """Class to hold the Halstead metrics for all contracts. Contains methods useful for reporting. + + There are 3 sections in the report: + 1. Core metrics (n1, n2, N1, N2) + 2. Extended metrics 1 (n, N, S, V) + 3. Extended metrics 2 (D, E, T, B) + + """ + + contracts: List[Contract] = field(default_factory=list) + contract_metrics: OrderedDict = field(default_factory=OrderedDict) + title: str = "Halstead complexity metrics" + full_text: str = "" + core: SectionInfo = field(default=SectionInfo) + extended1: SectionInfo = field(default=SectionInfo) + extended2: SectionInfo = field(default=SectionInfo) + CORE_KEYS = ( + "Total Operators", + "Unique Operators", + "Total Operands", + "Unique Operands", + ) + EXTENDED1_KEYS = ( + "Vocabulary", + "Program Length", + "Estimated Length", + "Volume", + ) + EXTENDED2_KEYS = ( + "Difficulty", + "Effort", + "Time", + "Estimated Bugs", + ) + SECTIONS: Tuple[Tuple[str, str, Tuple[str]]] = ( + ("Core", "core", CORE_KEYS), + ("Extended 1/2", "extended1", EXTENDED1_KEYS), + ("Extended 2/2", "extended2", EXTENDED2_KEYS), + ) + + def __post_init__(self) -> None: + # Compute the metrics for each contract and for all contracts. + self.update_contract_metrics() + self.add_all_contracts_metrics() + self.update_reporting_sections() + + def update_contract_metrics(self) -> None: + for contract in self.contracts: + self.contract_metrics[contract.name] = HalsteadContractMetrics(contract=contract) + + def add_all_contracts_metrics(self) -> None: + # If there are more than 1 contract, compute the metrics for all contracts. + if len(self.contracts) <= 1: + return + all_operators = [ + operator + for contract in self.contracts + for operator in self.contract_metrics[contract.name].all_operators + ] + all_operands = [ + operand + for contract in self.contracts + for operand in self.contract_metrics[contract.name].all_operands + ] + self.contract_metrics["ALL CONTRACTS"] = HalsteadContractMetrics( + None, all_operators=all_operators, all_operands=all_operands + ) + + def update_reporting_sections(self) -> None: + # Create the table and text for each section. + data = { + contract.name: self.contract_metrics[contract.name].to_dict() + for contract in self.contracts + } + for (title, attr, keys) in self.SECTIONS: + pretty_table = make_pretty_table(["Contract", *keys], data, False) + section_title = f"{self.title} ({title})" + txt = f"\n\n{section_title}:\n{pretty_table}\n" + self.full_text += txt + setattr( + self, + attr, + SectionInfo(title=section_title, pretty_table=pretty_table, txt=txt), + ) diff --git a/slither/utils/integer_conversion.py b/slither/utils/integer_conversion.py index e4dff333c..99064f564 100644 --- a/slither/utils/integer_conversion.py +++ b/slither/utils/integer_conversion.py @@ -4,7 +4,9 @@ from typing import Union from slither.exceptions import SlitherError -def convert_string_to_fraction(val: Union[str, int]) -> Fraction: +def convert_string_to_fraction(val: Union[str, bytes, int]) -> Fraction: + if isinstance(val, bytes): + return int.from_bytes(val, byteorder="big") if isinstance(val, int): return Fraction(val) if val.startswith(("0x", "0X")): diff --git a/slither/utils/loc.py b/slither/utils/loc.py new file mode 100644 index 000000000..dde91578b --- /dev/null +++ b/slither/utils/loc.py @@ -0,0 +1,105 @@ +from dataclasses import dataclass, field +from pathlib import Path +from typing import List, Tuple + +from slither import Slither +from slither.utils.myprettytable import MyPrettyTable +from slither.utils.tests_pattern import is_test_file + + +@dataclass +class LoCInfo: + loc: int = 0 + sloc: int = 0 + cloc: int = 0 + + def total(self) -> int: + return self.loc + self.sloc + self.cloc + + +@dataclass +class LoC: + src: LoCInfo = field(default_factory=LoCInfo) + dep: LoCInfo = field(default_factory=LoCInfo) + test: LoCInfo = field(default_factory=LoCInfo) + + def to_pretty_table(self) -> MyPrettyTable: + table = MyPrettyTable(["", "src", "dep", "test"]) + + table.add_row(["loc", str(self.src.loc), str(self.dep.loc), str(self.test.loc)]) + table.add_row(["sloc", str(self.src.sloc), str(self.dep.sloc), str(self.test.sloc)]) + table.add_row(["cloc", str(self.src.cloc), str(self.dep.cloc), str(self.test.cloc)]) + table.add_row( + ["Total", str(self.src.total()), str(self.dep.total()), str(self.test.total())] + ) + return table + + +def count_lines(contract_lines: List[str]) -> Tuple[int, int, int]: + """Function to count and classify the lines of code in a contract. + Args: + contract_lines: list(str) representing the lines of a contract. + Returns: + tuple(int, int, int) representing (cloc, sloc, loc) + """ + multiline_comment = False + cloc = 0 + sloc = 0 + loc = 0 + + for line in contract_lines: + loc += 1 + stripped_line = line.strip() + if not multiline_comment: + if stripped_line.startswith("//"): + cloc += 1 + elif "/*" in stripped_line: + # Account for case where /* is followed by */ on the same line. + # If it is, then multiline_comment does not need to be set to True + start_idx = stripped_line.find("/*") + end_idx = stripped_line.find("*/", start_idx + 2) + if end_idx == -1: + multiline_comment = True + cloc += 1 + elif stripped_line: + sloc += 1 + else: + cloc += 1 + if "*/" in stripped_line: + multiline_comment = False + + return cloc, sloc, loc + + +def _update_lines(loc_info: LoCInfo, lines: list) -> None: + """An internal function used to update (mutate in place) the loc_info. + + Args: + loc_info: LoCInfo to be updated + lines: list(str) representing the lines of a contract. + """ + cloc, sloc, loc = count_lines(lines) + loc_info.loc += loc + loc_info.cloc += cloc + loc_info.sloc += sloc + + +def compute_loc_metrics(slither: Slither) -> LoC: + """Used to compute the lines of code metrics for a Slither object. + + Args: + slither: A Slither object + Returns: + A LoC object + """ + + loc = LoC() + + for filename, source_code in slither.source_code.items(): + current_lines = source_code.splitlines() + is_dep = False + if slither.crytic_compile: + is_dep = slither.crytic_compile.is_dependency(filename) + loc_type = loc.dep if is_dep else loc.test if is_test_file(Path(filename)) else loc.src + _update_lines(loc_type, current_lines) + return loc diff --git a/slither/utils/martin.py b/slither/utils/martin.py new file mode 100644 index 000000000..c336227fd --- /dev/null +++ b/slither/utils/martin.py @@ -0,0 +1,157 @@ +""" + Robert "Uncle Bob" Martin - Agile software metrics + https://en.wikipedia.org/wiki/Software_package_metrics + + Efferent Coupling (Ce): Number of contracts that the contract depends on + Afferent Coupling (Ca): Number of contracts that depend on a 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) + +""" +from typing import Tuple, List, Dict +from dataclasses import dataclass, field +from collections import OrderedDict +from slither.slithir.operations.high_level_call import HighLevelCall +from slither.core.declarations import Contract +from slither.utils.myprettytable import make_pretty_table, MyPrettyTable + + +@dataclass +class MartinContractMetrics: + contract: Contract + ca: int + ce: int + abstractness: float + i: float = 0.0 + d: float = 0.0 + + def __post_init__(self) -> None: + if self.ce + self.ca > 0: + self.i = float(self.ce / (self.ce + self.ca)) + self.d = float(abs(self.i - self.abstractness)) + + def to_dict(self) -> Dict: + return { + "Dependents": self.ca, + "Dependencies": self.ce, + "Instability": f"{self.i:.2f}", + "Distance from main sequence": f"{self.d:.2f}", + } + + +@dataclass +class SectionInfo: + """Class to hold the information for a section of the report.""" + + title: str + pretty_table: MyPrettyTable + txt: str + + +@dataclass +class MartinMetrics: + contracts: List[Contract] = field(default_factory=list) + abstractness: float = 0.0 + contract_metrics: OrderedDict = field(default_factory=OrderedDict) + title: str = "Martin complexity metrics" + full_text: str = "" + core: SectionInfo = field(default=SectionInfo) + CORE_KEYS = ( + "Dependents", + "Dependencies", + "Instability", + "Distance from main sequence", + ) + SECTIONS: Tuple[Tuple[str, str, Tuple[str]]] = (("Core", "core", CORE_KEYS),) + + def __post_init__(self) -> None: + self.update_abstractness() + self.update_coupling() + self.update_reporting_sections() + + def update_reporting_sections(self) -> None: + # Create the table and text for each section. + data = { + contract.name: self.contract_metrics[contract.name].to_dict() + for contract in self.contracts + } + for (title, attr, keys) in self.SECTIONS: + pretty_table = make_pretty_table(["Contract", *keys], data, False) + section_title = f"{self.title} ({title})" + txt = f"\n\n{section_title}:\n" + txt = "Martin agile software metrics\n" + txt += "Efferent Coupling (Ce) - Number of contracts that a contract depends on\n" + txt += "Afferent Coupling (Ca) - Number of contracts that depend on the contract\n" + txt += ( + "Instability (I) - Ratio of efferent coupling to total coupling (Ce / (Ce + Ca))\n" + ) + txt += "Abstractness (A) - Number of abstract contracts / total number of contracts\n" + txt += "Distance from the Main Sequence (D) - abs(A + I - 1)\n" + txt += "\n" + txt += f"Abstractness (overall): {round(self.abstractness, 2)}\n" + txt += f"{pretty_table}\n" + self.full_text += txt + setattr( + self, + attr, + SectionInfo(title=section_title, pretty_table=pretty_table, txt=txt), + ) + + def update_abstractness(self) -> None: + abstract_contract_count = 0 + for c in self.contracts: + if not c.is_fully_implemented: + abstract_contract_count += 1 + self.abstractness = float(abstract_contract_count / len(self.contracts)) + + # pylint: disable=too-many-branches + def update_coupling(self) -> None: + dependencies = {} + for contract in self.contracts: + external_calls = [] + for func in contract.functions: + high_level_calls = [ + ir + for node in func.nodes + for ir in node.irs_ssa + if isinstance(ir, HighLevelCall) + ] + # convert irs to string with target function and contract name + # Get the target contract name for each high level call + new_external_calls = [] + for high_level_call in high_level_calls: + if isinstance(high_level_call.destination, Contract): + new_external_call = high_level_call.destination.name + elif isinstance(high_level_call.destination, str): + new_external_call = high_level_call.destination + elif not hasattr(high_level_call.destination, "type"): + continue + elif isinstance(high_level_call.destination.type, Contract): + new_external_call = high_level_call.destination.type.name + elif isinstance(high_level_call.destination.type, str): + new_external_call = high_level_call.destination.type + elif not hasattr(high_level_call.destination.type, "type"): + continue + elif isinstance(high_level_call.destination.type.type, Contract): + new_external_call = high_level_call.destination.type.type.name + elif isinstance(high_level_call.destination.type.type, str): + new_external_call = high_level_call.destination.type.type + else: + continue + new_external_calls.append(new_external_call) + external_calls.extend(new_external_calls) + dependencies[contract.name] = set(external_calls) + dependents = {} + for contract, deps in dependencies.items(): + for dep in deps: + if dep not in dependents: + dependents[dep] = set() + dependents[dep].add(contract) + + for contract in self.contracts: + ce = len(dependencies.get(contract.name, [])) + ca = len(dependents.get(contract.name, [])) + self.contract_metrics[contract.name] = MartinContractMetrics( + contract, ca, ce, self.abstractness + ) diff --git a/slither/utils/myprettytable.py b/slither/utils/myprettytable.py index 2f2be7e72..b33fb9c5f 100644 --- a/slither/utils/myprettytable.py +++ b/slither/utils/myprettytable.py @@ -1,20 +1,38 @@ from typing import List, Dict, Union +from prettytable import PrettyTable from prettytable.colortable import ColorTable, Themes +from slither.utils.colors import Colors + class MyPrettyTable: - def __init__(self, field_names: List[str]): + def __init__(self, field_names: List[str], pretty_align: bool = True): # TODO: True by default? self._field_names = field_names self._rows: List = [] + self._options: Dict = {} + if pretty_align: + self._options["set_alignment"] = [] + self._options["set_alignment"] += [(field_names[0], "l")] + for field_name in field_names[1:]: + self._options["set_alignment"] += [(field_name, "r")] + else: + self._options["set_alignment"] = [] def add_row(self, row: List[Union[str, List[str]]]) -> None: self._rows.append(row) - def to_pretty_table(self) -> ColorTable: - table = ColorTable(self._field_names, theme=Themes.OCEAN) + def to_pretty_table(self) -> PrettyTable: + if Colors.COLORIZATION_ENABLED: + table = ColorTable(self._field_names, theme=Themes.OCEAN) + else: + table = PrettyTable(self._field_names) + for row in self._rows: table.add_row(row) + if len(self._options["set_alignment"]): + for column_header, value in self._options["set_alignment"]: + table.align[column_header] = value return table def to_json(self) -> Dict: @@ -22,3 +40,30 @@ class MyPrettyTable: def __str__(self) -> str: return str(self.to_pretty_table()) + + +# UTILITY FUNCTIONS + + +def make_pretty_table( + headers: list, body: dict, totals: bool = False, total_header="TOTAL" +) -> MyPrettyTable: + """ + Converts a dict to a MyPrettyTable. Dict keys are the row headers. + Args: + headers: str[] of column names + body: dict of row headers with a dict of the values + totals: bool optional add Totals row + total_header: str optional if totals is set to True this will override the default "TOTAL" header + Returns: + MyPrettyTable + """ + table = MyPrettyTable(headers) + for row in body: + table_row = [row] + [body[row][key] for key in headers[1:]] + table.add_row(table_row) + if totals: + table.add_row( + [total_header] + [sum([body[row][key] for row in body]) for key in headers[1:]] + ) + return table diff --git a/slither/utils/output.py b/slither/utils/output.py index 84c9ac65a..4a91ca9b9 100644 --- a/slither/utils/output.py +++ b/slither/utils/output.py @@ -18,6 +18,7 @@ from slither.core.declarations import ( Structure, Pragma, FunctionContract, + CustomError, ) from slither.core.source_mapping.source_mapping import SourceMapping from slither.core.variables.local_variable import LocalVariable @@ -438,6 +439,8 @@ class Output: self.add_event(add, additional_fields=additional_fields) elif isinstance(add, Structure): self.add_struct(add, additional_fields=additional_fields) + elif isinstance(add, CustomError): + self.add_custom_error(add, additional_fields=additional_fields) elif isinstance(add, Pragma): self.add_pragma(add, additional_fields=additional_fields) elif isinstance(add, Node): @@ -585,6 +588,32 @@ class Output: self._data["elements"].append(element) + # endregion + ################################################################################### + ################################################################################### + # region CustomError + ################################################################################### + ################################################################################### + + def add_custom_error( + self, custom_error: CustomError, additional_fields: Optional[Dict] = None + ) -> None: + if additional_fields is None: + additional_fields = {} + type_specific_fields = { + "parent": _create_parent_element(custom_error), + "signature": custom_error.full_name, + } + element = _create_base_element( + "custom_error", + custom_error.name, + custom_error.source_mapping.to_json(), + type_specific_fields, + additional_fields, + ) + + self._data["elements"].append(element) + # endregion ################################################################################### ################################################################################### diff --git a/slither/utils/sarif.py b/slither/utils/sarif.py new file mode 100644 index 000000000..600ac35c7 --- /dev/null +++ b/slither/utils/sarif.py @@ -0,0 +1,71 @@ +""" +Various utils for sarif/vscode +""" +import json +from pathlib import Path +from typing import List, Dict, Optional, Tuple, Any + + +def _parse_index(key: str) -> Optional[Tuple[int, int]]: + if key.count(":") != 2: + return None + + try: + run = int(key[key.find(":") + 1 : key.rfind(":")]) + index = int(key[key.rfind(":") + 1 :]) + return run, index + except ValueError: + return None + + +def _get_indexes(path_to_triage: Path) -> List[Tuple[int, int]]: + try: + with open(path_to_triage, encoding="utf8") as file_desc: + triage = json.load(file_desc) + except json.decoder.JSONDecodeError: + return [] + + resultIdToNotes: Dict[str, Dict] = triage.get("resultIdToNotes", {}) + + indexes: List[Tuple[int, int]] = [] + for key, data in resultIdToNotes.items(): + if "status" in data and data["status"] == 1: + parsed = _parse_index(key) + if parsed: + indexes.append(parsed) + + return indexes + + +def read_triage_info(path_to_sarif: Path, path_to_triage: Path) -> List[str]: + try: + with open(path_to_sarif, encoding="utf8") as file_desc: + sarif = json.load(file_desc) + except json.decoder.JSONDecodeError: + return [] + + runs: List[Dict[str, Any]] = sarif.get("runs", []) + + # Don't support multiple runs for now + if len(runs) != 1: + return [] + + run_results: List[Dict] = runs[0].get("results", []) + + indexes = _get_indexes(path_to_triage) + + ids: List[str] = [] + for run, index in indexes: + + # We dont support multiple runs for now + if run != 0: + continue + try: + elem = run_results[index] + except KeyError: + continue + if "partialFingerprints" in elem: + if "id" in elem["partialFingerprints"]: + ids.append(elem["partialFingerprints"]["id"]) + + return ids diff --git a/slither/utils/upgradeability.py b/slither/utils/upgradeability.py index 7633e87a1..23a8aef28 100644 --- a/slither/utils/upgradeability.py +++ b/slither/utils/upgradeability.py @@ -1,77 +1,58 @@ -from typing import Optional, Tuple, List, Union, TypedDict +from typing import Optional, Tuple, List + +from slither.analyses.data_dependency.data_dependency import get_dependencies +from slither.core.cfg.node import Node, NodeType from slither.core.declarations import ( Contract, - Structure, - Enum, - SolidityVariableComposed, - SolidityVariable, Function, ) -from slither.core.solidity_types import ( - Type, - ElementaryType, - ArrayType, - MappingType, - UserDefinedType, -) -from slither.core.variables.local_variable import LocalVariable -from slither.core.variables.local_variable_init_from_tuple import LocalVariableInitFromTuple -from slither.core.variables.state_variable import StateVariable -from slither.analyses.data_dependency.data_dependency import get_dependencies -from slither.core.variables.variable import Variable from slither.core.expressions import ( Literal, Identifier, CallExpression, AssignmentOperation, ) -from slither.core.cfg.node import Node, NodeType +from slither.core.solidity_types import ( + ElementaryType, +) +from slither.core.variables.local_variable import LocalVariable +from slither.core.variables.state_variable import StateVariable +from slither.core.variables.variable import Variable from slither.slithir.operations import ( - Operation, - Assignment, - Index, - Member, - Length, - Binary, - Unary, - Condition, - NewArray, - NewStructure, - NewContract, - NewElementaryType, - SolidityCall, - Delete, - EventCall, - LibraryCall, - InternalDynamicCall, - HighLevelCall, LowLevelCall, - TypeConversion, - Return, - Transfer, - Send, - Unpack, - InitArray, - InternalCall, -) -from slither.slithir.variables import ( - TemporaryVariable, - TupleVariable, - Constant, - ReferenceVariable, ) from slither.tools.read_storage.read_storage import SlotInfo, SlitherReadStorage +from slither.utils.encoding import encode_ir_for_upgradeability_compare + + +class TaintedExternalContract: + def __init__(self, contract: "Contract") -> None: + self._contract: Contract = contract + self._tainted_functions: List[Function] = [] + self._tainted_variables: List[Variable] = [] + @property + def contract(self) -> Contract: + return self._contract -class TaintedExternalContract(TypedDict): - contract: Contract - functions: List[Function] - variables: List[Variable] + @property + def tainted_functions(self) -> List[Function]: + return self._tainted_functions + + def add_tainted_function(self, f: Function): + self._tainted_functions.append(f) + + @property + def tainted_variables(self) -> List[Variable]: + return self._tainted_variables + + def add_tainted_variable(self, v: Variable): + self._tainted_variables.append(v) # pylint: disable=too-many-locals def compare( - v1: Contract, v2: Contract + v1: Contract, v2: Contract, include_external: bool = False ) -> Tuple[ List[Variable], List[Variable], @@ -87,6 +68,7 @@ def compare( Args: v1: Original version of (upgradeable) contract v2: Updated version of (upgradeable) contract + include_external: Optional flag to enable cross-contract external taint analysis Returns: missing-vars-in-v2: list[Variable], @@ -95,6 +77,7 @@ def compare( new-functions: list[Function], modified-functions: list[Function], tainted-functions: list[Function] + tainted-contracts: list[TaintedExternalContract] """ order_vars1 = [ @@ -126,17 +109,13 @@ def compare( if sig not in func_sigs1: new_modified_functions.append(function) new_functions.append(function) - new_modified_function_vars += ( - function.state_variables_read + function.state_variables_written - ) + new_modified_function_vars += function.all_state_variables_written() elif not function.is_constructor_variables and is_function_modified( orig_function, function ): new_modified_functions.append(function) modified_functions.append(function) - new_modified_function_vars += ( - function.state_variables_read + function.state_variables_written - ) + new_modified_function_vars += function.all_state_variables_written() # Find all unmodified functions that call a modified function or read/write the # same state variable(s) as a new/modified function, i.e., tainted functions @@ -153,25 +132,28 @@ def compare( tainted_vars = [ var for var in set(new_modified_function_vars) - if var in function.variables_read_or_written + if var in function.all_state_variables_read() + function.all_state_variables_written() and not var.is_constant and not var.is_immutable ] if len(modified_calls) > 0 or len(tainted_vars) > 0: tainted_functions.append(function) - # Find all new or tainted variables, i.e., variables that are read or written by a new/modified/tainted function + # Find all new or tainted variables, i.e., variables that are written by a new/modified/tainted function for var in order_vars2: - read_by = v2.get_functions_reading_from_variable(var) written_by = v2.get_functions_writing_to_variable(var) - if v1.get_state_variable_from_name(var.name) is None: + if next((v for v in v1.state_variables_ordered if v.name == var.name), None) is None: new_variables.append(var) - elif any( - func in read_by or func in written_by - for func in new_modified_functions + tainted_functions - ): + elif any(func in written_by for func in new_modified_functions + tainted_functions): tainted_variables.append(var) + tainted_contracts = [] + if include_external: + # Find all external contracts and functions called by new/modified/tainted functions + tainted_contracts = tainted_external_contracts( + new_functions + modified_functions + tainted_functions + ) + return ( missing_vars_in_v2, new_variables, @@ -179,9 +161,137 @@ def compare( new_functions, modified_functions, tainted_functions, + tainted_contracts, ) +def tainted_external_contracts(funcs: List[Function]) -> List[TaintedExternalContract]: + """ + Takes a list of functions from one contract, finds any calls in these to functions in external contracts, + and determines which variables and functions in the external contracts are tainted by these external calls. + Args: + funcs: a list of Function objects to search for external calls. + + Returns: + TaintedExternalContract() ( + contract: Contract, + tainted_functions: List[TaintedFunction], + tainted_variables: List[TaintedVariable] + ) + """ + tainted_contracts: dict[str, TaintedExternalContract] = {} + tainted_list: list[TaintedExternalContract] = [] + + for func in funcs: + for contract, target in func.all_high_level_calls(): + if contract.is_library: + # Not interested in library calls + continue + if contract.name not in tainted_contracts: + # A contract may be tainted by multiple function calls - only make one TaintedExternalContract object + tainted_contracts[contract.name] = TaintedExternalContract(contract) + if ( + isinstance(target, Function) + and target not in funcs + and target not in (f for f in tainted_contracts[contract.name].tainted_functions) + and not (target.is_constructor or target.is_fallback or target.is_receive) + ): + # Found a high-level call to a new tainted function + tainted_contracts[contract.name].add_tainted_function(target) + for var in target.all_state_variables_written(): + # Consider as tainted all variables written by the tainted function + if var not in (v for v in tainted_contracts[contract.name].tainted_variables): + tainted_contracts[contract.name].add_tainted_variable(var) + elif ( + isinstance(target, StateVariable) + and target not in (v for v in tainted_contracts[contract.name].tainted_variables) + and not (target.is_constant or target.is_immutable) + ): + # Found a new high-level call to a public state variable getter + tainted_contracts[contract.name].add_tainted_variable(target) + for c in tainted_contracts.values(): + tainted_list.append(c) + contract = c.contract + variables = c.tainted_variables + for var in variables: + # For each tainted variable, consider as tainted any function that reads or writes to it + read_write = set( + contract.get_functions_reading_from_variable(var) + + contract.get_functions_writing_to_variable(var) + ) + for f in read_write: + if f not in tainted_contracts[contract.name].tainted_functions and not ( + f.is_constructor or f.is_fallback or f.is_receive + ): + c.add_tainted_function(f) + return tainted_list + + +def tainted_inheriting_contracts( + tainted_contracts: List[TaintedExternalContract], contracts: List[Contract] = None +) -> List[TaintedExternalContract]: + """ + Takes a list of TaintedExternalContract obtained from tainted_external_contracts, and finds any contracts which + inherit a tainted contract, as well as any functions that call tainted functions or read tainted variables in + the inherited contract. + Args: + tainted_contracts: the list obtained from `tainted_external_contracts` or `compare`. + contracts: (optional) the list of contracts to check for inheritance. If not provided, defaults to + `contract.compilation_unit.contracts` for each contract in tainted_contracts. + + Returns: + An updated list of TaintedExternalContract, including all from the input list. + """ + for tainted in tainted_contracts: + contract = tainted.contract + check_contracts = contracts + if contracts is None: + check_contracts = contract.compilation_unit.contracts + # We are only interested in checking contracts that inherit a tainted contract + check_contracts = [ + c + for c in check_contracts + if c.name not in [t.contract.name for t in tainted_contracts] + and contract.name in [i.name for i in c.inheritance] + ] + for c in check_contracts: + new_taint = TaintedExternalContract(c) + for f in c.functions_declared: + # Search for functions that call an inherited tainted function or access an inherited tainted variable + internal_calls = [c for c in f.all_internal_calls() if isinstance(c, Function)] + if any( + call.canonical_name == t.canonical_name + for t in tainted.tainted_functions + for call in internal_calls + ) or any( + var.canonical_name == t.canonical_name + for t in tainted.tainted_variables + for var in f.all_state_variables_read() + f.all_state_variables_written() + ): + new_taint.add_tainted_function(f) + for f in new_taint.tainted_functions: + # For each newly found tainted function, consider as tainted any variable it writes to + for var in f.all_state_variables_written(): + if var not in ( + v for v in tainted.tainted_variables + new_taint.tainted_variables + ): + new_taint.add_tainted_variable(var) + for var in new_taint.tainted_variables: + # For each newly found tainted variable, consider as tainted any function that reads or writes to it + read_write = set( + contract.get_functions_reading_from_variable(var) + + contract.get_functions_writing_to_variable(var) + ) + for f in read_write: + if f not in ( + t for t in tainted.tainted_functions + new_taint.tainted_functions + ) and not (f.is_constructor or f.is_fallback or f.is_receive): + new_taint.add_tainted_function(f) + if len(new_taint.tainted_functions) > 0: + tainted_contracts.append(new_taint) + return tainted_contracts + + def get_missing_vars(v1: Contract, v2: Contract) -> List[StateVariable]: """ Gets all non-constant/immutable StateVariables that appear in v1 but not v2 @@ -233,138 +343,16 @@ def is_function_modified(f1: Function, f2: Function) -> bool: visited.extend([node_f1, node_f2]) queue_f1.extend(son for son in node_f1.sons if son not in visited) queue_f2.extend(son for son in node_f2.sons if son not in visited) + if len(node_f1.irs) != len(node_f2.irs): + return True for i, ir in enumerate(node_f1.irs): - if encode_ir_for_compare(ir) != encode_ir_for_compare(node_f2.irs[i]): + if encode_ir_for_upgradeability_compare(ir) != encode_ir_for_upgradeability_compare( + node_f2.irs[i] + ): return True return False -# pylint: disable=too-many-branches -def ntype(_type: Union[Type, str]) -> str: - if isinstance(_type, ElementaryType): - _type = str(_type) - elif isinstance(_type, ArrayType): - if isinstance(_type.type, ElementaryType): - _type = str(_type) - else: - _type = "user_defined_array" - elif isinstance(_type, Structure): - _type = str(_type) - elif isinstance(_type, Enum): - _type = str(_type) - elif isinstance(_type, MappingType): - _type = str(_type) - elif isinstance(_type, UserDefinedType): - if isinstance(_type.type, Contract): - _type = f"contract({_type.type.name})" - elif isinstance(_type.type, Structure): - _type = f"struct({_type.type.name})" - elif isinstance(_type.type, Enum): - _type = f"enum({_type.type.name})" - else: - _type = str(_type) - - _type = _type.replace(" memory", "") - _type = _type.replace(" storage ref", "") - - if "struct" in _type: - return "struct" - if "enum" in _type: - return "enum" - if "tuple" in _type: - return "tuple" - if "contract" in _type: - return "contract" - if "mapping" in _type: - return "mapping" - return _type.replace(" ", "_") - - -# pylint: disable=too-many-branches -def encode_ir_for_compare(ir: Operation) -> str: - # operations - if isinstance(ir, Assignment): - return f"({encode_var_for_compare(ir.lvalue)}):=({encode_var_for_compare(ir.rvalue)})" - if isinstance(ir, Index): - return f"index({ntype(ir.index_type)})" - if isinstance(ir, Member): - return "member" # .format(ntype(ir._type)) - if isinstance(ir, Length): - return "length" - if isinstance(ir, Binary): - return f"binary({str(ir.variable_left)}{str(ir.type)}{str(ir.variable_right)})" - if isinstance(ir, Unary): - return f"unary({str(ir.type)})" - if isinstance(ir, Condition): - return f"condition({encode_var_for_compare(ir.value)})" - if isinstance(ir, NewStructure): - return "new_structure" - if isinstance(ir, NewContract): - return "new_contract" - if isinstance(ir, NewArray): - return f"new_array({ntype(ir.array_type)})" - if isinstance(ir, NewElementaryType): - return f"new_elementary({ntype(ir.type)})" - if isinstance(ir, Delete): - return f"delete({encode_var_for_compare(ir.lvalue)},{encode_var_for_compare(ir.variable)})" - if isinstance(ir, SolidityCall): - return f"solidity_call({ir.function.full_name})" - if isinstance(ir, InternalCall): - return f"internal_call({ntype(ir.type_call)})" - if isinstance(ir, EventCall): # is this useful? - return "event" - if isinstance(ir, LibraryCall): - return "library_call" - if isinstance(ir, InternalDynamicCall): - return "internal_dynamic_call" - if isinstance(ir, HighLevelCall): # TODO: improve - return "high_level_call" - if isinstance(ir, LowLevelCall): # TODO: improve - return "low_level_call" - if isinstance(ir, TypeConversion): - return f"type_conversion({ntype(ir.type)})" - if isinstance(ir, Return): # this can be improved using values - return "return" # .format(ntype(ir.type)) - if isinstance(ir, Transfer): - return f"transfer({encode_var_for_compare(ir.call_value)})" - if isinstance(ir, Send): - return f"send({encode_var_for_compare(ir.call_value)})" - if isinstance(ir, Unpack): # TODO: improve - return "unpack" - if isinstance(ir, InitArray): # TODO: improve - return "init_array" - - # default - return "" - - -# pylint: disable=too-many-branches -def encode_var_for_compare(var: Variable) -> str: - - # variables - if isinstance(var, Constant): - return f"constant({ntype(var.type)})" - if isinstance(var, SolidityVariableComposed): - return f"solidity_variable_composed({var.name})" - if isinstance(var, SolidityVariable): - return f"solidity_variable{var.name}" - if isinstance(var, TemporaryVariable): - return "temporary_variable" - if isinstance(var, ReferenceVariable): - return f"reference({ntype(var.type)})" - if isinstance(var, LocalVariable): - return f"local_solc_variable({var.location})" - if isinstance(var, StateVariable): - return f"state_solc_variable({ntype(var.type)})" - if isinstance(var, LocalVariableInitFromTuple): - return "local_variable_init_tuple" - if isinstance(var, TupleVariable): - return "tuple_variable" - - # default - return "" - - def get_proxy_implementation_slot(proxy: Contract) -> Optional[SlotInfo]: """ Gets information about the storage slot where a proxy's implementation address is stored. diff --git a/slither/visitors/expression/constants_folding.py b/slither/visitors/expression/constants_folding.py index 12eb6be9d..b1fa570c6 100644 --- a/slither/visitors/expression/constants_folding.py +++ b/slither/visitors/expression/constants_folding.py @@ -1,5 +1,6 @@ from fractions import Fraction from typing import Union +from Crypto.Hash import keccak from slither.core import expressions from slither.core.expressions import ( @@ -11,9 +12,9 @@ from slither.core.expressions import ( UnaryOperation, TupleExpression, TypeConversion, + CallExpression, ) from slither.core.variables import Variable - from slither.utils.integer_conversion import convert_string_to_fraction, convert_string_to_int from slither.visitors.expression.expression import ExpressionVisitor from slither.core.solidity_types.elementary_type import ElementaryType @@ -65,23 +66,31 @@ class ConstantFolding(ExpressionVisitor): value = value & (2**256 - 1) return Literal(value, self._type) + # pylint: disable=import-outside-toplevel def _post_identifier(self, expression: Identifier) -> None: - if not isinstance(expression.value, Variable): - return - if not expression.value.is_constant: + from slither.core.declarations.solidity_variables import SolidityFunction + + if isinstance(expression.value, Variable): + if expression.value.is_constant: + expr = expression.value.expression + # assumption that we won't have infinite loop + # Everything outside of literal + if isinstance( + expr, + (BinaryOperation, UnaryOperation, Identifier, TupleExpression, TypeConversion), + ): + cf = ConstantFolding(expr, self._type) + expr = cf.result() + assert isinstance(expr, Literal) + set_val(expression, convert_string_to_int(expr.converted_value)) + else: + raise NotConstant + elif isinstance(expression.value, SolidityFunction): + set_val(expression, expression.value) + else: raise NotConstant - expr = expression.value.expression - # assumption that we won't have infinite loop - # Everything outside of literal - if isinstance( - expr, (BinaryOperation, UnaryOperation, Identifier, TupleExpression, TypeConversion) - ): - cf = ConstantFolding(expr, self._type) - expr = cf.result() - assert isinstance(expr, Literal) - set_val(expression, convert_string_to_int(expr.converted_value)) - # pylint: disable=too-many-branches + # pylint: disable=too-many-branches,too-many-statements def _post_binary_operation(self, expression: BinaryOperation) -> None: expression_left = expression.expression_left expression_right = expression.expression_right @@ -95,7 +104,6 @@ class ConstantFolding(ExpressionVisitor): (Literal, BinaryOperation, UnaryOperation, Identifier, TupleExpression, TypeConversion), ): raise NotConstant - left = get_val(expression_left) right = get_val(expression_right) @@ -183,7 +191,9 @@ class ConstantFolding(ExpressionVisitor): raise NotConstant def _post_literal(self, expression: Literal) -> None: - if expression.converted_value in ["true", "false"]: + if str(expression.type) == "bool": + set_val(expression, expression.converted_value) + elif str(expression.type) == "string": set_val(expression, expression.converted_value) else: try: @@ -195,7 +205,14 @@ class ConstantFolding(ExpressionVisitor): raise NotConstant def _post_call_expression(self, expression: expressions.CallExpression) -> None: - raise NotConstant + called = get_val(expression.called) + args = [get_val(arg) for arg in expression.arguments] + if called.name == "keccak256(bytes)": + digest = keccak.new(digest_bits=256) + digest.update(str(args[0]).encode("utf-8")) + set_val(expression, digest.digest()) + else: + raise NotConstant def _post_conditional_expression(self, expression: expressions.ConditionalExpression) -> None: raise NotConstant @@ -247,10 +264,24 @@ class ConstantFolding(ExpressionVisitor): expr = expression.expression if not isinstance( expr, - (Literal, BinaryOperation, UnaryOperation, Identifier, TupleExpression, TypeConversion), + ( + Literal, + BinaryOperation, + UnaryOperation, + Identifier, + TupleExpression, + TypeConversion, + CallExpression, + ), ): raise NotConstant cf = ConstantFolding(expr, self._type) expr = cf.result() assert isinstance(expr, Literal) - set_val(expression, convert_string_to_fraction(expr.converted_value)) + if str(expression.type).startswith("uint") and isinstance(expr.value, bytes): + value = int.from_bytes(expr.value, "big") + elif str(expression.type).startswith("byte") and isinstance(expr.value, int): + value = int.to_bytes(expr.value, 32, "big") + else: + value = convert_string_to_fraction(expr.converted_value) + set_val(expression, value) diff --git a/slither/visitors/slithir/expression_to_slithir.py b/slither/visitors/slithir/expression_to_slithir.py index 005ad81a4..931dc82ae 100644 --- a/slither/visitors/slithir/expression_to_slithir.py +++ b/slither/visitors/slithir/expression_to_slithir.py @@ -2,6 +2,7 @@ import logging from typing import Union, List, TYPE_CHECKING, Any from slither.core import expressions +from slither.core.scope.scope import FileScope from slither.core.declarations import ( Function, SolidityVariable, @@ -11,6 +12,9 @@ from slither.core.declarations import ( EnumContract, EnumTopLevel, Enum, + SolidityImportPlaceHolder, + Import, + Structure, ) from slither.core.expressions import ( AssignmentOperation, @@ -50,6 +54,7 @@ from slither.slithir.operations import ( Member, TypeConversion, Unary, + UnaryType, Unpack, Return, SolidityCall, @@ -109,6 +114,13 @@ _binary_to_binary = { BinaryOperationType.OROR: BinaryType.OROR, } + +_unary_to_unary = { + UnaryOperationType.BANG: UnaryType.BANG, + UnaryOperationType.TILD: UnaryType.TILD, +} + + _signed_to_unsigned = { BinaryOperationType.DIVISION_SIGNED: BinaryType.DIVISION, BinaryOperationType.MODULO_SIGNED: BinaryType.MODULO, @@ -170,6 +182,7 @@ class ExpressionToSlithIR(ExpressionVisitor): def result(self) -> List[Operation]: return self._result + # pylint: disable=too-many-branches,too-many-statements def _post_assignement_operation(self, expression: AssignmentOperation) -> None: left = get(expression.expression_left) right = get(expression.expression_right) @@ -233,6 +246,35 @@ class ExpressionToSlithIR(ExpressionVisitor): operation.set_expression(expression) self._result.append(operation) set_val(expression, left) + + elif ( + isinstance(left.type, UserDefinedType) + and isinstance(left.type.type, Structure) + and isinstance(right, TupleVariable) + ): + # This will result in a `NewStructure` operation where + # each field is assigned the value unpacked from the tuple + # (see `slither.vyper_parsing.type_parsing.parse_type`) + args = [] + for idx, elem in enumerate(left.type.type.elems.values()): + temp = TemporaryVariable(self._node) + temp.type = elem.type + args.append(temp) + operation = Unpack(temp, right, idx) + operation.set_expression(expression) + self._result.append(operation) + + for arg in args: + op = Argument(arg) + op.set_expression(expression) + self._result.append(op) + + operation = TmpCall( + left.type.type, len(left.type.type.elems), left, left.type.type.name + ) + operation.set_expression(expression) + self._result.append(operation) + else: operation = convert_assignment( left, right, expression.type, expression.expression_return_type @@ -304,7 +346,9 @@ class ExpressionToSlithIR(ExpressionVisitor): val = TupleVariable(self._node) else: val = TemporaryVariable(self._node) - internal_call = InternalCall(called, len(args), val, expression.type_call) + internal_call = InternalCall( + called, len(args), val, expression.type_call, names=expression.names + ) internal_call.set_expression(expression) self._result.append(internal_call) set_val(expression, val) @@ -373,7 +417,9 @@ class ExpressionToSlithIR(ExpressionVisitor): else: val = TemporaryVariable(self._node) - message_call = TmpCall(called, len(args), val, expression.type_call) + message_call = TmpCall( + called, len(args), val, expression.type_call, names=expression.names + ) message_call.set_expression(expression) # Gas/value are only accessible here if the syntax {gas: , value: } # Is used over .gas().value() @@ -417,6 +463,21 @@ class ExpressionToSlithIR(ExpressionVisitor): set_val(expression, t) return val = ReferenceVariable(self._node) + + if ( + isinstance(left, LocalVariable) + and isinstance(left.type, UserDefinedType) + and isinstance(left.type.type, Structure) + ): + # We rewrite the index access to a tuple variable as + # an access to its field i.e. the 0th element is the field "_0" + # (see `slither.vyper_parsing.type_parsing.parse_type`) + operation = Member(left, Constant("_" + str(right)), val) + operation.set_expression(expression) + self._result.append(operation) + set_val(expression, val) + return + # access to anonymous array # such as [0,1][x] if isinstance(left, list): @@ -426,6 +487,7 @@ class ExpressionToSlithIR(ExpressionVisitor): operation = InitArray(init_array_right, init_array_val) operation.set_expression(expression) self._result.append(operation) + operation = Index(val, left, right) operation.set_expression(expression) self._result.append(operation) @@ -443,6 +505,7 @@ class ExpressionToSlithIR(ExpressionVisitor): # Look for type(X).max / min # Because we looked at the AST structure, we need to look into the nested expression # Hopefully this is always on a direct sub field, and there is no weird construction + # pylint: disable=too-many-nested-blocks if isinstance(expression.expression, CallExpression) and expression.member_name in [ "min", "max", @@ -462,10 +525,22 @@ class ExpressionToSlithIR(ExpressionVisitor): constant_type = type_found else: # type(enum).max/min - assert isinstance(type_expression_found, Identifier) - type_found_in_expression = type_expression_found.value - assert isinstance(type_found_in_expression, (EnumContract, EnumTopLevel)) - type_found = UserDefinedType(type_found_in_expression) + # Case when enum is in another contract e.g. type(C.E).max + if isinstance(type_expression_found, MemberAccess): + contract = type_expression_found.expression.value + assert isinstance(contract, Contract) + for enum in contract.enums: + if enum.name == type_expression_found.member_name: + type_found_in_expression = enum + type_found = UserDefinedType(enum) + break + else: + assert isinstance(type_expression_found, Identifier) + type_found_in_expression = type_expression_found.value + assert isinstance( + type_found_in_expression, (EnumContract, EnumTopLevel) + ) + type_found = UserDefinedType(type_found_in_expression) constant_type = None min_value = type_found_in_expression.min max_value = type_found_in_expression.max @@ -516,13 +591,26 @@ class ExpressionToSlithIR(ExpressionVisitor): # contract A { type MyInt is int} # contract B { function f() public{ A.MyInt test = A.MyInt.wrap(1);}} # The logic is handled by _post_call_expression - if expression.member_name in expr.file_scope.user_defined_types: - set_val(expression, expr.file_scope.user_defined_types[expression.member_name]) + if expression.member_name in expr.file_scope.type_aliases: + set_val(expression, expr.file_scope.type_aliases[expression.member_name]) return # Lookup errors referred to as member of contract e.g. Test.myError.selector if expression.member_name in expr.custom_errors_as_dict: set_val(expression, expr.custom_errors_as_dict[expression.member_name]) return + # Lookup enums when in a different contract e.g. C.E + if str(expression) in expr.enums_as_dict: + set_val(expression, expr.enums_as_dict[str(expression)]) + return + + if isinstance(expr, (SolidityImportPlaceHolder, Import)): + scope = ( + expr.import_directive.scope + if isinstance(expr, SolidityImportPlaceHolder) + else expr.scope + ) + if self._check_elem_in_scope(expression.member_name, scope, expression): + return val_ref = ReferenceVariable(self._node) member = Member(expr, Constant(expression.member_name), val_ref) @@ -530,6 +618,61 @@ class ExpressionToSlithIR(ExpressionVisitor): self._result.append(member) set_val(expression, val_ref) + def _check_elem_in_scope(self, elem: str, scope: FileScope, expression: MemberAccess) -> bool: + if elem in scope.renaming: + self._check_elem_in_scope(scope.renaming[elem], scope, expression) + return True + + if elem in scope.contracts: + set_val(expression, scope.contracts[elem]) + return True + + if elem in scope.structures: + set_val(expression, scope.structures[elem]) + return True + + if elem in scope.variables: + set_val(expression, scope.variables[elem]) + return True + + if elem in scope.enums: + set_val(expression, scope.enums[elem]) + return True + + if elem in scope.type_aliases: + set_val(expression, scope.type_aliases[elem]) + return True + + for import_directive in scope.imports: + if elem == import_directive.alias: + set_val(expression, import_directive) + return True + + for custom_error in scope.custom_errors: + if custom_error.name == elem: + set_val(expression, custom_error) + return True + + if str(expression.type).startswith("function "): + # This is needed to handle functions overloading + signature_to_seaarch = ( + str(expression.type) + .replace("function ", elem) + .replace("pure ", "") + .replace("view ", "") + .replace("struct ", "") + .replace("enum ", "") + .replace(" memory", "") + .split(" returns", maxsplit=1)[0] + ) + + for function in scope.functions: + if signature_to_seaarch == function.full_name: + set_val(expression, function) + return True + + return False + def _post_new_array(self, expression: NewArray) -> None: val = TemporaryVariable(self._node) operation = TmpNewArray(expression.array_type, val) @@ -572,7 +715,7 @@ class ExpressionToSlithIR(ExpressionVisitor): expr = get(expression.expression) val = TemporaryVariable(self._node) expression_type = expression.type - assert isinstance(expression_type, (TypeAlias, UserDefinedType, ElementaryType)) + assert isinstance(expression_type, (TypeAlias, UserDefinedType, ElementaryType, ArrayType)) operation = TypeConversion(val, expr, expression_type) val.set_type(expression.type) operation.set_expression(expression) @@ -585,7 +728,7 @@ class ExpressionToSlithIR(ExpressionVisitor): operation: Operation if expression.type in [UnaryOperationType.BANG, UnaryOperationType.TILD]: lvalue = TemporaryVariable(self._node) - operation = Unary(lvalue, value, expression.type) + operation = Unary(lvalue, value, _unary_to_unary[expression.type]) operation.set_expression(expression) self._result.append(operation) set_val(expression, lvalue) diff --git a/slither/core/children/__init__.py b/slither/vyper_parsing/__init__.py similarity index 100% rename from slither/core/children/__init__.py rename to slither/vyper_parsing/__init__.py diff --git a/slither/core/children/child_event.py b/slither/vyper_parsing/ast/__init__.py similarity index 100% rename from slither/core/children/child_event.py rename to slither/vyper_parsing/ast/__init__.py diff --git a/slither/vyper_parsing/ast/ast.py b/slither/vyper_parsing/ast/ast.py new file mode 100644 index 000000000..f05a167dc --- /dev/null +++ b/slither/vyper_parsing/ast/ast.py @@ -0,0 +1,466 @@ +from typing import Dict, Callable, List +from slither.vyper_parsing.ast.types import ( + ASTNode, + Module, + ImportFrom, + EventDef, + AnnAssign, + Name, + Call, + StructDef, + VariableDecl, + Subscript, + Index, + Hex, + Int, + Str, + Tuple, + FunctionDef, + Assign, + Raise, + Attribute, + Assert, + Keyword, + Arguments, + Arg, + UnaryOp, + BinOp, + Expr, + Log, + Return, + VyDict, + VyList, + NameConstant, + If, + Compare, + For, + Break, + Continue, + Pass, + InterfaceDef, + EnumDef, + Bytes, + AugAssign, + BoolOp, +) + + +class ParsingError(Exception): + pass + + +def _extract_base_props(raw: Dict) -> Dict: + return { + "src": raw["src"], + "node_id": raw["node_id"], + } + + +def _extract_decl_props(raw: Dict) -> Dict: + return { + "doc_string": parse_doc_str(raw["doc_string"]) if raw["doc_string"] else None, + **_extract_base_props(raw), + } + + +def parse_module(raw: Dict) -> Module: + nodes_parsed: List[ASTNode] = [] + + for node in raw["body"]: + nodes_parsed.append(parse(node)) + + return Module(name=raw["name"], body=nodes_parsed, **_extract_decl_props(raw)) + + +def parse_import_from(raw: Dict) -> ImportFrom: + return ImportFrom( + module=raw["module"], + name=raw["name"], + alias=raw["alias"], + **_extract_base_props(raw), + ) + + +def parse_event_def(raw: Dict) -> EventDef: + body_parsed: List[ASTNode] = [] + for node in raw["body"]: + body_parsed.append(parse(node)) + + return EventDef( + name=raw["name"], + body=body_parsed, + *_extract_base_props(raw), + ) + + +def parse_ann_assign(raw: Dict) -> AnnAssign: + return AnnAssign( + target=parse(raw["target"]), + annotation=parse(raw["annotation"]), + value=parse(raw["value"]) if raw["value"] else None, + **_extract_base_props(raw), + ) + + +def parse_name(raw: Dict) -> Name: + return Name( + id=raw["id"], + **_extract_base_props(raw), + ) + + +def parse_call(raw: Dict) -> Call: + return Call( + func=parse(raw["func"]), + args=[parse(arg) for arg in raw["args"]], + keyword=parse(raw["keyword"]) if raw["keyword"] else None, + keywords=[parse(keyword) for keyword in raw["keywords"]], + **_extract_base_props(raw), + ) + + +def parse_struct_def(raw: Dict) -> StructDef: + body_parsed: List[ASTNode] = [] + for node in raw["body"]: + body_parsed.append(parse(node)) + + return StructDef( + name=raw["name"], + body=body_parsed, + **_extract_base_props(raw), + ) + + +def parse_variable_decl(raw: Dict) -> VariableDecl: + return VariableDecl( + annotation=parse(raw["annotation"]), + value=parse(raw["value"]) if raw["value"] else None, + target=parse(raw["target"]), + is_constant=raw["is_constant"], + is_immutable=raw["is_immutable"], + is_public=raw["is_public"], + **_extract_base_props(raw), + ) + + +def parse_subscript(raw: Dict) -> Subscript: + return Subscript( + value=parse(raw["value"]), + slice=parse(raw["slice"]), + **_extract_base_props(raw), + ) + + +def parse_index(raw: Dict) -> Index: + return Index(value=parse(raw["value"]), **_extract_base_props(raw)) + + +def parse_bytes(raw: Dict) -> Bytes: + return Bytes(value=raw["value"], **_extract_base_props(raw)) + + +def parse_hex(raw: Dict) -> Hex: + return Hex(value=raw["value"], **_extract_base_props(raw)) + + +def parse_int(raw: Dict) -> Int: + return Int(value=raw["value"], **_extract_base_props(raw)) + + +def parse_str(raw: Dict) -> Str: + return Str(value=raw["value"], **_extract_base_props(raw)) + + +def parse_tuple(raw: Dict) -> ASTNode: + return Tuple(elements=[parse(elem) for elem in raw["elements"]], **_extract_base_props(raw)) + + +def parse_function_def(raw: Dict) -> FunctionDef: + body_parsed: List[ASTNode] = [] + for node in raw["body"]: + body_parsed.append(parse(node)) + + decorators_parsed: List[ASTNode] = [] + for node in raw["decorator_list"]: + decorators_parsed.append(parse(node)) + + return FunctionDef( + name=raw["name"], + args=parse_arguments(raw["args"]), + returns=parse(raw["returns"]) if raw["returns"] else None, + body=body_parsed, + pos=raw["pos"], + decorators=decorators_parsed, + **_extract_decl_props(raw), + ) + + +def parse_assign(raw: Dict) -> Assign: + return Assign( + target=parse(raw["target"]), + value=parse(raw["value"]), + **_extract_base_props(raw), + ) + + +def parse_attribute(raw: Dict) -> Attribute: + return Attribute( + value=parse(raw["value"]), + attr=raw["attr"], + **_extract_base_props(raw), + ) + + +def parse_arguments(raw: Dict) -> Arguments: + return Arguments( + args=[parse_arg(arg) for arg in raw["args"]], + default=parse(raw["default"]) if raw["default"] else None, + defaults=[parse(x) for x in raw["defaults"]], + **_extract_base_props(raw), + ) + + +def parse_arg(raw: Dict) -> Arg: + return Arg(arg=raw["arg"], annotation=parse(raw["annotation"]), **_extract_base_props(raw)) + + +def parse_assert(raw: Dict) -> Assert: + return Assert( + test=parse(raw["test"]), + msg=parse(raw["msg"]) if raw["msg"] else None, + **_extract_base_props(raw), + ) + + +def parse_raise(raw: Dict) -> Raise: + return Raise(exc=parse(raw["exc"]) if raw["exc"] else None, **_extract_base_props(raw)) + + +def parse_expr(raw: Dict) -> Expr: + return Expr(value=parse(raw["value"]), **_extract_base_props(raw)) + + +# This is done for convenience so we can call `UnaryOperationType.get_type` during expression parsing. +unop_ast_type_to_op_symbol = {"Not": "!", "USub": "-"} + + +def parse_unary_op(raw: Dict) -> UnaryOp: + unop_str = unop_ast_type_to_op_symbol[raw["op"]["ast_type"]] + return UnaryOp(op=unop_str, operand=parse(raw["operand"]), **_extract_base_props(raw)) + + +# This is done for convenience so we can call `BinaryOperationType.get_type` during expression parsing. +binop_ast_type_to_op_symbol = { + "Add": "+", + "Mult": "*", + "Sub": "-", + "Div": "/", + "Pow": "**", + "Mod": "%", + "BitAnd": "&", + "BitOr": "|", + "Shr": "<<", + "Shl": ">>", + "NotEq": "!=", + "Eq": "==", + "LtE": "<=", + "GtE": ">=", + "Lt": "<", + "Gt": ">", + "In": "In", + "NotIn": "NotIn", +} + + +def parse_bin_op(raw: Dict) -> BinOp: + arith_op_str = binop_ast_type_to_op_symbol[raw["op"]["ast_type"]] + return BinOp( + left=parse(raw["left"]), + op=arith_op_str, + right=parse(raw["right"]), + **_extract_base_props(raw), + ) + + +def parse_compare(raw: Dict) -> Compare: + logical_op_str = binop_ast_type_to_op_symbol[raw["op"]["ast_type"]] + return Compare( + left=parse(raw["left"]), + op=logical_op_str, + right=parse(raw["right"]), + **_extract_base_props(raw), + ) + + +def parse_keyword(raw: Dict) -> Keyword: + return Keyword(arg=raw["arg"], value=parse(raw["value"]), **_extract_base_props(raw)) + + +def parse_log(raw: Dict) -> Log: + return Log(value=parse(raw["value"]), **_extract_base_props(raw)) + + +def parse_return(raw: Dict) -> Return: + return Return(value=parse(raw["value"]) if raw["value"] else None, **_extract_base_props(raw)) + + +def parse_dict(raw: Dict) -> ASTNode: + return VyDict( + keys=[parse(x) for x in raw["keys"]], + values=[parse(x) for x in raw["values"]], + **_extract_base_props(raw), + ) + + +def parse_list(raw: Dict) -> VyList: + return VyList(elements=[parse(x) for x in raw["elements"]], **_extract_base_props(raw)) + + +def parse_name_constant(raw: Dict) -> NameConstant: + return NameConstant(value=raw["value"], **_extract_base_props(raw)) + + +def parse_doc_str(raw: Dict) -> str: + assert isinstance(raw["value"], str) + return raw["value"] + + +def parse_if(raw: Dict) -> ASTNode: + return If( + test=parse(raw["test"]), + body=[parse(x) for x in raw["body"]], + orelse=[parse(x) for x in raw["orelse"]], + **_extract_base_props(raw), + ) + + +def parse_for(raw: Dict) -> For: + return For( + target=parse(raw["target"]), + iter=parse(raw["iter"]), + body=[parse(x) for x in raw["body"]], + **_extract_base_props(raw), + ) + + +def parse_break(raw: Dict) -> Break: + return Break(**_extract_base_props(raw)) + + +def parse_continue(raw: Dict) -> Continue: + return Continue(**_extract_base_props(raw)) + + +def parse_pass(raw: Dict) -> Pass: + return Pass( + **_extract_base_props(raw), + ) + + +def parse_interface_def(raw: Dict) -> InterfaceDef: + nodes_parsed: List[ASTNode] = [] + + for node in raw["body"]: + nodes_parsed.append(parse(node)) + return InterfaceDef(name=raw["name"], body=nodes_parsed, **_extract_base_props(raw)) + + +def parse_enum_def(raw: Dict) -> EnumDef: + nodes_parsed: List[ASTNode] = [] + + for node in raw["body"]: + nodes_parsed.append(parse(node)) + + return EnumDef(name=raw["name"], body=nodes_parsed, **_extract_base_props(raw)) + + +aug_assign_ast_type_to_op_symbol = { + "Add": "+=", + "Mult": "*=", + "Sub": "-=", + "Div": "-=", + "Pow": "**=", + "Mod": "%=", + "BitAnd": "&=", + "BitOr": "|=", + "Shr": "<<=", + "Shl": ">>=", +} + + +def parse_aug_assign(raw: Dict) -> AugAssign: + op_str = aug_assign_ast_type_to_op_symbol[raw["op"]["ast_type"]] + return AugAssign( + target=parse(raw["target"]), + op=op_str, + value=parse(raw["value"]), + **_extract_base_props(raw), + ) + + +def parse_unsupported(raw: Dict) -> ASTNode: + raise ParsingError("unsupported Vyper node", raw["ast_type"], raw.keys(), raw) + + +bool_op_ast_type_to_op_symbol = {"And": "&&", "Or": "||"} + + +def parse_bool_op(raw: Dict) -> BoolOp: + op_str = bool_op_ast_type_to_op_symbol[raw["op"]["ast_type"]] + return BoolOp(op=op_str, values=[parse(x) for x in raw["values"]], **_extract_base_props(raw)) + + +def parse(raw: Dict) -> ASTNode: + try: + return PARSERS.get(raw["ast_type"], parse_unsupported)(raw) + except ParsingError as e: + raise e + except Exception as e: + raise e + # raise ParsingError("failed to parse Vyper node", raw["ast_type"], e, raw.keys(), raw) + + +PARSERS: Dict[str, Callable[[Dict], ASTNode]] = { + "Module": parse_module, + "ImportFrom": parse_import_from, + "EventDef": parse_event_def, + "AnnAssign": parse_ann_assign, + "Name": parse_name, + "Call": parse_call, + "Pass": parse_pass, + "StructDef": parse_struct_def, + "VariableDecl": parse_variable_decl, + "Subscript": parse_subscript, + "Index": parse_index, + "Hex": parse_hex, + "Int": parse_int, + "Str": parse_str, + "DocStr": parse_doc_str, + "Tuple": parse_tuple, + "FunctionDef": parse_function_def, + "Assign": parse_assign, + "Raise": parse_raise, + "Attribute": parse_attribute, + "Assert": parse_assert, + "keyword": parse_keyword, + "arguments": parse_arguments, + "arg": parse_arg, + "UnaryOp": parse_unary_op, + "BinOp": parse_bin_op, + "Expr": parse_expr, + "Log": parse_log, + "Return": parse_return, + "If": parse_if, + "Dict": parse_dict, + "List": parse_list, + "Compare": parse_compare, + "NameConstant": parse_name_constant, + "For": parse_for, + "Break": parse_break, + "Continue": parse_continue, + "InterfaceDef": parse_interface_def, + "EnumDef": parse_enum_def, + "Bytes": parse_bytes, + "AugAssign": parse_aug_assign, + "BoolOp": parse_bool_op, +} diff --git a/slither/vyper_parsing/ast/types.py b/slither/vyper_parsing/ast/types.py new file mode 100644 index 000000000..d62bf6fb4 --- /dev/null +++ b/slither/vyper_parsing/ast/types.py @@ -0,0 +1,262 @@ +from __future__ import annotations +from typing import List, Optional, Union +from dataclasses import dataclass + + +@dataclass +class ASTNode: + src: str + node_id: int + + +@dataclass +class Definition(ASTNode): + doc_string: Optional[str] + + +@dataclass +class Module(Definition): + body: List[ASTNode] + name: str + + +@dataclass +class ImportFrom(ASTNode): + module: str + name: str + alias: Optional[str] + + +@dataclass +class EventDef(ASTNode): + name: str + body: List[AnnAssign] + + +@dataclass +class AnnAssign(ASTNode): + target: Name + annotation: Union[Subscript, Name, Call] + value: Optional[ASTNode] + + +@dataclass +class Name(ASTNode): # type or identifier + id: str + + +@dataclass +class Call(ASTNode): + func: ASTNode + args: List[ASTNode] + keyword: Optional[ASTNode] + keywords: List[ASTNode] + + +@dataclass +class Pass(ASTNode): + pass + + +@dataclass +class StructDef(ASTNode): + name: str + body: List[AnnAssign] + + +@dataclass +class VariableDecl(ASTNode): + annotation: ASTNode + target: ASTNode + value: Optional[ASTNode] + is_constant: bool + is_immutable: bool + is_public: bool + + +@dataclass +class Subscript(ASTNode): + value: ASTNode + slice: ASTNode + + +@dataclass +class Index(ASTNode): + value: ASTNode + + +@dataclass +class Bytes(ASTNode): + value: bytes + + +@dataclass +class Hex(ASTNode): + value: str + + +@dataclass +class Int(ASTNode): + value: int + + +@dataclass +class Str(ASTNode): + value: str + + +@dataclass +class VyList(ASTNode): + elements: List[ASTNode] + + +@dataclass +class VyDict(ASTNode): + keys: List[ASTNode] + values: List[ASTNode] + + +@dataclass +class Tuple(ASTNode): + elements: List[ASTNode] + + +@dataclass +class FunctionDef(Definition): + name: str + args: Optional[Arguments] + returns: Optional[List[ASTNode]] + body: List[ASTNode] + decorators: Optional[List[ASTNode]] + pos: Optional[any] # not sure what this is + + +@dataclass +class Assign(ASTNode): + target: ASTNode + value: ASTNode + + +@dataclass +class Attribute(ASTNode): + value: ASTNode + attr: str + + +@dataclass +class Arguments(ASTNode): + args: List[Arg] + default: Optional[ASTNode] + defaults: List[ASTNode] + + +@dataclass +class Arg(ASTNode): + arg: str + annotation: Optional[ASTNode] + + +@dataclass +class Assert(ASTNode): + test: ASTNode + msg: Optional[Str] + + +@dataclass +class Raise(ASTNode): + exc: ASTNode + + +@dataclass +class Expr(ASTNode): + value: ASTNode + + +@dataclass +class UnaryOp(ASTNode): + op: ASTNode + operand: ASTNode + + +@dataclass +class BinOp(ASTNode): + left: ASTNode + op: str + right: ASTNode + + +@dataclass +class Keyword(ASTNode): + arg: str + value: ASTNode + + +@dataclass +class Log(ASTNode): + value: ASTNode + + +@dataclass +class Return(ASTNode): + value: Optional[ASTNode] + + +@dataclass +class If(ASTNode): + test: ASTNode + body: List[ASTNode] + orelse: List[ASTNode] + + +@dataclass +class Compare(ASTNode): + left: ASTNode + op: ASTNode + right: ASTNode + + +@dataclass +class NameConstant(ASTNode): + value: bool + + +@dataclass +class For(ASTNode): + target: ASTNode + iter: ASTNode + body: List[ASTNode] + + +@dataclass +class Continue(ASTNode): + pass + + +@dataclass +class Break(ASTNode): + pass + + +@dataclass +class InterfaceDef(ASTNode): + name: str + body: List[ASTNode] + + +@dataclass +class EnumDef(ASTNode): + name: str + body: List[ASTNode] + + +@dataclass +class AugAssign(ASTNode): + target: ASTNode + op: ASTNode + value: ASTNode + + +@dataclass +class BoolOp(ASTNode): + op: ASTNode + values: List[ASTNode] diff --git a/slither/vyper_parsing/cfg/__init__.py b/slither/vyper_parsing/cfg/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/slither/vyper_parsing/cfg/node.py b/slither/vyper_parsing/cfg/node.py new file mode 100644 index 000000000..5a584fe16 --- /dev/null +++ b/slither/vyper_parsing/cfg/node.py @@ -0,0 +1,66 @@ +from typing import Optional, Dict + +from slither.core.cfg.node import Node +from slither.core.cfg.node import NodeType +from slither.core.expressions.assignment_operation import ( + AssignmentOperation, + AssignmentOperationType, +) +from slither.core.expressions.identifier import Identifier +from slither.vyper_parsing.expressions.expression_parsing import parse_expression +from slither.visitors.expression.find_calls import FindCalls +from slither.visitors.expression.read_var import ReadVar +from slither.visitors.expression.write_var import WriteVar + + +class NodeVyper: + def __init__(self, node: Node) -> None: + self._unparsed_expression: Optional[Dict] = None + self._node = node + + @property + def underlying_node(self) -> Node: + return self._node + + def add_unparsed_expression(self, expression: Dict) -> None: + assert self._unparsed_expression is None + self._unparsed_expression = expression + + def analyze_expressions(self, caller_context) -> None: + if self._node.type == NodeType.VARIABLE and not self._node.expression: + self._node.add_expression(self._node.variable_declaration.expression) + if self._unparsed_expression: + expression = parse_expression(self._unparsed_expression, caller_context) + self._node.add_expression(expression) + self._unparsed_expression = None + + if self._node.expression: + + if self._node.type == NodeType.VARIABLE: + # Update the expression to be an assignement to the variable + _expression = AssignmentOperation( + Identifier(self._node.variable_declaration), + self._node.expression, + AssignmentOperationType.ASSIGN, + self._node.variable_declaration.type, + ) + _expression.set_offset( + self._node.expression.source_mapping, self._node.compilation_unit + ) + self._node.add_expression(_expression, bypass_verif_empty=True) + + expression = self._node.expression + read_var = ReadVar(expression) + self._node.variables_read_as_expression = read_var.result() + + write_var = WriteVar(expression) + self._node.variables_written_as_expression = write_var.result() + + find_call = FindCalls(expression) + self._node.calls_as_expression = find_call.result() + self._node.external_calls_as_expressions = [ + c for c in self._node.calls_as_expression if not isinstance(c.called, Identifier) + ] + self._node.internal_calls_as_expressions = [ + c for c in self._node.calls_as_expression if isinstance(c.called, Identifier) + ] diff --git a/slither/vyper_parsing/declarations/__init__.py b/slither/vyper_parsing/declarations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/slither/vyper_parsing/declarations/contract.py b/slither/vyper_parsing/declarations/contract.py new file mode 100644 index 000000000..2acd43e0f --- /dev/null +++ b/slither/vyper_parsing/declarations/contract.py @@ -0,0 +1,524 @@ +from pathlib import Path +from typing import List, TYPE_CHECKING +from slither.vyper_parsing.ast.types import ( + Module, + FunctionDef, + EventDef, + EnumDef, + StructDef, + VariableDecl, + ImportFrom, + InterfaceDef, + AnnAssign, + Expr, + Name, + Arguments, + Index, + Subscript, + Int, + Arg, +) + +from slither.vyper_parsing.declarations.event import EventVyper +from slither.vyper_parsing.declarations.struct import StructVyper +from slither.vyper_parsing.variables.state_variable import StateVariableVyper +from slither.vyper_parsing.declarations.function import FunctionVyper +from slither.core.declarations.function_contract import FunctionContract +from slither.core.declarations import Contract, StructureContract, EnumContract, EventContract + +from slither.core.variables.state_variable import StateVariable + +if TYPE_CHECKING: + from slither.vyper_parsing.vyper_compilation_unit import VyperCompilationUnit + + +class ContractVyper: # pylint: disable=too-many-instance-attributes + def __init__( + self, slither_parser: "VyperCompilationUnit", contract: Contract, module: Module + ) -> None: + + self._contract: Contract = contract + self._slither_parser: "VyperCompilationUnit" = slither_parser + self._data = module + # Vyper models only have one contract (aside from interfaces) and the name is the file path + # We use the stem to make it a more user friendly name that is easy to query via canonical name + self._contract.name = Path(module.name).stem + self._contract.id = module.node_id + self._is_analyzed: bool = False + + self._enumsNotParsed: List[EnumDef] = [] + self._structuresNotParsed: List[StructDef] = [] + self._variablesNotParsed: List[VariableDecl] = [] + self._eventsNotParsed: List[EventDef] = [] + self._functionsNotParsed: List[FunctionDef] = [] + + self._structures_parser: List[StructVyper] = [] + self._variables_parser: List[StateVariableVyper] = [] + self._events_parser: List[EventVyper] = [] + self._functions_parser: List[FunctionVyper] = [] + + self._parse_contract_items() + + @property + def is_analyzed(self) -> bool: + return self._is_analyzed + + def set_is_analyzed(self, is_analyzed: bool) -> None: + self._is_analyzed = is_analyzed + + @property + def underlying_contract(self) -> Contract: + return self._contract + + def _parse_contract_items(self) -> None: + for node in self._data.body: + if isinstance(node, FunctionDef): + self._functionsNotParsed.append(node) + elif isinstance(node, EventDef): + self._eventsNotParsed.append(node) + elif isinstance(node, VariableDecl): + self._variablesNotParsed.append(node) + elif isinstance(node, EnumDef): + self._enumsNotParsed.append(node) + elif isinstance(node, StructDef): + self._structuresNotParsed.append(node) + elif isinstance(node, ImportFrom): + # TOOD aliases + # We create an `InterfaceDef` sense the compilatuion unit does not contain the actual interface + # https://github.com/vyperlang/vyper/tree/master/vyper/builtins/interfaces + if node.module == "vyper.interfaces": + interfaces = { + "ERC20Detailed": InterfaceDef( + src="-1:-1:-1", + node_id=-1, + name="ERC20Detailed", + body=[ + FunctionDef( + src="-1:-1:-1", + node_id=-1, + doc_string=None, + name="name", + args=Arguments( + src="-1:-1:-1", + node_id=-1, + args=[], + default=None, + defaults=[], + ), + returns=Subscript( + src="-1:-1:-1", + node_id=-1, + value=Name(src="-1:-1:-1", node_id=-1, id="String"), + slice=Index( + src="-1:-1:-1", + node_id=-1, + value=Int(src="-1:-1:-1", node_id=-1, value=1), + ), + ), + body=[ + Expr( + src="-1:-1:-1", + node_id=-1, + value=Name(src="-1:-1:-1", node_id=-1, id="view"), + ) + ], + decorators=[], + pos=None, + ), + FunctionDef( + src="-1:-1:-1", + node_id=-1, + doc_string=None, + name="symbol", + args=Arguments( + src="-1:-1:-1", + node_id=-1, + args=[], + default=None, + defaults=[], + ), + returns=Subscript( + src="-1:-1:-1", + node_id=-1, + value=Name(src="-1:-1:-1", node_id=-1, id="String"), + slice=Index( + src="-1:-1:-1", + node_id=-1, + value=Int(src="-1:-1:-1", node_id=-1, value=1), + ), + ), + body=[ + Expr( + src="-1:-1:-1", + node_id=-1, + value=Name(src="-1:-1:-1", node_id=-1, id="view"), + ) + ], + decorators=[], + pos=None, + ), + FunctionDef( + src="-1:-1:-1", + node_id=-1, + doc_string=None, + name="decimals", + args=Arguments( + src="-1:-1:-1", + node_id=-1, + args=[], + default=None, + defaults=[], + ), + returns=Name(src="-1:-1:-1", node_id=-1, id="uint8"), + body=[ + Expr( + src="-1:-1:-1", + node_id=-1, + value=Name(src="-1:-1:-1", node_id=-1, id="view"), + ) + ], + decorators=[], + pos=None, + ), + ], + ), + "ERC20": InterfaceDef( + src="-1:-1:-1", + node_id=1, + name="ERC20", + body=[ + FunctionDef( + src="-1:-1:-1", + node_id=2, + doc_string=None, + name="totalSupply", + args=Arguments( + src="-1:-1:-1", + node_id=3, + args=[], + default=None, + defaults=[], + ), + returns=Name(src="-1:-1:-1", node_id=7, id="uint256"), + body=[ + Expr( + src="-1:-1:-1", + node_id=4, + value=Name(src="-1:-1:-1", node_id=5, id="view"), + ) + ], + decorators=[], + pos=None, + ), + FunctionDef( + src="-1:-1:-1", + node_id=9, + doc_string=None, + name="balanceOf", + args=Arguments( + src="-1:-1:-1", + node_id=10, + args=[ + Arg( + src="-1:-1:-1", + node_id=11, + arg="_owner", + annotation=Name( + src="-1:-1:-1", node_id=12, id="address" + ), + ) + ], + default=None, + defaults=[], + ), + returns=Name(src="-1:-1:-1", node_id=17, id="uint256"), + body=[ + Expr( + src="-1:-1:-1", + node_id=14, + value=Name(src="-1:-1:-1", node_id=15, id="view"), + ) + ], + decorators=[], + pos=None, + ), + FunctionDef( + src="-1:-1:-1", + node_id=19, + doc_string=None, + name="allowance", + args=Arguments( + src="-1:-1:-1", + node_id=20, + args=[ + Arg( + src="-1:-1:-1", + node_id=21, + arg="_owner", + annotation=Name( + src="-1:-1:-1", node_id=22, id="address" + ), + ), + Arg( + src="-1:-1:-1", + node_id=24, + arg="_spender", + annotation=Name( + src="-1:-1:-1", node_id=25, id="address" + ), + ), + ], + default=None, + defaults=[], + ), + returns=Name(src="-1:-1:-1", node_id=30, id="uint256"), + body=[ + Expr( + src="-1:-1:-1", + node_id=27, + value=Name(src="-1:-1:-1", node_id=28, id="view"), + ) + ], + decorators=[], + pos=None, + ), + FunctionDef( + src="-1:-1:-1", + node_id=32, + doc_string=None, + name="transfer", + args=Arguments( + src="-1:-1:-1", + node_id=33, + args=[ + Arg( + src="-1:-1:-1", + node_id=34, + arg="_to", + annotation=Name( + src="-1:-1:-1", node_id=35, id="address" + ), + ), + Arg( + src="-1:-1:-1", + node_id=37, + arg="_value", + annotation=Name( + src="-1:-1:-1", node_id=38, id="uint256" + ), + ), + ], + default=None, + defaults=[], + ), + returns=Name(src="-1:-1:-1", node_id=43, id="bool"), + body=[ + Expr( + src="-1:-1:-1", + node_id=40, + value=Name(src="-1:-1:-1", node_id=41, id="nonpayable"), + ) + ], + decorators=[], + pos=None, + ), + FunctionDef( + src="-1:-1:-1", + node_id=45, + doc_string=None, + name="transferFrom", + args=Arguments( + src="-1:-1:-1", + node_id=46, + args=[ + Arg( + src="-1:-1:-1", + node_id=47, + arg="_from", + annotation=Name( + src="-1:-1:-1", node_id=48, id="address" + ), + ), + Arg( + src="-1:-1:-1", + node_id=50, + arg="_to", + annotation=Name( + src="-1:-1:-1", node_id=51, id="address" + ), + ), + Arg( + src="-1:-1:-1", + node_id=53, + arg="_value", + annotation=Name( + src="-1:-1:-1", node_id=54, id="uint256" + ), + ), + ], + default=None, + defaults=[], + ), + returns=Name(src="-1:-1:-1", node_id=59, id="bool"), + body=[ + Expr( + src="-1:-1:-1", + node_id=56, + value=Name(src="-1:-1:-1", node_id=57, id="nonpayable"), + ) + ], + decorators=[], + pos=None, + ), + FunctionDef( + src="-1:-1:-1", + node_id=61, + doc_string=None, + name="approve", + args=Arguments( + src="-1:-1:-1", + node_id=62, + args=[ + Arg( + src="-1:-1:-1", + node_id=63, + arg="_spender", + annotation=Name( + src="-1:-1:-1", node_id=64, id="address" + ), + ), + Arg( + src="-1:-1:-1", + node_id=66, + arg="_value", + annotation=Name( + src="-1:-1:-1", node_id=67, id="uint256" + ), + ), + ], + default=None, + defaults=[], + ), + returns=Name(src="-1:-1:-1", node_id=72, id="bool"), + body=[ + Expr( + src="-1:-1:-1", + node_id=69, + value=Name(src="-1:-1:-1", node_id=70, id="nonpayable"), + ) + ], + decorators=[], + pos=None, + ), + ], + ), + "ERC165": [], + "ERC721": [], + "ERC4626": [], + } + self._data.body.append(interfaces[node.name]) + + elif isinstance(node, InterfaceDef): + # This needs to be done lazily as interfaces can refer to constant state variables + contract = Contract(self._contract.compilation_unit, self._contract.file_scope) + contract.set_offset(node.src, self._contract.compilation_unit) + contract.is_interface = True + + contract_parser = ContractVyper(self._slither_parser, contract, node) + self._contract.file_scope.contracts[contract.name] = contract + # pylint: disable=protected-access + self._slither_parser._underlying_contract_to_parser[contract] = contract_parser + + elif isinstance(node, AnnAssign): # implements: ERC20 + pass # TODO + else: + raise ValueError("Unknown contract node: ", node) + + def parse_enums(self) -> None: + for enum in self._enumsNotParsed: + name = enum.name + canonicalName = self._contract.name + "." + enum.name + values = [x.value.id for x in enum.body] + new_enum = EnumContract(name, canonicalName, values) + new_enum.set_contract(self._contract) + new_enum.set_offset(enum.src, self._contract.compilation_unit) + self._contract.enums_as_dict[name] = new_enum # TODO solidity using canonicalName + self._enumsNotParsed = [] + + def parse_structs(self) -> None: + for struct in self._structuresNotParsed: + st = StructureContract(self._contract.compilation_unit) + st.set_contract(self._contract) + st.set_offset(struct.src, self._contract.compilation_unit) + + st_parser = StructVyper(st, struct) + self._contract.structures_as_dict[st.name] = st + self._structures_parser.append(st_parser) + # Interfaces can refer to struct defs + self._contract.file_scope.structures[st.name] = st + + self._structuresNotParsed = [] + + def parse_state_variables(self) -> None: + for varNotParsed in self._variablesNotParsed: + var = StateVariable() + var.set_contract(self._contract) + var.set_offset(varNotParsed.src, self._contract.compilation_unit) + + var_parser = StateVariableVyper(var, varNotParsed) + self._variables_parser.append(var_parser) + + assert var.name + self._contract.variables_as_dict[var.name] = var + self._contract.add_variables_ordered([var]) + # Interfaces can refer to constants + self._contract.file_scope.variables[var.name] = var + + self._variablesNotParsed = [] + + def parse_events(self) -> None: + for event_to_parse in self._eventsNotParsed: + event = EventContract() + event.set_contract(self._contract) + event.set_offset(event_to_parse.src, self._contract.compilation_unit) + + event_parser = EventVyper(event, event_to_parse) + self._events_parser.append(event_parser) + self._contract.events_as_dict[event.full_name] = event + + def parse_functions(self) -> None: + + for function in self._functionsNotParsed: + func = FunctionContract(self._contract.compilation_unit) + func.set_offset(function.src, self._contract.compilation_unit) + func.set_contract(self._contract) + func.set_contract_declarer(self._contract) + + func_parser = FunctionVyper(func, function, self) + self._contract.add_function(func) + self._contract.compilation_unit.add_function(func) + self._functions_parser.append(func_parser) + + self._functionsNotParsed = [] + + def analyze_state_variables(self): + # Struct defs can refer to constant state variables + for var_parser in self._variables_parser: + var_parser.analyze(self._contract) + + def analyze(self) -> None: + + for struct_parser in self._structures_parser: + struct_parser.analyze(self._contract) + + for event_parser in self._events_parser: + event_parser.analyze(self._contract) + + for function in self._functions_parser: + function.analyze_params() + + for function in self._functions_parser: + function.analyze_content() + + def __hash__(self) -> int: + return self._contract.id diff --git a/slither/vyper_parsing/declarations/event.py b/slither/vyper_parsing/declarations/event.py new file mode 100644 index 000000000..43d781439 --- /dev/null +++ b/slither/vyper_parsing/declarations/event.py @@ -0,0 +1,39 @@ +""" + Event module +""" + +from slither.core.variables.event_variable import EventVariable +from slither.vyper_parsing.variables.event_variable import EventVariableVyper +from slither.core.declarations.event import Event +from slither.vyper_parsing.ast.types import AnnAssign, Pass + + +from slither.vyper_parsing.ast.types import EventDef + + +class EventVyper: # pylint: disable=too-few-public-methods + """ + Event class + """ + + def __init__(self, event: Event, event_def: EventDef) -> None: + + self._event = event + self._event.name = event_def.name + self._elemsNotParsed = event_def.body + + def analyze(self, contract) -> None: + for elem_to_parse in self._elemsNotParsed: + if not isinstance(elem_to_parse, AnnAssign): + assert isinstance(elem_to_parse, Pass) + continue + + elem = EventVariable() + + elem.set_offset(elem_to_parse.src, self._event.contract.compilation_unit) + event_parser = EventVariableVyper(elem, elem_to_parse) + event_parser.analyze(contract) + + self._event.elems.append(elem) + + self._elemsNotParsed = [] diff --git a/slither/vyper_parsing/declarations/function.py b/slither/vyper_parsing/declarations/function.py new file mode 100644 index 000000000..f5acf1296 --- /dev/null +++ b/slither/vyper_parsing/declarations/function.py @@ -0,0 +1,570 @@ +from typing import Dict, Union, List, TYPE_CHECKING + +from slither.core.cfg.node import NodeType, link_nodes, Node +from slither.core.cfg.scope import Scope +from slither.core.declarations.function import ( + Function, + FunctionType, +) +from slither.core.declarations.function import ModifierStatements +from slither.core.declarations.modifier import Modifier +from slither.core.source_mapping.source_mapping import Source +from slither.core.variables.local_variable import LocalVariable +from slither.vyper_parsing.cfg.node import NodeVyper +from slither.solc_parsing.exceptions import ParsingError +from slither.vyper_parsing.variables.local_variable import LocalVariableVyper +from slither.vyper_parsing.ast.types import ( + Int, + Call, + Attribute, + Name, + Tuple as TupleVyper, + ASTNode, + AnnAssign, + FunctionDef, + Return, + Assert, + Compare, + Log, + Subscript, + If, + Pass, + Assign, + AugAssign, + Raise, + Expr, + For, + Index, + Arg, + Arguments, + Continue, + Break, +) + +if TYPE_CHECKING: + from slither.core.compilation_unit import SlitherCompilationUnit + from slither.vyper_parsing.declarations.contract import ContractVyper + + +def link_underlying_nodes(node1: NodeVyper, node2: NodeVyper): + link_nodes(node1.underlying_node, node2.underlying_node) + + +class FunctionVyper: # pylint: disable=too-many-instance-attributes + def __init__( + self, + function: Function, + function_data: FunctionDef, + contract_parser: "ContractVyper", + ) -> None: + + self._function = function + self._function.name = function_data.name + self._function.id = function_data.node_id + self._functionNotParsed = function_data + self._decoratorNotParsed = None + self._local_variables_parser: List[LocalVariableVyper] = [] + self._variables_renamed = [] + self._contract_parser = contract_parser + self._node_to_NodeVyper: Dict[Node, NodeVyper] = {} + + for decorator in function_data.decorators: + if isinstance(decorator, Call): + # TODO handle multiple + self._decoratorNotParsed = decorator + elif isinstance(decorator, Name): + if decorator.id in ["external", "public", "internal"]: + self._function.visibility = decorator.id + elif decorator.id == "view": + self._function.view = True + elif decorator.id == "pure": + self._function.pure = True + elif decorator.id == "payable": + self._function.payable = True + elif decorator.id == "nonpayable": + self._function.payable = False + else: + raise ValueError(f"Unknown decorator {decorator.id}") + + # Interfaces do not have decorators and are external + if self._function._visibility is None: + self._function.visibility = "external" + + self._params_was_analyzed = False + self._content_was_analyzed = False + self._counter_scope_local_variables = 0 + + if function_data.doc_string is not None: + function.has_documentation = True + + self._analyze_function_type() + + @property + def underlying_function(self) -> Function: + return self._function + + @property + def compilation_unit(self) -> "SlitherCompilationUnit": + return self._function.compilation_unit + + ################################################################################### + ################################################################################### + # region Variables + ################################################################################### + ################################################################################### + + @property + def variables_renamed( + self, + ) -> Dict[int, LocalVariableVyper]: + return self._variables_renamed + + def _add_local_variable(self, local_var_parser: LocalVariableVyper) -> None: + # Ensure variables name are unique for SSA conversion + # This should not apply to actual Vyper variables currently + # but is necessary if we have nested loops where we've created artificial variables e.g. counter_var + if local_var_parser.underlying_variable.name: + known_variables = [v.name for v in self._function.variables] + while local_var_parser.underlying_variable.name in known_variables: + local_var_parser.underlying_variable.name += ( + f"_scope_{self._counter_scope_local_variables}" + ) + self._counter_scope_local_variables += 1 + known_variables = [v.name for v in self._function.variables] + # TODO no reference ID + # if local_var_parser.reference_id is not None: + # self._variables_renamed[local_var_parser.reference_id] = local_var_parser + self._function.variables_as_dict[ + local_var_parser.underlying_variable.name + ] = local_var_parser.underlying_variable + self._local_variables_parser.append(local_var_parser) + + # endregion + ################################################################################### + ################################################################################### + # region Analyses + ################################################################################### + ################################################################################### + + @property + def function_not_parsed(self) -> Dict: + return self._functionNotParsed + + def _analyze_function_type(self) -> None: + if self._function.name == "__init__": + self._function.function_type = FunctionType.CONSTRUCTOR + elif self._function.name == "__default__": + self._function.function_type = FunctionType.FALLBACK + else: + self._function.function_type = FunctionType.NORMAL + + def analyze_params(self) -> None: + if self._params_was_analyzed: + return + + self._params_was_analyzed = True + + params = self._functionNotParsed.args + returns = self._functionNotParsed.returns + + if params: + self._parse_params(params) + if returns: + self._parse_returns(returns) + + def analyze_content(self) -> None: + if self._content_was_analyzed: + return + + self._content_was_analyzed = True + + body = self._functionNotParsed.body + + if body and not isinstance(body[0], Pass): + self._function.is_implemented = True + self._function.is_empty = False + self._parse_cfg(body) + self._update_reachability(self._function.entry_point) + else: + self._function.is_implemented = False + self._function.is_empty = True + + for local_var_parser in self._local_variables_parser: + local_var_parser.analyze(self._function) + + for node_parser in self._node_to_NodeVyper.values(): + node_parser.analyze_expressions(self._function) + + self._analyze_decorator() + + def _analyze_decorator(self) -> None: + if not self._decoratorNotParsed: + return + + decorator = self._decoratorNotParsed + if decorator.args: + name = f"{decorator.func.id}({decorator.args[0].value})" + else: + name = decorator.func.id + + contract = self._contract_parser.underlying_contract + compilation_unit = self._contract_parser.underlying_contract.compilation_unit + modifier = Modifier(compilation_unit) + modifier.name = name + modifier.set_offset(decorator.src, compilation_unit) + modifier.set_contract(contract) + modifier.set_contract_declarer(contract) + latest_entry_point = self._function.entry_point + self._function.add_modifier( + ModifierStatements( + modifier=modifier, + entry_point=latest_entry_point, + nodes=[latest_entry_point], + ) + ) + + # endregion + ################################################################################### + ################################################################################### + # region Nodes + ################################################################################### + ################################################################################### + + def _new_node( + self, node_type: NodeType, src: Union[str, Source], scope: Union[Scope, "Function"] + ) -> NodeVyper: + node = self._function.new_node(node_type, src, scope) + node_parser = NodeVyper(node) + self._node_to_NodeVyper[node] = node_parser + return node_parser + + # endregion + ################################################################################### + ################################################################################### + # region Parsing function + ################################################################################### + ################################################################################### + def _update_reachability(self, node: Node) -> None: + if node.is_reachable: + return + node.set_is_reachable(True) + for son in node.sons: + self._update_reachability(son) + + # pylint: disable=too-many-branches,too-many-statements,protected-access,too-many-locals + def _parse_cfg(self, cfg: List[ASTNode]) -> None: + + entry_node = self._new_node(NodeType.ENTRYPOINT, "-1:-1:-1", self.underlying_function) + self._function.entry_point = entry_node.underlying_node + scope = Scope(True, False, self.underlying_function) + + def parse_statement( + curr_node: NodeVyper, + expr: ASTNode, + continue_destination=None, + break_destination=None, + ) -> NodeVyper: + if isinstance(expr, AnnAssign): + local_var = LocalVariable() + local_var.set_function(self._function) + local_var.set_offset(expr.src, self._function.compilation_unit) + + local_var_parser = LocalVariableVyper(local_var, expr) + self._add_local_variable(local_var_parser) + + new_node = self._new_node(NodeType.VARIABLE, expr.src, scope) + if expr.value is not None: + local_var.initialized = True + new_node.add_unparsed_expression(expr.value) + new_node.underlying_node.add_variable_declaration(local_var) + link_underlying_nodes(curr_node, new_node) + + curr_node = new_node + + elif isinstance(expr, (AugAssign, Assign)): + new_node = self._new_node(NodeType.EXPRESSION, expr.src, scope) + new_node.add_unparsed_expression(expr) + link_underlying_nodes(curr_node, new_node) + + curr_node = new_node + + elif isinstance(expr, Expr): + # TODO This is a workaround to handle Vyper putting payable/view in the function body... https://github.com/vyperlang/vyper/issues/3578 + if not isinstance(expr.value, Name): + new_node = self._new_node(NodeType.EXPRESSION, expr.src, scope) + new_node.add_unparsed_expression(expr.value) + link_underlying_nodes(curr_node, new_node) + + curr_node = new_node + + elif isinstance(expr, For): + + node_startLoop = self._new_node(NodeType.STARTLOOP, expr.src, scope) + node_endLoop = self._new_node(NodeType.ENDLOOP, expr.src, scope) + + link_underlying_nodes(curr_node, node_startLoop) + + local_var = LocalVariable() + local_var.set_function(self._function) + local_var.set_offset(expr.src, self._function.compilation_unit) + + counter_var = AnnAssign( + expr.target.src, + expr.target.node_id, + target=Name("-1:-1:-1", -1, "counter_var"), + annotation=Name("-1:-1:-1", -1, "uint256"), + value=Int("-1:-1:-1", -1, 0), + ) + local_var_parser = LocalVariableVyper(local_var, counter_var) + self._add_local_variable(local_var_parser) + counter_node = self._new_node(NodeType.VARIABLE, expr.src, scope) + local_var.initialized = True + counter_node.add_unparsed_expression(counter_var.value) + counter_node.underlying_node.add_variable_declaration(local_var) + + link_underlying_nodes(node_startLoop, counter_node) + + node_condition = None + if isinstance(expr.iter, (Attribute, Name)): + # HACK + # The loop variable is not annotated so we infer its type by looking at the type of the iterator + if isinstance(expr.iter, Attribute): # state variable + iter_expr = expr.iter + loop_iterator = list( + filter( + lambda x: x._variable.name == iter_expr.attr, + self._contract_parser._variables_parser, + ) + )[0] + + else: # local variable + iter_expr = expr.iter + loop_iterator = list( + filter( + lambda x: x._variable.name == iter_expr.id, + self._local_variables_parser, + ) + )[0] + + # TODO use expr.src instead of -1:-1:1? + cond_expr = Compare( + "-1:-1:-1", + -1, + left=Name("-1:-1:-1", -1, "counter_var"), + op="<=", + right=Call( + "-1:-1:-1", + -1, + func=Name("-1:-1:-1", -1, "len"), + args=[iter_expr], + keywords=[], + keyword=None, + ), + ) + node_condition = self._new_node(NodeType.IFLOOP, expr.src, scope) + node_condition.add_unparsed_expression(cond_expr) + + if loop_iterator._elem_to_parse.value.id == "DynArray": + loop_var_annotation = loop_iterator._elem_to_parse.slice.value.elements[0] + else: + loop_var_annotation = loop_iterator._elem_to_parse.value + + value = Subscript( + "-1:-1:-1", + -1, + value=Name("-1:-1:-1", -1, loop_iterator._variable.name), + slice=Index("-1:-1:-1", -1, value=Name("-1:-1:-1", -1, "counter_var")), + ) + loop_var = AnnAssign( + expr.target.src, + expr.target.node_id, + target=expr.target, + annotation=loop_var_annotation, + value=value, + ) + + elif isinstance(expr.iter, Call): # range + range_val = expr.iter.args[0] + cond_expr = Compare( + "-1:-1:-1", + -1, + left=Name("-1:-1:-1", -1, "counter_var"), + op="<=", + right=range_val, + ) + node_condition = self._new_node(NodeType.IFLOOP, expr.src, scope) + node_condition.add_unparsed_expression(cond_expr) + loop_var = AnnAssign( + expr.target.src, + expr.target.node_id, + target=expr.target, + annotation=Name("-1:-1:-1", -1, "uint256"), + value=Name("-1:-1:-1", -1, "counter_var"), + ) + + else: + raise NotImplementedError + + # After creating condition node, we link it declaration of the loop variable + link_underlying_nodes(counter_node, node_condition) + + # Create an expression for the loop increment (counter_var += 1) + loop_increment = AugAssign( + "-1:-1:-1", + -1, + target=Name("-1:-1:-1", -1, "counter_var"), + op="+=", + value=Int("-1:-1:-1", -1, 1), + ) + node_increment = self._new_node(NodeType.EXPRESSION, expr.src, scope) + node_increment.add_unparsed_expression(loop_increment) + link_underlying_nodes(node_increment, node_condition) + + continue_destination = node_increment + break_destination = node_endLoop + + # We assign the index variable or range variable in the loop body on each iteration + expr.body.insert(0, loop_var) + body_node = None + new_node = node_condition + for stmt in expr.body: + body_node = parse_statement( + new_node, stmt, continue_destination, break_destination + ) + new_node = body_node + + if body_node is not None: + link_underlying_nodes(body_node, node_increment) + + link_underlying_nodes(node_condition, node_endLoop) + + curr_node = node_endLoop + + elif isinstance(expr, Continue): + new_node = self._new_node(NodeType.CONTINUE, expr.src, scope) + link_underlying_nodes(curr_node, new_node) + link_underlying_nodes(new_node, continue_destination) + + elif isinstance(expr, Break): + new_node = self._new_node(NodeType.BREAK, expr.src, scope) + link_underlying_nodes(curr_node, new_node) + link_underlying_nodes(new_node, break_destination) + + elif isinstance(expr, Return): + new_node = self._new_node(NodeType.RETURN, expr.src, scope) + if expr.value is not None: + new_node.add_unparsed_expression(expr.value) + + link_underlying_nodes(curr_node, new_node) + curr_node = new_node + + elif isinstance(expr, Assert): + new_node = self._new_node(NodeType.EXPRESSION, expr.src, scope) + new_node.add_unparsed_expression(expr) + + link_underlying_nodes(curr_node, new_node) + curr_node = new_node + + elif isinstance(expr, Log): + new_node = self._new_node(NodeType.EXPRESSION, expr.src, scope) + new_node.add_unparsed_expression(expr.value) + + link_underlying_nodes(curr_node, new_node) + curr_node = new_node + + elif isinstance(expr, If): + condition_node = self._new_node(NodeType.IF, expr.test.src, scope) + condition_node.add_unparsed_expression(expr.test) + + endIf_node = self._new_node(NodeType.ENDIF, expr.src, scope) + + true_node = None + new_node = condition_node + for stmt in expr.body: + true_node = parse_statement( + new_node, stmt, continue_destination, break_destination + ) + new_node = true_node + + link_underlying_nodes(true_node, endIf_node) + + false_node = None + new_node = condition_node + for stmt in expr.orelse: + false_node = parse_statement( + new_node, stmt, continue_destination, break_destination + ) + new_node = false_node + + if false_node is not None: + link_underlying_nodes(false_node, endIf_node) + + else: + link_underlying_nodes(condition_node, endIf_node) + + link_underlying_nodes(curr_node, condition_node) + curr_node = endIf_node + + elif isinstance(expr, Pass): + pass + elif isinstance(expr, Raise): + new_node = self._new_node(NodeType.EXPRESSION, expr.src, scope) + new_node.add_unparsed_expression(expr) + link_underlying_nodes(curr_node, new_node) + curr_node = new_node + + else: + raise ParsingError(f"Statement not parsed {expr.__class__.__name__} {expr}") + + return curr_node + + curr_node = entry_node + for expr in cfg: + curr_node = parse_statement(curr_node, expr) + + # endregion + ################################################################################### + ################################################################################### + + def _add_param(self, param: Arg, initialized: bool = False) -> LocalVariableVyper: + + local_var = LocalVariable() + local_var.set_function(self._function) + local_var.set_offset(param.src, self._function.compilation_unit) + local_var_parser = LocalVariableVyper(local_var, param) + + if initialized: + local_var.initialized = True + + if local_var.location == "default": + local_var.set_location("memory") + + self._add_local_variable(local_var_parser) + return local_var_parser + + def _parse_params(self, params: Arguments): + + self._function.parameters_src().set_offset(params.src, self._function.compilation_unit) + if params.defaults: + self._function._default_args_as_expressions = params.defaults + for param in params.args: + local_var = self._add_param(param) + self._function.add_parameters(local_var.underlying_variable) + + def _parse_returns(self, returns: Union[Name, TupleVyper, Subscript]): + + self._function.returns_src().set_offset(returns.src, self._function.compilation_unit) + # Only the type of the arg is given, not a name. We create an an `Arg` with an empty name + # so that the function has the correct return type in its signature but doesn't clash with + # other identifiers during name resolution (`find_variable`). + if isinstance(returns, (Name, Subscript)): + local_var = self._add_param(Arg(returns.src, returns.node_id, "", annotation=returns)) + self._function.add_return(local_var.underlying_variable) + else: + assert isinstance(returns, TupleVyper) + for ret in returns.elements: + local_var = self._add_param(Arg(ret.src, ret.node_id, "", annotation=ret)) + self._function.add_return(local_var.underlying_variable) + + ################################################################################### + ################################################################################### diff --git a/slither/vyper_parsing/declarations/struct.py b/slither/vyper_parsing/declarations/struct.py new file mode 100644 index 000000000..3a3ccf7b8 --- /dev/null +++ b/slither/vyper_parsing/declarations/struct.py @@ -0,0 +1,33 @@ +from typing import List + +from slither.core.declarations.structure import Structure +from slither.core.variables.structure_variable import StructureVariable +from slither.vyper_parsing.variables.structure_variable import StructureVariableVyper +from slither.vyper_parsing.ast.types import StructDef, AnnAssign + + +class StructVyper: # pylint: disable=too-few-public-methods + def __init__( + self, + st: Structure, + struct: StructDef, + ) -> None: + + self._structure = st + st.name = struct.name + st.canonical_name = struct.name + self._structure.contract.name + + self._elemsNotParsed: List[AnnAssign] = struct.body + + def analyze(self, contract) -> None: + for elem_to_parse in self._elemsNotParsed: + elem = StructureVariable() + elem.set_structure(self._structure) + elem.set_offset(elem_to_parse.src, self._structure.contract.compilation_unit) + + elem_parser = StructureVariableVyper(elem, elem_to_parse) + elem_parser.analyze(contract) + + self._structure.elems[elem.name] = elem + self._structure.add_elem_in_order(elem.name) + self._elemsNotParsed = [] diff --git a/slither/vyper_parsing/expressions/__init__.py b/slither/vyper_parsing/expressions/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/slither/vyper_parsing/expressions/expression_parsing.py b/slither/vyper_parsing/expressions/expression_parsing.py new file mode 100644 index 000000000..d51467fab --- /dev/null +++ b/slither/vyper_parsing/expressions/expression_parsing.py @@ -0,0 +1,464 @@ +from typing import Optional, List, Union, TYPE_CHECKING +from collections import deque +from slither.core.declarations.solidity_variables import ( + SOLIDITY_VARIABLES_COMPOSED, + SolidityVariableComposed, +) +from slither.core.declarations import SolidityFunction, FunctionContract +from slither.core.variables.state_variable import StateVariable +from slither.core.expressions import ( + CallExpression, + ElementaryTypeNameExpression, + Identifier, + IndexAccess, + Literal, + MemberAccess, + SelfIdentifier, + TupleExpression, + TypeConversion, + UnaryOperation, + UnaryOperationType, +) +from slither.core.expressions.assignment_operation import ( + AssignmentOperation, + AssignmentOperationType, +) +from slither.core.expressions.binary_operation import ( + BinaryOperation, + BinaryOperationType, +) +from slither.core.solidity_types import ( + ArrayType, + ElementaryType, + UserDefinedType, +) +from slither.core.declarations.contract import Contract +from slither.vyper_parsing.expressions.find_variable import find_variable +from slither.vyper_parsing.type_parsing import parse_type +from slither.all_exceptions import ParsingError +from slither.vyper_parsing.ast.types import ( + Int, + Call, + Attribute, + Name, + Tuple, + Hex, + BinOp, + Str, + Assert, + Compare, + UnaryOp, + Subscript, + NameConstant, + VyDict, + Bytes, + BoolOp, + Assign, + AugAssign, + VyList, + Raise, + ASTNode, +) + +if TYPE_CHECKING: + from slither.core.expressions.expression import Expression + + +def vars_to_typestr(rets: Optional[List["Expression"]]) -> str: + if rets is None: + return "tuple()" + if len(rets) == 1: + return str(rets[0].type) + return f"tuple({','.join(str(ret.type) for ret in rets)})" + + +# pylint: disable=too-many-branches,too-many-statements,too-many-locals +def parse_expression( + expression: ASTNode, caller_context: Union[FunctionContract, Contract] +) -> "Expression": + + if isinstance(expression, Int): + literal = Literal(str(expression.value), ElementaryType("uint256")) + literal.set_offset(expression.src, caller_context.compilation_unit) + return literal + + if isinstance(expression, Hex): + # TODO this is an implicit conversion and could potentially be bytes20 or other? https://github.com/vyperlang/vyper/issues/3580 + literal = Literal(str(expression.value), ElementaryType("address")) + literal.set_offset(expression.src, caller_context.compilation_unit) + return literal + + if isinstance(expression, Str): + literal = Literal(str(expression.value), ElementaryType("string")) + literal.set_offset(expression.src, caller_context.compilation_unit) + return literal + + if isinstance(expression, Bytes): + literal = Literal(str(expression.value), ElementaryType("bytes")) + literal.set_offset(expression.src, caller_context.compilation_unit) + return literal + + if isinstance(expression, NameConstant): + assert str(expression.value) in ["True", "False"] + literal = Literal(str(expression.value), ElementaryType("bool")) + literal.set_offset(expression.src, caller_context.compilation_unit) + return literal + + if isinstance(expression, Call): + called = parse_expression(expression.func, caller_context) + if isinstance(called, Identifier) and isinstance(called.value, SolidityFunction): + if called.value.name == "empty()": + type_to = parse_type(expression.args[0], caller_context) + # TODO figure out how to represent this type argument + parsed_expr = CallExpression(called, [], str(type_to)) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if called.value.name == "convert()": + arg = parse_expression(expression.args[0], caller_context) + type_to = parse_type(expression.args[1], caller_context) + parsed_expr = TypeConversion(arg, type_to) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if called.value.name == "min_value()": + type_to = parse_type(expression.args[0], caller_context) + member_type = str(type_to) + # TODO return Literal + parsed_expr = MemberAccess( + "min", + member_type, + CallExpression( + Identifier(SolidityFunction("type()")), + [ElementaryTypeNameExpression(type_to)], + member_type, + ), + ) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if called.value.name == "max_value()": + type_to = parse_type(expression.args[0], caller_context) + member_type = str(type_to) + # TODO return Literal + parsed_expr = MemberAccess( + "max", + member_type, + CallExpression( + Identifier(SolidityFunction("type()")), + [ElementaryTypeNameExpression(type_to)], + member_type, + ), + ) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if called.value.name == "raw_call()": + args = [parse_expression(a, caller_context) for a in expression.args] + # This is treated specially in order to force `extract_tmp_call` to treat this as a `HighLevelCall` which will be converted + # to a `LowLevelCall` by `convert_to_low_level`. This is an artifact of the late conversion of Solidity... + call = CallExpression( + MemberAccess("raw_call", "tuple(bool,bytes32)", args[0]), + args[1:], + "tuple(bool,bytes32)", + ) + call.set_offset(expression.src, caller_context.compilation_unit) + call.call_value = next( + iter( + parse_expression(x.value, caller_context) + for x in expression.keywords + if x.arg == "value" + ), + None, + ) + call.call_gas = next( + iter( + parse_expression(x.value, caller_context) + for x in expression.keywords + if x.arg == "gas" + ), + None, + ) + # TODO handle `max_outsize` keyword + + return call + + if expression.args and isinstance(expression.args[0], VyDict): + arguments = [] + for val in expression.args[0].values: + arguments.append(parse_expression(val, caller_context)) + else: + arguments = [parse_expression(a, caller_context) for a in expression.args] + + rets = None + # Since the AST lacks the type of the return values, we recover it. https://github.com/vyperlang/vyper/issues/3581 + if isinstance(called, Identifier): + if isinstance(called.value, FunctionContract): + rets = called.value.returns + # Default arguments are not represented in the AST, so we recover them as well. + # pylint: disable=protected-access + if called.value._default_args_as_expressions and len(arguments) < len( + called.value.parameters + ): + arguments.extend( + [ + parse_expression(x, caller_context) + for x in called.value._default_args_as_expressions + ] + ) + + elif isinstance(called.value, SolidityFunction): + rets = called.value.return_type + + elif isinstance(called.value, Contract): + # Type conversions are not explicitly represented in the AST e.g. converting address to contract/ interface, + # so we infer that a type conversion is occurring if `called` is a `Contract` type. https://github.com/vyperlang/vyper/issues/3580 + type_to = parse_type(expression.func, caller_context) + parsed_expr = TypeConversion(arguments[0], type_to) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + elif isinstance(called, MemberAccess) and called.type is not None: + # (recover_type_2) Propagate the type collected to the `CallExpression` + # see recover_type_1 + rets = [called] + + type_str = vars_to_typestr(rets) + parsed_expr = CallExpression(called, arguments, type_str) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if isinstance(expression, Attribute): + member_name = expression.attr + if isinstance(expression.value, Name): + # TODO this is ambiguous because it could be a state variable or a call to balance https://github.com/vyperlang/vyper/issues/3582 + if expression.value.id == "self" and member_name != "balance": + var = find_variable(member_name, caller_context, is_self=True) + parsed_expr = SelfIdentifier(var) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + var.references.append(parsed_expr.source_mapping) + return parsed_expr + + expr = parse_expression(expression.value, caller_context) + # TODO this is ambiguous because it could be a type conversion of an interface or a member access + # see https://github.com/vyperlang/vyper/issues/3580 and ttps://github.com/vyperlang/vyper/issues/3582 + if expression.attr == "address": + parsed_expr = TypeConversion(expr, ElementaryType("address")) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + member_access = MemberAccess(member_name, None, expr) + + if str(member_access) in SOLIDITY_VARIABLES_COMPOSED: + parsed_expr = Identifier(SolidityVariableComposed(str(member_access))) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + else: + expr = parse_expression(expression.value, caller_context) + member_name_ret_type = None + # (recover_type_1) This may be a call to an interface and we don't have the return types, + # so we see if there's a function identifier with `member_name` and propagate the type to + # its enclosing `CallExpression`. https://github.com/vyperlang/vyper/issues/3581 + if ( + isinstance(expr, Identifier) + and isinstance(expr.value, StateVariable) + and isinstance(expr.value.type, UserDefinedType) + and isinstance(expr.value.type.type, Contract) + ): + # If we access a member of an interface, needs to be interface instead of self namespace + var = find_variable(member_name, expr.value.type.type) + if isinstance(var, FunctionContract): + rets = var.returns + member_name_ret_type = vars_to_typestr(rets) + + if ( + isinstance(expr, TypeConversion) + and isinstance(expr.type, UserDefinedType) + and isinstance(expr.type.type, Contract) + ): + # If we access a member of an interface, needs to be interface instead of self namespace + var = find_variable(member_name, expr.type.type) + if isinstance(var, FunctionContract): + rets = var.returns + member_name_ret_type = vars_to_typestr(rets) + + member_access = MemberAccess(member_name, member_name_ret_type, expr) + + member_access.set_offset(expression.src, caller_context.compilation_unit) + return member_access + + if isinstance(expression, Name): + var = find_variable(expression.id, caller_context) + parsed_expr = Identifier(var) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if isinstance(expression, Assign): + lhs = parse_expression(expression.target, caller_context) + rhs = parse_expression(expression.value, caller_context) + parsed_expr = AssignmentOperation(lhs, rhs, AssignmentOperationType.ASSIGN, None) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if isinstance(expression, AugAssign): + lhs = parse_expression(expression.target, caller_context) + rhs = parse_expression(expression.value, caller_context) + + op = AssignmentOperationType.get_type(expression.op) + parsed_expr = AssignmentOperation(lhs, rhs, op, None) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if isinstance(expression, (Tuple, VyList)): + tuple_vars = [parse_expression(x, caller_context) for x in expression.elements] + parsed_expr = TupleExpression(tuple_vars) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if isinstance(expression, UnaryOp): + operand = parse_expression(expression.operand, caller_context) + op = UnaryOperationType.get_type( + expression.op, isprefix=True + ) # TODO does vyper have postfix? + + parsed_expr = UnaryOperation(operand, op) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if isinstance(expression, Compare): + lhs = parse_expression(expression.left, caller_context) + + # We assume left operand in membership comparison cannot be Array type + if expression.op in ["In", "NotIn"]: + # If we see a membership operator e.g. x in [foo(), bar()], we convert it to logical operations + # like (x == foo() || x == bar()) or (x != foo() && x != bar()) for "not in" + # TODO consider rewriting as if-else to accurately represent the precedence of potential side-effects + + conditions = deque() + rhs = parse_expression(expression.right, caller_context) + is_tuple = isinstance(rhs, TupleExpression) + is_array = isinstance(rhs, Identifier) and isinstance(rhs.value.type, ArrayType) + if is_array: + assert ( + rhs.value.type.is_fixed_array + ), "Dynamic arrays are not supported in comparison operators" + if is_tuple or is_array: + length = len(rhs.expressions) if is_tuple else rhs.value.type.length_value.value + inner_op = ( + BinaryOperationType.get_type("!=") + if expression.op == "NotIn" + else BinaryOperationType.get_type("==") + ) + for i in range(length): + elem_expr = ( + rhs.expressions[i] + if is_tuple + else IndexAccess(rhs, Literal(str(i), ElementaryType("uint256"))) + ) + elem_expr.set_offset(rhs.source_mapping, caller_context.compilation_unit) + parsed_expr = BinaryOperation(lhs, elem_expr, inner_op) + parsed_expr.set_offset(lhs.source_mapping, caller_context.compilation_unit) + conditions.append(parsed_expr) + + outer_op = ( + BinaryOperationType.get_type("&&") + if expression.op == "NotIn" + else BinaryOperationType.get_type("||") + ) + while len(conditions) > 1: + lhs = conditions.pop() + rhs = conditions.pop() + + conditions.appendleft(BinaryOperation(lhs, rhs, outer_op)) + + return conditions.pop() + + # enum type membership check https://docs.vyperlang.org/en/stable/types.html?h#id18 + is_member_op = ( + BinaryOperationType.get_type("==") + if expression.op == "NotIn" + else BinaryOperationType.get_type("!=") + ) + # If all bits are cleared, then the lhs is not a member of the enum + # This allows representing membership in multiple enum members + # For example, if enum Foo has members A (1), B (2), and C (4), then + # (x in [Foo.A, Foo.B]) is equivalent to (x & (Foo.A | Foo.B) != 0), + # where (Foo.A | Foo.B) evaluates to 3. + # Thus, when x is 3, (x & (Foo.A | Foo.B) != 0) is true. + enum_bit_mask = BinaryOperation( + TypeConversion(lhs, ElementaryType("uint256")), + TypeConversion(rhs, ElementaryType("uint256")), + BinaryOperationType.get_type("&"), + ) + membership_check = BinaryOperation( + enum_bit_mask, Literal("0", ElementaryType("uint256")), is_member_op + ) + membership_check.set_offset(lhs.source_mapping, caller_context.compilation_unit) + return membership_check + + # a regular logical operator + rhs = parse_expression(expression.right, caller_context) + op = BinaryOperationType.get_type(expression.op) + + parsed_expr = BinaryOperation(lhs, rhs, op) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if isinstance(expression, BinOp): + lhs = parse_expression(expression.left, caller_context) + rhs = parse_expression(expression.right, caller_context) + + op = BinaryOperationType.get_type(expression.op) + parsed_expr = BinaryOperation(lhs, rhs, op) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if isinstance(expression, Assert): + # Treat assert the same as a Solidity `require`. + # TODO rename from `SolidityFunction` to `Builtin`? + type_str = "tuple()" + if expression.msg is None: + func = SolidityFunction("require(bool)") + args = [parse_expression(expression.test, caller_context)] + else: + func = SolidityFunction("require(bool,string)") + args = [ + parse_expression(expression.test, caller_context), + parse_expression(expression.msg, caller_context), + ] + + parsed_expr = CallExpression(Identifier(func), args, type_str) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if isinstance(expression, Subscript): + left_expression = parse_expression(expression.value, caller_context) + right_expression = parse_expression(expression.slice.value, caller_context) + parsed_expr = IndexAccess(left_expression, right_expression) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if isinstance(expression, BoolOp): + lhs = parse_expression(expression.values[0], caller_context) + rhs = parse_expression(expression.values[1], caller_context) + + op = BinaryOperationType.get_type(expression.op) + parsed_expr = BinaryOperation(lhs, rhs, op) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + if isinstance(expression, Raise): + type_str = "tuple()" + func = ( + SolidityFunction("revert()") + if expression.exc is None + else SolidityFunction("revert(string)") + ) + args = [] if expression.exc is None else [parse_expression(expression.exc, caller_context)] + + parsed_expr = CallExpression(Identifier(func), args, type_str) + parsed_expr.set_offset(expression.src, caller_context.compilation_unit) + return parsed_expr + + raise ParsingError(f"Expression not parsed {expression}") diff --git a/slither/vyper_parsing/expressions/find_variable.py b/slither/vyper_parsing/expressions/find_variable.py new file mode 100644 index 000000000..0509a29d7 --- /dev/null +++ b/slither/vyper_parsing/expressions/find_variable.py @@ -0,0 +1,150 @@ +from typing import TYPE_CHECKING, Optional, Union, Tuple + +from slither.core.declarations import Event, Enum, Structure +from slither.core.declarations.contract import Contract +from slither.core.declarations.custom_error import CustomError +from slither.core.declarations.function import Function +from slither.core.declarations.function_contract import FunctionContract +from slither.core.declarations.solidity_variables import ( + SOLIDITY_FUNCTIONS, + SOLIDITY_VARIABLES, + SolidityFunction, + SolidityVariable, +) +from slither.core.variables.variable import Variable +from slither.solc_parsing.exceptions import VariableNotFound + +if TYPE_CHECKING: + from slither.vyper_parsing.declarations.function import FunctionVyper + + +def _find_variable_in_function_parser( + var_name: str, + function_parser: Optional["FunctionVyper"], +) -> Optional[Variable]: + if function_parser is None: + return None + func_variables = function_parser.variables_as_dict + if var_name in func_variables: + return func_variables[var_name] + + return None + + +def _find_in_contract( + var_name: str, + contract: Optional[Contract], + contract_declarer: Optional[Contract], +) -> Optional[Union[Variable, Function, Contract, Event, Enum, Structure, CustomError]]: + if contract is None or contract_declarer is None: + return None + + # variable are looked from the contract declarer + contract_variables = contract.variables_as_dict + if var_name in contract_variables: + return contract_variables[var_name] + + functions = {f.name: f for f in contract.functions if not f.is_shadowed} + if var_name in functions: + return functions[var_name] + + # structures are looked on the contract declarer + structures = contract.structures_as_dict + if var_name in structures: + return structures[var_name] + + events = contract.events_as_dict + if var_name in events: + return events[var_name] + + enums = contract.enums_as_dict + if var_name in enums: + return enums[var_name] + + # If the enum is referred as its name rather than its canonicalName + enums = {e.name: e for e in contract.enums} + if var_name in enums: + return enums[var_name] + + return None + + +def find_variable( + var_name: str, + caller_context: Union[FunctionContract, Contract], + is_self: bool = False, +) -> Tuple[ + Union[ + Variable, + Function, + Contract, + SolidityVariable, + SolidityFunction, + Event, + Enum, + Structure, + ] +]: + """ + Return the variable found and a boolean indicating if the variable was created + If the variable was created, it has no source mapping, and it the caller must add it + + :param var_name: + :type var_name: + :param caller_context: + :type caller_context: + :param is_self: + :type is_self: + :return: + :rtype: + """ + # pylint: disable=import-outside-toplevel + from slither.vyper_parsing.declarations.function import ( + FunctionVyper, + ) + + if isinstance(caller_context, Contract): + current_scope = caller_context.file_scope + next_context = caller_context + else: + current_scope = caller_context.contract.file_scope + next_context = caller_context.contract + + function_parser: Optional[FunctionVyper] = ( + caller_context if isinstance(caller_context, FunctionContract) else None + ) + + # If a local shadows a state variable but the attribute is `self`, we want to + # return the state variable and not the local. + if not is_self: + ret1 = _find_variable_in_function_parser(var_name, function_parser) + if ret1: + return ret1 + + ret = _find_in_contract(var_name, next_context, caller_context) + if ret: + return ret + + if var_name in current_scope.variables: + return current_scope.variables[var_name] + + # Could refer to any enum + all_enumss = [c.enums_as_dict for c in current_scope.contracts.values()] + all_enums = {k: v for d in all_enumss for k, v in d.items()} + if var_name in all_enums: + return all_enums[var_name] + + contracts = current_scope.contracts + if var_name in contracts: + return contracts[var_name] + + if var_name in SOLIDITY_VARIABLES: + return SolidityVariable(var_name) + + if f"{var_name}()" in SOLIDITY_FUNCTIONS: + return SolidityFunction(f"{var_name}()") + + if f"{var_name}()" in next_context.events_as_dict: + return next_context.events_as_dict[f"{var_name}()"] + + raise VariableNotFound(f"Variable not found: {var_name} (context {caller_context})") diff --git a/slither/vyper_parsing/type_parsing.py b/slither/vyper_parsing/type_parsing.py new file mode 100644 index 000000000..34c76cc6e --- /dev/null +++ b/slither/vyper_parsing/type_parsing.py @@ -0,0 +1,99 @@ +from typing import Union +from slither.core.solidity_types.elementary_type import ( + ElementaryType, + ElementaryTypeName, +) # TODO rename solidity type +from slither.core.solidity_types.array_type import ArrayType +from slither.core.solidity_types.mapping_type import MappingType +from slither.core.solidity_types.user_defined_type import UserDefinedType +from slither.core.declarations import FunctionContract, Contract +from slither.vyper_parsing.ast.types import Name, Subscript, Call, Index, Tuple +from slither.solc_parsing.exceptions import ParsingError + +# pylint: disable=too-many-branches,too-many-return-statements,import-outside-toplevel,too-many-locals +def parse_type( + annotation: Union[Name, Subscript, Call, Tuple], + caller_context: Union[FunctionContract, Contract], +): + from slither.vyper_parsing.expressions.expression_parsing import parse_expression + + if isinstance(caller_context, FunctionContract): + contract = caller_context.contract + else: + contract = caller_context + + assert isinstance(annotation, (Name, Subscript, Call, Tuple)) + + if isinstance(annotation, Name): + name = annotation.id + lname = name.lower() # map `String` to string + if lname in ElementaryTypeName: + return ElementaryType(lname) + + if name in contract.structures_as_dict: + return UserDefinedType(contract.structures_as_dict[name]) + + if name in contract.enums_as_dict: + return UserDefinedType(contract.enums_as_dict[name]) + + if name in contract.file_scope.contracts: + return UserDefinedType(contract.file_scope.contracts[name]) + + if name in contract.file_scope.structures: + return UserDefinedType(contract.file_scope.structures[name]) + elif isinstance(annotation, Subscript): + assert isinstance(annotation.slice, Index) + # This is also a strange construct... https://github.com/vyperlang/vyper/issues/3577 + if isinstance(annotation.slice.value, Tuple): + assert isinstance(annotation.value, Name) + if annotation.value.id == "DynArray": + type_ = parse_type(annotation.slice.value.elements[0], caller_context) + length = parse_expression(annotation.slice.value.elements[1], caller_context) + return ArrayType(type_, length) + if annotation.value.id == "HashMap": + type_from = parse_type(annotation.slice.value.elements[0], caller_context) + type_to = parse_type(annotation.slice.value.elements[1], caller_context) + + return MappingType(type_from, type_to) + + elif isinstance(annotation.value, Subscript): + type_ = parse_type(annotation.value, caller_context) + + elif isinstance(annotation.value, Name): + # TODO it is weird that the ast_type is `Index` when it's a type annotation and not an expression, so we grab the value. https://github.com/vyperlang/vyper/issues/3577 + type_ = parse_type(annotation.value, caller_context) + if annotation.value.id == "String": + # This is an elementary type + return type_ + + length = parse_expression(annotation.slice.value, caller_context) + return ArrayType(type_, length) + + elif isinstance(annotation, Call): + # TODO event variable represented as Call https://github.com/vyperlang/vyper/issues/3579 + return parse_type(annotation.args[0], caller_context) + + elif isinstance(annotation, Tuple): + # Vyper has tuple types like python x = f() where f() -> (y,z) + # and tuple elements can be unpacked like x[0]: y and x[1]: z. + # We model these as a struct and unpack each index into a field + # e.g. accessing the 0th element is translated as x._0 + from slither.core.declarations.structure import Structure + from slither.core.variables.structure_variable import StructureVariable + + st = Structure(caller_context.compilation_unit) + st.set_offset("-1:-1:-1", caller_context.compilation_unit) + st.name = "FAKE_TUPLE" + for idx, elem_info in enumerate(annotation.elements): + elem = StructureVariable() + elem.type = parse_type(elem_info, caller_context) + elem.name = f"_{idx}" + elem.set_structure(st) + elem.set_offset("-1:-1:-1", caller_context.compilation_unit) + st.elems[elem.name] = elem + st.add_elem_in_order(elem.name) + st.name += elem.name + + return UserDefinedType(st) + + raise ParsingError(f"Type name not found {name} context {caller_context}") diff --git a/slither/vyper_parsing/variables/__init__.py b/slither/vyper_parsing/variables/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/slither/vyper_parsing/variables/event_variable.py b/slither/vyper_parsing/variables/event_variable.py new file mode 100644 index 000000000..507c17665 --- /dev/null +++ b/slither/vyper_parsing/variables/event_variable.py @@ -0,0 +1,24 @@ +from slither.core.variables.event_variable import EventVariable +from slither.vyper_parsing.type_parsing import parse_type +from slither.vyper_parsing.ast.types import AnnAssign, Call + + +class EventVariableVyper: + def __init__(self, variable: EventVariable, variable_data: AnnAssign): + self._variable = variable + self._variable.name = variable_data.target.id + if ( + isinstance(variable_data.annotation, Call) + and variable_data.annotation.func.id == "indexed" + ): + self._variable.indexed = True + else: + self._variable.indexed = False + self._elem_to_parse = variable_data.annotation + + @property + def underlying_variable(self) -> EventVariable: + return self._variable + + def analyze(self, contract) -> None: + self._variable.type = parse_type(self._elem_to_parse, contract) diff --git a/slither/vyper_parsing/variables/local_variable.py b/slither/vyper_parsing/variables/local_variable.py new file mode 100644 index 000000000..1195743e1 --- /dev/null +++ b/slither/vyper_parsing/variables/local_variable.py @@ -0,0 +1,34 @@ +from typing import Union + +from slither.core.variables.local_variable import LocalVariable +from slither.vyper_parsing.ast.types import Arg, Name, AnnAssign, Subscript, Call, Tuple +from slither.vyper_parsing.type_parsing import parse_type + + +class LocalVariableVyper: + def __init__(self, variable: LocalVariable, variable_data: Union[Arg, AnnAssign, Name]) -> None: + self._variable: LocalVariable = variable + + if isinstance(variable_data, Arg): + self._variable.name = variable_data.arg + self._elem_to_parse = variable_data.annotation + elif isinstance(variable_data, AnnAssign): + self._variable.name = variable_data.target.id + self._elem_to_parse = variable_data.annotation + else: + assert isinstance(variable_data, Name) + self._variable.name = variable_data.id + self._elem_to_parse = variable_data + + assert isinstance(self._elem_to_parse, (Name, Subscript, Call, Tuple)) + + # Vyper does not have data locations or storage pointers. + # If this was left as default, reference types would be considered storage by `LocalVariable.is_storage` + self._variable.set_location("memory") + + @property + def underlying_variable(self) -> LocalVariable: + return self._variable + + def analyze(self, contract) -> None: + self._variable.type = parse_type(self._elem_to_parse, contract) diff --git a/slither/vyper_parsing/variables/state_variable.py b/slither/vyper_parsing/variables/state_variable.py new file mode 100644 index 000000000..361bbaba6 --- /dev/null +++ b/slither/vyper_parsing/variables/state_variable.py @@ -0,0 +1,29 @@ +from slither.core.variables.state_variable import StateVariable +from slither.vyper_parsing.ast.types import VariableDecl +from slither.vyper_parsing.type_parsing import parse_type +from slither.vyper_parsing.expressions.expression_parsing import parse_expression + + +class StateVariableVyper: + def __init__(self, variable: StateVariable, variable_data: VariableDecl) -> None: + self._variable: StateVariable = variable + self._variable.name = variable_data.target.id + self._variable.is_constant = variable_data.is_constant + self._variable.is_immutable = variable_data.is_immutable + self._variable.visibility = "public" if variable_data.is_public else "internal" + self._elem_to_parse = variable_data.annotation + + if variable_data.value is not None: + self._variable.initialized = True + self._initializedNotParsed = variable_data.value + + @property + def underlying_variable(self) -> StateVariable: + return self._variable + + def analyze(self, contract) -> None: + self._variable.type = parse_type(self._elem_to_parse, contract) + + if self._variable.initialized: + self._variable.expression = parse_expression(self._initializedNotParsed, contract) + self._initializedNotParsed = None diff --git a/slither/vyper_parsing/variables/structure_variable.py b/slither/vyper_parsing/variables/structure_variable.py new file mode 100644 index 000000000..7bef8712e --- /dev/null +++ b/slither/vyper_parsing/variables/structure_variable.py @@ -0,0 +1,17 @@ +from slither.core.variables.structure_variable import StructureVariable +from slither.vyper_parsing.type_parsing import parse_type +from slither.vyper_parsing.ast.types import AnnAssign + + +class StructureVariableVyper: + def __init__(self, variable: StructureVariable, variable_data: AnnAssign): + self._variable: StructureVariable = variable + self._variable.name = variable_data.target.id + self._elem_to_parse = variable_data.annotation + + @property + def underlying_variable(self) -> StructureVariable: + return self._variable + + def analyze(self, contract) -> None: + self._variable.type = parse_type(self._elem_to_parse, contract) diff --git a/slither/vyper_parsing/vyper_compilation_unit.py b/slither/vyper_parsing/vyper_compilation_unit.py new file mode 100644 index 000000000..2a47d9864 --- /dev/null +++ b/slither/vyper_parsing/vyper_compilation_unit.py @@ -0,0 +1,80 @@ +from typing import Dict +import os +import re +from dataclasses import dataclass, field +from slither.core.declarations import Contract +from slither.core.compilation_unit import SlitherCompilationUnit +from slither.vyper_parsing.declarations.contract import ContractVyper +from slither.analyses.data_dependency.data_dependency import compute_dependency +from slither.vyper_parsing.ast.types import Module +from slither.exceptions import SlitherException + + +@dataclass +class VyperCompilationUnit: + _compilation_unit: SlitherCompilationUnit + _parsed: bool = False + _analyzed: bool = False + _underlying_contract_to_parser: Dict[Contract, ContractVyper] = field(default_factory=dict) + _contracts_by_id: Dict[int, Contract] = field(default_factory=dict) + + def parse_module(self, data: Module, filename: str): + + sourceUnit_candidates = re.findall("[0-9]*:[0-9]*:([0-9]*)", data.src) + assert len(sourceUnit_candidates) == 1, "Source unit not found" + sourceUnit = int(sourceUnit_candidates[0]) + + self._compilation_unit.source_units[sourceUnit] = filename + if os.path.isfile(filename) and filename not in self._compilation_unit.core.source_code: + self._compilation_unit.core.add_source_code(filename) + + scope = self._compilation_unit.get_scope(filename) + contract = Contract(self._compilation_unit, scope) + contract_parser = ContractVyper(self, contract, data) + contract.set_offset(data.src, self._compilation_unit) + + self._underlying_contract_to_parser[contract] = contract_parser + + def parse_contracts(self): + for contract, contract_parser in self._underlying_contract_to_parser.items(): + self._contracts_by_id[contract.id] = contract + self._compilation_unit.contracts.append(contract) + + contract_parser.parse_enums() + contract_parser.parse_structs() + contract_parser.parse_state_variables() + contract_parser.parse_events() + contract_parser.parse_functions() + + self._parsed = True + + def analyze_contracts(self) -> None: + if not self._parsed: + raise SlitherException("Parse the contract before running analyses") + + for contract_parser in self._underlying_contract_to_parser.values(): + # State variables are analyzed for all contracts because interfaces may + # reference them, specifically, constants. + contract_parser.analyze_state_variables() + + for contract_parser in self._underlying_contract_to_parser.values(): + contract_parser.analyze() + + self._convert_to_slithir() + + compute_dependency(self._compilation_unit) + + self._analyzed = True + + def _convert_to_slithir(self) -> None: + for contract in self._compilation_unit.contracts: + contract.add_constructor_variables() + for func in contract.functions: + func.generate_slithir_and_analyze() + + contract.convert_expression_to_slithir_ssa() + + self._compilation_unit.propagate_function_calls() + for contract in self._compilation_unit.contracts: + contract.fix_phi() + contract.update_read_write_using_ssa() diff --git a/tests/conftest.py b/tests/conftest.py index 55a4ef177..779931f58 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,12 +1,12 @@ # pylint: disable=redefined-outer-name import os -from pathlib import Path -import tempfile import shutil +import tempfile +from pathlib import Path from contextlib import contextmanager -import pytest from filelock import FileLock from solc_select import solc_select +import pytest from slither import Slither @@ -59,7 +59,7 @@ def solc_binary_path(shared_directory): @pytest.fixture -def slither_from_source(solc_binary_path): +def slither_from_solidity_source(solc_binary_path): @contextmanager def inner(source_code: str, solc_version: str = "0.8.19", legacy: bool = False): """Yields a Slither instance using source_code string and solc_version. @@ -77,3 +77,23 @@ def slither_from_source(solc_binary_path): Path(fname).unlink() return inner + + +@pytest.fixture +def slither_from_vyper_source(): + @contextmanager + def inner(source_code: str): + """Yields a Slither instance using source_code string. + Creates a temporary file and compiles with vyper. + """ + + fname = "" + try: + with tempfile.NamedTemporaryFile(mode="w", suffix=".vy", delete=False) as f: + fname = f.name + f.write(source_code) + yield Slither(fname) + finally: + Path(fname).unlink() + + return inner diff --git a/tests/e2e/compilation/test_data/test_contract_data/test_contract_data.sol b/tests/e2e/compilation/test_data/test_contract_data/test_contract_data.sol new file mode 100644 index 000000000..a99001da3 --- /dev/null +++ b/tests/e2e/compilation/test_data/test_contract_data/test_contract_data.sol @@ -0,0 +1,5 @@ +contract TestSlither { + function testFunction(uint256 param1, uint256, address param3) public { + + } +} \ No newline at end of file diff --git a/tests/e2e/compilation/test_data/test_node_modules/package-lock.json b/tests/e2e/compilation/test_data/test_node_modules/package-lock.json index a336d8b3b..f8570fa55 100644 --- a/tests/e2e/compilation/test_data/test_node_modules/package-lock.json +++ b/tests/e2e/compilation/test_data/test_node_modules/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@openzeppelin/contracts": "^4.4.0", + "@openzeppelin/contracts": "^4.9.3", "hardhat": "^2.13.0" } }, @@ -961,8 +961,9 @@ } }, "node_modules/@openzeppelin/contracts": { - "version": "4.4.0", - "license": "MIT" + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.3.tgz", + "integrity": "sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg==" }, "node_modules/@scure/base": { "version": "1.1.1", @@ -3154,9 +3155,9 @@ } }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -3247,9 +3248,9 @@ } }, "node_modules/solc/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { "semver": "bin/semver" } @@ -4266,7 +4267,9 @@ "optional": true }, "@openzeppelin/contracts": { - "version": "4.4.0" + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.3.tgz", + "integrity": "sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg==" }, "@scure/base": { "version": "1.1.1", @@ -5864,9 +5867,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" }, "serialize-javascript": { "version": "6.0.0", @@ -5942,9 +5945,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" } } }, diff --git a/tests/e2e/compilation/test_data/test_node_modules/package.json b/tests/e2e/compilation/test_data/test_node_modules/package.json index 124f77665..755f71022 100644 --- a/tests/e2e/compilation/test_data/test_node_modules/package.json +++ b/tests/e2e/compilation/test_data/test_node_modules/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@openzeppelin/contracts": "^4.4.0", + "@openzeppelin/contracts": "^4.9.3", "hardhat": "^2.13.0" } } diff --git a/tests/e2e/compilation/test_resolution.py b/tests/e2e/compilation/test_resolution.py index 71edaa143..c3290624b 100644 --- a/tests/e2e/compilation/test_resolution.py +++ b/tests/e2e/compilation/test_resolution.py @@ -43,3 +43,20 @@ def test_cycle(solc_binary_path) -> None: solc_path = solc_binary_path("0.8.0") slither = Slither(Path(TEST_DATA_DIR, "test_cyclic_import", "a.sol").as_posix(), solc=solc_path) _run_all_detectors(slither) + + +def test_contract_function_parameter(solc_binary_path) -> None: + solc_path = solc_binary_path("0.8.0") + standard_json = SolcStandardJson() + standard_json.add_source_file( + Path(TEST_DATA_DIR, "test_contract_data", "test_contract_data.sol").as_posix() + ) + compilation = CryticCompile(standard_json, solc=solc_path) + slither = Slither(compilation) + contract = slither.contracts[0] + function = contract.functions[0] + parameters = function.parameters + + assert parameters[0].name == "param1" + assert parameters[1].name == "" + assert parameters[2].name == "param3" diff --git a/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_4_25_array_by_reference_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_4_25_array_by_reference_sol__0.txt index f056bea10..5cb8add39 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_4_25_array_by_reference_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_4_25_array_by_reference_sol__0.txt @@ -1,12 +1,14 @@ -D.f() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value +D.f() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#39) by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#21-23) which only takes arrays by value -D.f() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value +C.g() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#11) by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#25-28) which only takes arrays by value -C.f() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value +C.f() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#2) by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#25-28) which only takes arrays by value -C.f() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value +C.f() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#2) by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#21-23) which only takes arrays by value -C.g() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value +D.f() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#39) by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#25-28) which only takes arrays by value -C.g() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value +C.g() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#11) by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#21-23) which only takes arrays by value + +E.f() (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#57-61) passes array E.x (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#54) by reference to E.setByValue(uint256[1],uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol#63-66) which only takes arrays by value diff --git a/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_5_16_array_by_reference_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_5_16_array_by_reference_sol__0.txt index 4264c809a..6e97d8cc2 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_5_16_array_by_reference_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_5_16_array_by_reference_sol__0.txt @@ -1,12 +1,14 @@ -D.f() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value +D.f() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#39) by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#21-23) which only takes arrays by value -D.f() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value +C.g() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#11) by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#25-28) which only takes arrays by value -C.f() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value +C.f() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#2) by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#25-28) which only takes arrays by value -C.f() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value +C.f() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#2) by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#21-23) which only takes arrays by value -C.g() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value +D.f() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#39) by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#25-28) which only takes arrays by value -C.g() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value +C.g() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#11) by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#21-23) which only takes arrays by value + +E.f() (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#57-61) passes array E.x (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#54) by reference to E.setByValue(uint256[1],uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol#63-66) which only takes arrays by value diff --git a/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_6_11_array_by_reference_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_6_11_array_by_reference_sol__0.txt index e71930b51..39574b5f5 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_6_11_array_by_reference_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_6_11_array_by_reference_sol__0.txt @@ -1,12 +1,14 @@ -D.f() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value +D.f() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#39) by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#21-23) which only takes arrays by value -D.f() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value +C.g() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#11) by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#25-28) which only takes arrays by value -C.f() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value +C.f() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#2) by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#25-28) which only takes arrays by value -C.f() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value +C.f() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#2) by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#21-23) which only takes arrays by value -C.g() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value +D.f() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#39) by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#25-28) which only takes arrays by value -C.g() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value +C.g() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#11) by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#21-23) which only takes arrays by value + +E.f() (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#57-61) passes array E.x (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#54) by reference to E.setByValue(uint256[1],uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol#63-66) which only takes arrays by value diff --git a/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_7_6_array_by_reference_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_7_6_array_by_reference_sol__0.txt index 7c0f9ccd9..74ea36a0c 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_7_6_array_by_reference_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_ArrayByReference_0_7_6_array_by_reference_sol__0.txt @@ -1,12 +1,14 @@ -D.f() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value +D.f() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#39) by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#21-23) which only takes arrays by value -D.f() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value +C.g() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#11) by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#25-28) which only takes arrays by value -C.f() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value +C.f() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#2) by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#25-28) which only takes arrays by value -C.f() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value +C.f() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#4-8) passes array C.x (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#2) by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#21-23) which only takes arrays by value -C.g() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value +D.f() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#42-48) passes array D.x (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#39) by reference to C.setByValueAndReturn(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#25-28) which only takes arrays by value -C.g() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value +C.g() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#10-15) passes array C.g().y (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#11) by reference to C.setByValue(uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#21-23) which only takes arrays by value + +E.f() (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#57-61) passes array E.x (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#54) by reference to E.setByValue(uint256[1],uint256[1]) (tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol#63-66) which only takes arrays by value diff --git a/tests/e2e/detectors/snapshots/detectors__detector_BuiltinSymbolShadowing_0_4_25_shadowing_builtin_symbols_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_BuiltinSymbolShadowing_0_4_25_shadowing_builtin_symbols_sol__0.txt index 7c94735da..283b93ee5 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_BuiltinSymbolShadowing_0_4_25_shadowing_builtin_symbols_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_BuiltinSymbolShadowing_0_4_25_shadowing_builtin_symbols_sol__0.txt @@ -12,12 +12,12 @@ FurtherExtendedContract.this (tests/e2e/detectors/test_data/shadowing-builtin/0. BaseContract.now (tests/e2e/detectors/test_data/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#5) (state variable) shadows built-in symbol" -BaseContractrevert(bool) (tests/e2e/detectors/test_data/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#7) (event) shadows built-in symbol" - ExtendedContract.assert(bool).msg (tests/e2e/detectors/test_data/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#14) (local variable) shadows built-in symbol" ExtendedContract.assert(bool) (tests/e2e/detectors/test_data/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#13-15) (function) shadows built-in symbol" +BaseContract.revert(bool) (tests/e2e/detectors/test_data/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#7) (event) shadows built-in symbol" + FurtherExtendedContract.require().sha3 (tests/e2e/detectors/test_data/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#26) (local variable) shadows built-in symbol" FurtherExtendedContract.blockhash (tests/e2e/detectors/test_data/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#19) (state variable) shadows built-in symbol" diff --git a/tests/e2e/detectors/snapshots/detectors__detector_BuiltinSymbolShadowing_0_5_16_shadowing_builtin_symbols_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_BuiltinSymbolShadowing_0_5_16_shadowing_builtin_symbols_sol__0.txt index f576e19e0..2780f9e62 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_BuiltinSymbolShadowing_0_5_16_shadowing_builtin_symbols_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_BuiltinSymbolShadowing_0_5_16_shadowing_builtin_symbols_sol__0.txt @@ -10,12 +10,12 @@ FurtherExtendedContract.this (tests/e2e/detectors/test_data/shadowing-builtin/0. BaseContract.now (tests/e2e/detectors/test_data/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#5) (state variable) shadows built-in symbol" -BaseContractrevert(bool) (tests/e2e/detectors/test_data/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#7) (event) shadows built-in symbol" - ExtendedContract.assert(bool).msg (tests/e2e/detectors/test_data/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#14) (local variable) shadows built-in symbol" ExtendedContract.assert(bool) (tests/e2e/detectors/test_data/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#13-15) (function) shadows built-in symbol" +BaseContract.revert(bool) (tests/e2e/detectors/test_data/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#7) (event) shadows built-in symbol" + FurtherExtendedContract.require().sha3 (tests/e2e/detectors/test_data/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#26) (local variable) shadows built-in symbol" FurtherExtendedContract.blockhash (tests/e2e/detectors/test_data/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#19) (state variable) shadows built-in symbol" diff --git a/tests/e2e/detectors/snapshots/detectors__detector_CacheArrayLength_0_8_17_CacheArrayLength_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_CacheArrayLength_0_8_17_CacheArrayLength_sol__0.txt new file mode 100644 index 000000000..c2a5023a6 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__detector_CacheArrayLength_0_8_17_CacheArrayLength_sol__0.txt @@ -0,0 +1,20 @@ +Loop condition k_scope_17 < array2.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#133) should use cached array length instead of referencing `length` member of the storage array. + +Loop condition i_scope_23 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#172) should use cached array length instead of referencing `length` member of the storage array. + +Loop condition i < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#37) should use cached array length instead of referencing `length` member of the storage array. + +Loop condition j_scope_11 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#109) should use cached array length instead of referencing `length` member of the storage array. + +Loop condition i_scope_4 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#68) should use cached array length instead of referencing `length` member of the storage array. + +Loop condition i_scope_22 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#167) should use cached array length instead of referencing `length` member of the storage array. + +Loop condition k_scope_9 < array2.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#99) should use cached array length instead of referencing `length` member of the storage array. + +Loop condition i_scope_6 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#80) should use cached array length instead of referencing `length` member of the storage array. + +Loop condition j_scope_15 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#126) should use cached array length instead of referencing `length` member of the storage array. + +Loop condition i_scope_21 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#161) should use cached array length instead of referencing `length` member of the storage array. + diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectOperatorExponentiation_0_7_6_incorrect_exp_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectOperatorExponentiation_0_7_6_incorrect_exp_sol__0.txt new file mode 100644 index 000000000..458dd3bdc --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectOperatorExponentiation_0_7_6_incorrect_exp_sol__0.txt @@ -0,0 +1,9 @@ +Test.bad1() (tests/e2e/detectors/test_data/incorrect-exp/0.7.6/incorrect_exp.sol#9-12) has bitwise-xor operator ^ instead of the exponentiation operator **: + - UINT_MAX = 2 ^ 256 - 1 (tests/e2e/detectors/test_data/incorrect-exp/0.7.6/incorrect_exp.sol#10) + +Test.bad0(uint256) (tests/e2e/detectors/test_data/incorrect-exp/0.7.6/incorrect_exp.sol#5-7) has bitwise-xor operator ^ instead of the exponentiation operator **: + - a ^ 2 (tests/e2e/detectors/test_data/incorrect-exp/0.7.6/incorrect_exp.sol#6) + +Derived.slitherConstructorVariables() (tests/e2e/detectors/test_data/incorrect-exp/0.7.6/incorrect_exp.sol#30) has bitwise-xor operator ^ instead of the exponentiation operator **: + - my_var = 2 ^ 256 - 1 (tests/e2e/detectors/test_data/incorrect-exp/0.7.6/incorrect_exp.sol#3) + diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectReturn_0_8_10_incorrect_return_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectReturn_0_8_10_incorrect_return_sol__0.txt new file mode 100644 index 000000000..5d87cd932 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectReturn_0_8_10_incorrect_return_sol__0.txt @@ -0,0 +1,4 @@ +C.bad1() (tests/e2e/detectors/test_data/incorrect-return/0.8.10/incorrect_return.sol#21-24) calls C.indirect() (tests/e2e/detectors/test_data/incorrect-return/0.8.10/incorrect_return.sol#17-19) which halt the execution return(uint256,uint256)(5,6) (tests/e2e/detectors/test_data/incorrect-return/0.8.10/incorrect_return.sol#4) + +C.bad0() (tests/e2e/detectors/test_data/incorrect-return/0.8.10/incorrect_return.sol#8-11) calls C.internal_return() (tests/e2e/detectors/test_data/incorrect-return/0.8.10/incorrect_return.sol#2-6) which halt the execution return(uint256,uint256)(5,6) (tests/e2e/detectors/test_data/incorrect-return/0.8.10/incorrect_return.sol#4) + diff --git a/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_4_25_shadowing_local_variable_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_4_25_shadowing_local_variable_sol__0.txt index 913acf4ea..0f98475aa 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_4_25_shadowing_local_variable_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_4_25_shadowing_local_variable_sol__0.txt @@ -10,7 +10,7 @@ FurtherExtendedContract.shadowingParent(uint256).y (tests/e2e/detectors/test_dat - BaseContract.y (tests/e2e/detectors/test_data/shadowing-local/0.4.25/shadowing_local_variable.sol#5) (state variable) FurtherExtendedContract.shadowingParent(uint256).v (tests/e2e/detectors/test_data/shadowing-local/0.4.25/shadowing_local_variable.sol#25) shadows: - - ExtendedContractv() (tests/e2e/detectors/test_data/shadowing-local/0.4.25/shadowing_local_variable.sol#13) (event) + - ExtendedContract.v() (tests/e2e/detectors/test_data/shadowing-local/0.4.25/shadowing_local_variable.sol#13) (event) FurtherExtendedContract.shadowingParent(uint256).w (tests/e2e/detectors/test_data/shadowing-local/0.4.25/shadowing_local_variable.sol#25) shadows: - FurtherExtendedContract.w() (tests/e2e/detectors/test_data/shadowing-local/0.4.25/shadowing_local_variable.sol#20-23) (modifier) diff --git a/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_5_16_shadowing_local_variable_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_5_16_shadowing_local_variable_sol__0.txt index 7fcbe83d2..56d139bea 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_5_16_shadowing_local_variable_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_5_16_shadowing_local_variable_sol__0.txt @@ -10,7 +10,7 @@ FurtherExtendedContract.shadowingParent(uint256).y (tests/e2e/detectors/test_dat - BaseContract.y (tests/e2e/detectors/test_data/shadowing-local/0.5.16/shadowing_local_variable.sol#5) (state variable) FurtherExtendedContract.shadowingParent(uint256).v (tests/e2e/detectors/test_data/shadowing-local/0.5.16/shadowing_local_variable.sol#25) shadows: - - ExtendedContractv() (tests/e2e/detectors/test_data/shadowing-local/0.5.16/shadowing_local_variable.sol#13) (event) + - ExtendedContract.v() (tests/e2e/detectors/test_data/shadowing-local/0.5.16/shadowing_local_variable.sol#13) (event) FurtherExtendedContract.shadowingParent(uint256).w (tests/e2e/detectors/test_data/shadowing-local/0.5.16/shadowing_local_variable.sol#25) shadows: - FurtherExtendedContract.w() (tests/e2e/detectors/test_data/shadowing-local/0.5.16/shadowing_local_variable.sol#20-23) (modifier) diff --git a/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_6_11_shadowing_local_variable_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_6_11_shadowing_local_variable_sol__0.txt index b4de3265f..a52ac48af 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_6_11_shadowing_local_variable_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_6_11_shadowing_local_variable_sol__0.txt @@ -5,7 +5,7 @@ FurtherExtendedContract.shadowingParent(uint256).y (tests/e2e/detectors/test_dat - BaseContract.y (tests/e2e/detectors/test_data/shadowing-local/0.6.11/shadowing_local_variable.sol#5) (state variable) FurtherExtendedContract.shadowingParent(uint256).v (tests/e2e/detectors/test_data/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows: - - ExtendedContractv() (tests/e2e/detectors/test_data/shadowing-local/0.6.11/shadowing_local_variable.sol#13) (event) + - ExtendedContract.v() (tests/e2e/detectors/test_data/shadowing-local/0.6.11/shadowing_local_variable.sol#13) (event) FurtherExtendedContract.shadowingParent(uint256).w (tests/e2e/detectors/test_data/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows: - FurtherExtendedContract.w() (tests/e2e/detectors/test_data/shadowing-local/0.6.11/shadowing_local_variable.sol#20-23) (modifier) diff --git a/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_7_6_shadowing_local_variable_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_7_6_shadowing_local_variable_sol__0.txt index 43ecfab68..e618b988c 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_7_6_shadowing_local_variable_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_LocalShadowing_0_7_6_shadowing_local_variable_sol__0.txt @@ -5,7 +5,7 @@ FurtherExtendedContract.shadowingParent(uint256).y (tests/e2e/detectors/test_dat - BaseContract.y (tests/e2e/detectors/test_data/shadowing-local/0.7.6/shadowing_local_variable.sol#5) (state variable) FurtherExtendedContract.shadowingParent(uint256).v (tests/e2e/detectors/test_data/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows: - - ExtendedContractv() (tests/e2e/detectors/test_data/shadowing-local/0.7.6/shadowing_local_variable.sol#13) (event) + - ExtendedContract.v() (tests/e2e/detectors/test_data/shadowing-local/0.7.6/shadowing_local_variable.sol#13) (event) FurtherExtendedContract.shadowingParent(uint256).w (tests/e2e/detectors/test_data/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows: - FurtherExtendedContract.w() (tests/e2e/detectors/test_data/shadowing-local/0.7.6/shadowing_local_variable.sol#20-23) (modifier) diff --git a/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_4_25_locked_ether_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_4_25_locked_ether_sol__0.txt index edca6eb2e..680f77d0d 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_4_25_locked_ether_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_4_25_locked_ether_sol__0.txt @@ -1,5 +1,10 @@ Contract locking ether found: - Contract OnlyLocked (tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol#26) has payable functions: + Contract OnlyLocked (tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol#37) has payable functions: + - Locked.receive() (tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol#4-6) + But does not have a function to withdraw the ether + +Contract locking ether found: + Contract UnlockedAssembly (tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol#27-35) has payable functions: - Locked.receive() (tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol#4-6) But does not have a function to withdraw the ether diff --git a/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_5_16_locked_ether_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_5_16_locked_ether_sol__0.txt index d1ff3314b..961ba8c48 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_5_16_locked_ether_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_5_16_locked_ether_sol__0.txt @@ -1,5 +1,10 @@ Contract locking ether found: - Contract OnlyLocked (tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol#26) has payable functions: + Contract OnlyLocked (tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol#37) has payable functions: + - Locked.receive() (tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol#4-6) + But does not have a function to withdraw the ether + +Contract locking ether found: + Contract UnlockedAssembly (tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol#27-35) has payable functions: - Locked.receive() (tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol#4-6) But does not have a function to withdraw the ether diff --git a/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_6_11_locked_ether_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_6_11_locked_ether_sol__0.txt index 212015c29..079104879 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_6_11_locked_ether_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_6_11_locked_ether_sol__0.txt @@ -1,5 +1,5 @@ Contract locking ether found: - Contract OnlyLocked (tests/e2e/detectors/test_data/locked-ether/0.6.11/locked_ether.sol#26) has payable functions: + Contract OnlyLocked (tests/e2e/detectors/test_data/locked-ether/0.6.11/locked_ether.sol#36) has payable functions: - Locked.receive_eth() (tests/e2e/detectors/test_data/locked-ether/0.6.11/locked_ether.sol#4-6) But does not have a function to withdraw the ether diff --git a/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_7_6_locked_ether_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_7_6_locked_ether_sol__0.txt index 8b6ddfa59..14835871f 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_7_6_locked_ether_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_LockedEther_0_7_6_locked_ether_sol__0.txt @@ -1,5 +1,5 @@ Contract locking ether found: - Contract OnlyLocked (tests/e2e/detectors/test_data/locked-ether/0.7.6/locked_ether.sol#26) has payable functions: + Contract OnlyLocked (tests/e2e/detectors/test_data/locked-ether/0.7.6/locked_ether.sol#36) has payable functions: - Locked.receive_eth() (tests/e2e/detectors/test_data/locked-ether/0.7.6/locked_ether.sol#4-6) But does not have a function to withdraw the ether diff --git a/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_4_25_MappingDeletion_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_4_25_MappingDeletion_sol__0.txt index 902f96668..4d47bb570 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_4_25_MappingDeletion_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_4_25_MappingDeletion_sol__0.txt @@ -1,6 +1,9 @@ +Balances.deleteNestedBalance() (tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol#40-42) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol#17-20) which contains a mapping: + -delete nestedStackBalance (tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol#41) + Lib.deleteSt(Lib.MyStruct[1]) (tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol#5-7) which contains a mapping: -delete st[0] (tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol#10) -Balances.deleteBalance(uint256) (tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol#28-31) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol#17-20) which contains a mapping: - -delete stackBalance[idx] (tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol#30) +Balances.deleteBalance(uint256) (tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol#35-38) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol#17-20) which contains a mapping: + -delete stackBalance[idx] (tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol#37) diff --git a/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_5_16_MappingDeletion_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_5_16_MappingDeletion_sol__0.txt index fec236e1c..88e4ac554 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_5_16_MappingDeletion_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_5_16_MappingDeletion_sol__0.txt @@ -1,6 +1,9 @@ Lib.deleteSt(Lib.MyStruct[1]) (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#5-7) which contains a mapping: -delete st[0] (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#10) -Balances.deleteBalance(uint256) (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#29-32) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#17-20) which contains a mapping: - -delete stackBalance[idx] (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#31) +Balances.deleteBalance(uint256) (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#35-38) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#17-20) which contains a mapping: + -delete stackBalance[idx] (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#37) + +Balances.deleteNestedBalance() (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#40-42) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#17-20) which contains a mapping: + -delete nestedStackBalance (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#41) diff --git a/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_6_11_MappingDeletion_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_6_11_MappingDeletion_sol__0.txt index 7f0372c36..4270f0d86 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_6_11_MappingDeletion_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_6_11_MappingDeletion_sol__0.txt @@ -1,6 +1,9 @@ -Balances.deleteBalance(uint256) (tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol#29-32) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol#17-20) which contains a mapping: - -delete stackBalance[idx] (tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol#31) +Balances.deleteNestedBalance() (tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol#40-42) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol#17-20) which contains a mapping: + -delete nestedStackBalance (tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol#41) Lib.deleteSt(Lib.MyStruct[1]) (tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol#5-7) which contains a mapping: -delete st[0] (tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol#10) +Balances.deleteBalance(uint256) (tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol#35-38) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol#17-20) which contains a mapping: + -delete stackBalance[idx] (tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol#37) + diff --git a/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_7_6_MappingDeletion_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_7_6_MappingDeletion_sol__0.txt index f519a046f..ea6ed2dd6 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_7_6_MappingDeletion_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_MappingDeletionDetection_0_7_6_MappingDeletion_sol__0.txt @@ -1,5 +1,8 @@ -Balances.deleteBalance(uint256) (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#29-32) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#17-20) which contains a mapping: - -delete stackBalance[idx] (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#31) +Balances.deleteNestedBalance() (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#40-42) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#17-20) which contains a mapping: + -delete nestedStackBalance (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#41) + +Balances.deleteBalance(uint256) (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#35-38) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#17-20) which contains a mapping: + -delete stackBalance[idx] (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#37) Lib.deleteSt(Lib.MyStruct[1]) (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#5-7) which contains a mapping: -delete st[0] (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#10) diff --git a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_4_25_naming_convention_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_4_25_naming_convention_sol__0.txt index 0419c1b9a..2b64ccac1 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_4_25_naming_convention_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_4_25_naming_convention_sol__0.txt @@ -1,10 +1,12 @@ +Variable T.s_myStateVar (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#60) is not in mixedCase + Struct naming.test (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#14-16) is not in CapWords -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#69) is not in mixedCase +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#73) is not in mixedCase -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#69) is single letter l, O, or I, which should not be used +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#73) is single letter l, O, or I, which should not be used -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#68) is not in mixedCase +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#72) is not in mixedCase Variable naming.Var_One (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#11) is not in mixedCase @@ -14,19 +16,19 @@ Contract naming (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_c Enum naming.numbers (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#6) is not in CapWords -Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#59) is not in mixedCase +Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#63) is not in mixedCase -Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#56) is not in mixedCase +Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#59) is not in mixedCase -Event namingevent_(uint256) (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#23) is not in CapWords +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#72) is single letter l, O, or I, which should not be used -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#68) is single letter l, O, or I, which should not be used +Event naming.event_(uint256) (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#23) is not in CapWords Modifier naming.CantDo() (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#41-43) is not in mixedCase Function naming.GetOne() (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#30-33) is not in mixedCase -Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#67) is single letter l, O, or I, which should not be used +Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#71) is single letter l, O, or I, which should not be used Parameter naming.setInt(uint256,uint256).Number2 (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#35) is not in mixedCase diff --git a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_5_16_naming_convention_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_5_16_naming_convention_sol__0.txt index c5fd1f30f..057be1d0c 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_5_16_naming_convention_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_5_16_naming_convention_sol__0.txt @@ -1,10 +1,12 @@ +Variable T.s_myStateVar (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#60) is not in mixedCase + Struct naming.test (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#14-16) is not in CapWords -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#69) is not in mixedCase +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#73) is not in mixedCase -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#69) is single letter l, O, or I, which should not be used +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#73) is single letter l, O, or I, which should not be used -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#68) is not in mixedCase +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#72) is not in mixedCase Variable naming.Var_One (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#11) is not in mixedCase @@ -14,19 +16,19 @@ Contract naming (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_c Enum naming.numbers (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#6) is not in CapWords -Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#59) is not in mixedCase +Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#63) is not in mixedCase -Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#56) is not in mixedCase +Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#59) is not in mixedCase -Event namingevent_(uint256) (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#23) is not in CapWords +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#72) is single letter l, O, or I, which should not be used -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#68) is single letter l, O, or I, which should not be used +Event naming.event_(uint256) (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#23) is not in CapWords Modifier naming.CantDo() (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#41-43) is not in mixedCase Function naming.GetOne() (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#30-33) is not in mixedCase -Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#67) is single letter l, O, or I, which should not be used +Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#71) is single letter l, O, or I, which should not be used Parameter naming.setInt(uint256,uint256).Number2 (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#35) is not in mixedCase diff --git a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_6_11_naming_convention_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_6_11_naming_convention_sol__0.txt index 1bbe28843..035b01623 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_6_11_naming_convention_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_6_11_naming_convention_sol__0.txt @@ -1,32 +1,36 @@ -Struct naming.test (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#14-16) is not in CapWords +Variable T.s_myStateVar (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#63) is not in mixedCase -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#69) is not in mixedCase +Struct naming.test (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#17-19) is not in CapWords -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#69) is single letter l, O, or I, which should not be used +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#76) is not in mixedCase -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#68) is not in mixedCase +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#76) is single letter l, O, or I, which should not be used -Variable naming.Var_One (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#11) is not in mixedCase +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#75) is not in mixedCase + +Variable naming.Var_One (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#14) is not in mixedCase Constant naming.MY_other_CONSTANT (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES -Contract naming (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#3-48) is not in CapWords +Contract naming (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#3-51) is not in CapWords Enum naming.numbers (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#6) is not in CapWords -Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#59) is not in mixedCase +Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#66) is not in mixedCase + +Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#62) is not in mixedCase -Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#56) is not in mixedCase +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#75) is single letter l, O, or I, which should not be used -Event namingevent_(uint256) (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#23) is not in CapWords +Event naming.event_(uint256) (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#26) is not in CapWords -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#68) is single letter l, O, or I, which should not be used +Modifier naming.CantDo() (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#44-46) is not in mixedCase -Modifier naming.CantDo() (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#41-43) is not in mixedCase +Function naming.GetOne() (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#33-36) is not in mixedCase -Function naming.GetOne() (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#30-33) is not in mixedCase +Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#74) is single letter l, O, or I, which should not be used -Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#67) is single letter l, O, or I, which should not be used +Variable naming.i_myImutableVar (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#11) is not in mixedCase -Parameter naming.setInt(uint256,uint256).Number2 (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#35) is not in mixedCase +Parameter naming.setInt(uint256,uint256).Number2 (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#38) is not in mixedCase diff --git a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_7_6_naming_convention_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_7_6_naming_convention_sol__0.txt index 5f560ba51..5e446f156 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_7_6_naming_convention_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_7_6_naming_convention_sol__0.txt @@ -1,32 +1,36 @@ -Struct naming.test (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#14-16) is not in CapWords +Variable T.s_myStateVar (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#63) is not in mixedCase -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#69) is not in mixedCase +Struct naming.test (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#17-19) is not in CapWords -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#69) is single letter l, O, or I, which should not be used +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#76) is not in mixedCase -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#68) is not in mixedCase +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#76) is single letter l, O, or I, which should not be used -Variable naming.Var_One (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#11) is not in mixedCase +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#75) is not in mixedCase + +Variable naming.Var_One (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#14) is not in mixedCase Constant naming.MY_other_CONSTANT (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES -Contract naming (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#3-48) is not in CapWords +Contract naming (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#3-51) is not in CapWords Enum naming.numbers (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#6) is not in CapWords -Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#59) is not in mixedCase +Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#66) is not in mixedCase + +Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#62) is not in mixedCase -Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#56) is not in mixedCase +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#75) is single letter l, O, or I, which should not be used -Event namingevent_(uint256) (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#23) is not in CapWords +Event naming.event_(uint256) (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#26) is not in CapWords -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#68) is single letter l, O, or I, which should not be used +Modifier naming.CantDo() (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#44-46) is not in mixedCase -Modifier naming.CantDo() (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#41-43) is not in mixedCase +Function naming.GetOne() (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#33-36) is not in mixedCase -Function naming.GetOne() (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#30-33) is not in mixedCase +Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#74) is single letter l, O, or I, which should not be used -Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#67) is single letter l, O, or I, which should not be used +Variable naming.i_myImutableVar (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#11) is not in mixedCase -Parameter naming.setInt(uint256,uint256).Number2 (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#35) is not in mixedCase +Parameter naming.setInt(uint256,uint256).Number2 (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#38) is not in mixedCase diff --git a/tests/e2e/detectors/snapshots/detectors__detector_ReturnBomb_0_8_20_return_bomb_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_ReturnBomb_0_8_20_return_bomb_sol__0.txt new file mode 100644 index 000000000..f53b5233f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__detector_ReturnBomb_0_8_20_return_bomb_sol__0.txt @@ -0,0 +1,5 @@ +Mark.oops(address) (tests/e2e/detectors/test_data/return-bomb/0.8.20/return_bomb.sol#31-55) tries to limit the gas of an external call that controls implicit decoding + ret1 = BadGuy(badGuy).fbad{gas: 2000}() (tests/e2e/detectors/test_data/return-bomb/0.8.20/return_bomb.sol#42) + (x,str) = BadGuy(badGuy).fbad1{gas: 2000}() (tests/e2e/detectors/test_data/return-bomb/0.8.20/return_bomb.sol#44) + (success,ret) = badGuy.call{gas: 10000}(abi.encodeWithSelector(BadGuy.llbad.selector)) (tests/e2e/detectors/test_data/return-bomb/0.8.20/return_bomb.sol#47-51) + diff --git a/tests/e2e/detectors/snapshots/detectors__detector_ReturnInsteadOfLeave_0_8_10_incorrect_return_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_ReturnInsteadOfLeave_0_8_10_incorrect_return_sol__0.txt new file mode 100644 index 000000000..28f579f81 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__detector_ReturnInsteadOfLeave_0_8_10_incorrect_return_sol__0.txt @@ -0,0 +1,2 @@ +C.f() (tests/e2e/detectors/test_data/return-leave/0.8.10/incorrect_return.sol#3-7) contains an incorrect call to return: return(uint256,uint256)(5,6) (tests/e2e/detectors/test_data/return-leave/0.8.10/incorrect_return.sol#5) + diff --git a/tests/e2e/detectors/snapshots/detectors__detector_Suicidal_0_7_6_suicidal_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_Suicidal_0_7_6_suicidal_sol__0.txt index 4a784217d..99a6a0295 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_Suicidal_0_7_6_suicidal_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_Suicidal_0_7_6_suicidal_sol__0.txt @@ -1,2 +1,4 @@ +C.i_am_a_backdoor2(address) (tests/e2e/detectors/test_data/suicidal/0.7.6/suicidal.sol#8-10) allows anyone to destruct the contract + C.i_am_a_backdoor() (tests/e2e/detectors/test_data/suicidal/0.7.6/suicidal.sol#4-6) allows anyone to destruct the contract diff --git a/tests/e2e/detectors/snapshots/detectors__detector_TautologicalCompare_0_8_20_compare_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_TautologicalCompare_0_8_20_compare_sol__0.txt new file mode 100644 index 000000000..76685043c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__detector_TautologicalCompare_0_8_20_compare_sol__0.txt @@ -0,0 +1,3 @@ +A.check(uint256) (tests/e2e/detectors/test_data/tautological-compare/0.8.20/compare.sol#3-5) compares a variable to itself: + (a >= a) (tests/e2e/detectors/test_data/tautological-compare/0.8.20/compare.sol#4) + diff --git a/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_4_25_erc20_indexed_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_4_25_erc20_indexed_sol__0.txt index a571ef77a..b4097bd10 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_4_25_erc20_indexed_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_4_25_erc20_indexed_sol__0.txt @@ -1,8 +1,8 @@ -ERC20 event IERC20BadTransfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.4.25/erc20_indexed.sol#19)does not index parameter to +ERC20 event IERC20Bad.Approval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.4.25/erc20_indexed.sol#20)does not index parameter owner -ERC20 event IERC20BadApproval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.4.25/erc20_indexed.sol#20)does not index parameter owner +ERC20 event IERC20Bad.Transfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.4.25/erc20_indexed.sol#19)does not index parameter from -ERC20 event IERC20BadTransfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.4.25/erc20_indexed.sol#19)does not index parameter from +ERC20 event IERC20Bad.Approval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.4.25/erc20_indexed.sol#20)does not index parameter spender -ERC20 event IERC20BadApproval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.4.25/erc20_indexed.sol#20)does not index parameter spender +ERC20 event IERC20Bad.Transfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.4.25/erc20_indexed.sol#19)does not index parameter to diff --git a/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_5_16_erc20_indexed_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_5_16_erc20_indexed_sol__0.txt index 09171d188..77ab9c2bd 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_5_16_erc20_indexed_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_5_16_erc20_indexed_sol__0.txt @@ -1,8 +1,8 @@ -ERC20 event IERC20BadTransfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.5.16/erc20_indexed.sol#19)does not index parameter to +ERC20 event IERC20Bad.Approval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.5.16/erc20_indexed.sol#20)does not index parameter owner -ERC20 event IERC20BadApproval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.5.16/erc20_indexed.sol#20)does not index parameter owner +ERC20 event IERC20Bad.Transfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.5.16/erc20_indexed.sol#19)does not index parameter from -ERC20 event IERC20BadTransfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.5.16/erc20_indexed.sol#19)does not index parameter from +ERC20 event IERC20Bad.Approval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.5.16/erc20_indexed.sol#20)does not index parameter spender -ERC20 event IERC20BadApproval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.5.16/erc20_indexed.sol#20)does not index parameter spender +ERC20 event IERC20Bad.Transfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.5.16/erc20_indexed.sol#19)does not index parameter to diff --git a/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_6_11_erc20_indexed_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_6_11_erc20_indexed_sol__0.txt index c0cbe9270..9e11f44c8 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_6_11_erc20_indexed_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_6_11_erc20_indexed_sol__0.txt @@ -1,8 +1,8 @@ -ERC20 event IERC20BadTransfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.6.11/erc20_indexed.sol#19)does not index parameter to +ERC20 event IERC20Bad.Approval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.6.11/erc20_indexed.sol#20)does not index parameter owner -ERC20 event IERC20BadApproval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.6.11/erc20_indexed.sol#20)does not index parameter owner +ERC20 event IERC20Bad.Transfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.6.11/erc20_indexed.sol#19)does not index parameter from -ERC20 event IERC20BadTransfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.6.11/erc20_indexed.sol#19)does not index parameter from +ERC20 event IERC20Bad.Approval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.6.11/erc20_indexed.sol#20)does not index parameter spender -ERC20 event IERC20BadApproval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.6.11/erc20_indexed.sol#20)does not index parameter spender +ERC20 event IERC20Bad.Transfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.6.11/erc20_indexed.sol#19)does not index parameter to diff --git a/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_7_6_erc20_indexed_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_7_6_erc20_indexed_sol__0.txt index 532a8b6cd..8083e8f71 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_7_6_erc20_indexed_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_UnindexedERC20EventParameters_0_7_6_erc20_indexed_sol__0.txt @@ -1,8 +1,8 @@ -ERC20 event IERC20BadTransfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.7.6/erc20_indexed.sol#19)does not index parameter to +ERC20 event IERC20Bad.Approval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.7.6/erc20_indexed.sol#20)does not index parameter owner -ERC20 event IERC20BadApproval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.7.6/erc20_indexed.sol#20)does not index parameter owner +ERC20 event IERC20Bad.Transfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.7.6/erc20_indexed.sol#19)does not index parameter from -ERC20 event IERC20BadTransfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.7.6/erc20_indexed.sol#19)does not index parameter from +ERC20 event IERC20Bad.Approval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.7.6/erc20_indexed.sol#20)does not index parameter spender -ERC20 event IERC20BadApproval(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.7.6/erc20_indexed.sol#20)does not index parameter spender +ERC20 event IERC20Bad.Transfer(address,address,uint256) (tests/e2e/detectors/test_data/erc20-indexed/0.7.6/erc20_indexed.sol#19)does not index parameter to diff --git a/tests/e2e/detectors/snapshots/detectors__detector_UninitializedLocalVars_0_6_11_uninitialized_local_variable_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_UninitializedLocalVars_0_6_11_uninitialized_local_variable_sol__0.txt index 8e5dc65e8..7e5fa9559 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_UninitializedLocalVars_0_6_11_uninitialized_local_variable_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_UninitializedLocalVars_0_6_11_uninitialized_local_variable_sol__0.txt @@ -1,2 +1,2 @@ -Uninitialized.func().uint_not_init (tests/e2e/detectors/test_data/uninitialized-local/0.6.11/uninitialized_local_variable.sol#4) is a local variable never initialized +Uninitialized.func().uint_not_init (tests/e2e/detectors/test_data/uninitialized-local/0.6.11/uninitialized_local_variable.sol#8) is a local variable never initialized diff --git a/tests/e2e/detectors/snapshots/detectors__detector_UninitializedLocalVars_0_7_6_uninitialized_local_variable_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_UninitializedLocalVars_0_7_6_uninitialized_local_variable_sol__0.txt index 495859ec1..7bf1564d7 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_UninitializedLocalVars_0_7_6_uninitialized_local_variable_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_UninitializedLocalVars_0_7_6_uninitialized_local_variable_sol__0.txt @@ -1,2 +1,2 @@ -Uninitialized.func().uint_not_init (tests/e2e/detectors/test_data/uninitialized-local/0.7.6/uninitialized_local_variable.sol#4) is a local variable never initialized +Uninitialized.func().uint_not_init (tests/e2e/detectors/test_data/uninitialized-local/0.7.6/uninitialized_local_variable.sol#8) is a local variable never initialized diff --git a/tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol b/tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol index 304af6a48..c2707601a 100644 --- a/tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol +++ b/tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol @@ -48,4 +48,25 @@ contract D { } +} + +contract E { + uint[1] public x; // storage + uint[1] public y; // storage + + function f() public { + uint[1] memory temp; + setByValue(temp, x); // can set temp, but cannot set x + setByRef(temp, y); // can set temp and y + } + + function setByValue(uint[1] memory arr, uint[1] memory arr2) internal { + arr[0] = 1; + arr2[0] = 2; + } + + function setByRef(uint[1] memory arr, uint[1] storage arr2) internal { + arr[0] = 2; + arr2[0] = 3; + } } \ No newline at end of file diff --git a/tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol-0.4.25.zip b/tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol-0.4.25.zip index d9daf8f4d..96bdaa0f8 100644 Binary files a/tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol-0.4.25.zip and b/tests/e2e/detectors/test_data/array-by-reference/0.4.25/array_by_reference.sol-0.4.25.zip differ diff --git a/tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol b/tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol index c477c6b0e..1a4d4cfe3 100644 --- a/tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol +++ b/tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol @@ -48,4 +48,25 @@ contract D { } +} + +contract E { + uint[1] public x; // storage + uint[1] public y; // storage + + function f() public { + uint[1] memory temp; + setByValue(temp, x); // can set temp, but cannot set x + setByRef(temp, y); // can set temp and y + } + + function setByValue(uint[1] memory arr, uint[1] memory arr2) internal { + arr[0] = 1; + arr2[0] = 2; + } + + function setByRef(uint[1] memory arr, uint[1] storage arr2) internal { + arr[0] = 2; + arr2[0] = 3; + } } \ No newline at end of file diff --git a/tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol-0.5.16.zip b/tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol-0.5.16.zip index 73286c85a..406a93f73 100644 Binary files a/tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol-0.5.16.zip and b/tests/e2e/detectors/test_data/array-by-reference/0.5.16/array_by_reference.sol-0.5.16.zip differ diff --git a/tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol b/tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol index c477c6b0e..1a4d4cfe3 100644 --- a/tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol +++ b/tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol @@ -48,4 +48,25 @@ contract D { } +} + +contract E { + uint[1] public x; // storage + uint[1] public y; // storage + + function f() public { + uint[1] memory temp; + setByValue(temp, x); // can set temp, but cannot set x + setByRef(temp, y); // can set temp and y + } + + function setByValue(uint[1] memory arr, uint[1] memory arr2) internal { + arr[0] = 1; + arr2[0] = 2; + } + + function setByRef(uint[1] memory arr, uint[1] storage arr2) internal { + arr[0] = 2; + arr2[0] = 3; + } } \ No newline at end of file diff --git a/tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol-0.6.11.zip b/tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol-0.6.11.zip index 8a48717bc..7d9a573d1 100644 Binary files a/tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol-0.6.11.zip and b/tests/e2e/detectors/test_data/array-by-reference/0.6.11/array_by_reference.sol-0.6.11.zip differ diff --git a/tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol b/tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol index c477c6b0e..1a4d4cfe3 100644 --- a/tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol +++ b/tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol @@ -48,4 +48,25 @@ contract D { } +} + +contract E { + uint[1] public x; // storage + uint[1] public y; // storage + + function f() public { + uint[1] memory temp; + setByValue(temp, x); // can set temp, but cannot set x + setByRef(temp, y); // can set temp and y + } + + function setByValue(uint[1] memory arr, uint[1] memory arr2) internal { + arr[0] = 1; + arr2[0] = 2; + } + + function setByRef(uint[1] memory arr, uint[1] storage arr2) internal { + arr[0] = 2; + arr2[0] = 3; + } } \ No newline at end of file diff --git a/tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol-0.7.6.zip b/tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol-0.7.6.zip index 776064577..a57470fbe 100644 Binary files a/tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol-0.7.6.zip and b/tests/e2e/detectors/test_data/array-by-reference/0.7.6/array_by_reference.sol-0.7.6.zip differ diff --git a/tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol b/tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol new file mode 100644 index 000000000..ea3c4120e --- /dev/null +++ b/tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol @@ -0,0 +1,177 @@ +pragma solidity 0.8.17; + +contract CacheArrayLength +{ + struct S + { + uint s; + } + + S[] array; + S[] array2; + uint public x; + + function h() external + { + + } + + function g() internal + { + this.h(); + } + + function h_view() external view + { + + } + + function g_view() internal view + { + this.h_view(); + } + + function f() public + { + // array accessed but length doesn't change + for (uint i = 0; i < array.length; i++) // warning should appear + { + array[i] = S(0); + } + + // array.length doesn't change, but array.length not used in loop condition + for (uint i = array.length; i >= 0; i--) + { + + } + + // array.length changes in the inner loop + for (uint i = 0; i < array.length; i++) + { + for (uint j = i; j < 2 * i; j++) + array.push(S(j)); + } + + // array.length changes + for (uint i = 0; i < array.length; i++) + { + array.pop(); + } + + // array.length changes + for (uint i = 0; i < array.length; i++) + { + delete array; + } + + // array.length doesn't change despite using delete + for (uint i = 0; i < array.length; i++) // warning should appear + { + delete array[i]; + } + + // array.length changes; push used in more complex expression + for (uint i = 0; i < array.length; i++) + { + array.push() = S(i); + } + + // array.length doesn't change + for (uint i = 0; i < array.length; i++) // warning should appear + { + array2.pop(); + array2.push(); + array2.push(S(i)); + delete array2; + delete array[0]; + } + + // array.length changes; array2.length doesn't change + for (uint i = 0; i < 7; i++) + { + for (uint j = i; j < array.length; j++) + { + for (uint k = 0; k < j; k++) + { + + } + + for (uint k = 0; k < array2.length; k++) // warning should appear + { + array.pop(); + } + } + } + + // array.length doesn't change; array2.length changes + for (uint i = 0; i < 7; i++) + { + for (uint j = i; j < array.length; j++) // warning should appear + { + for (uint k = 0; k < j; k++) + { + + } + + for (uint k = 0; k < array2.length; k++) + { + array2.pop(); + } + } + } + + // none of array.length and array2.length changes + for (uint i = 0; i < 7; i++) + { + for (uint j = i; j < array.length; j++) // warning should appear + { + for (uint k = 0; k < j; k++) + { + + } + + for (uint k = 0; k < array2.length; k++) // warning should appear + { + + } + } + } + + S[] memory array3; + + // array3 not modified, but it's not a storage array + for (uint i = 0; i < array3.length; i++) + { + + } + + // array not modified, but it may potentially change in an internal function call + for (uint i = 0; i < array.length; i++) + { + g(); + } + + // array not modified, but it may potentially change in an external function call + for (uint i = 0; i < array.length; i++) + { + this.h(); + } + + // array not modified and it cannot be changed in a function call since g_view is a view function + for (uint i = 0; i < array.length; i++) // warning should appear + { + g_view(); + } + + // array not modified and it cannot be changed in a function call since h_view is a view function + for (uint i = 0; i < array.length; i++) // warning should appear + { + this.h_view(); + } + // array not modified and it cannot be changed in a function call since x is a public state variable + for (uint i = 0; i < array.length; i++) // warning should appear + { + this.x(); + } + } +} \ No newline at end of file diff --git a/tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol-0.8.17.zip b/tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol-0.8.17.zip new file mode 100644 index 000000000..c5cb9f283 Binary files /dev/null and b/tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol-0.8.17.zip differ diff --git a/tests/e2e/detectors/test_data/incorrect-exp/0.7.6/incorrect_exp.sol b/tests/e2e/detectors/test_data/incorrect-exp/0.7.6/incorrect_exp.sol new file mode 100644 index 000000000..b930ee5c1 --- /dev/null +++ b/tests/e2e/detectors/test_data/incorrect-exp/0.7.6/incorrect_exp.sol @@ -0,0 +1,30 @@ +contract Test { + + uint my_var = 2 ^ 256-1; + + function bad0(uint a) internal returns (uint) { + return a^2; + } + + function bad1() internal returns (uint) { + uint UINT_MAX = 2^256-1; + return UINT_MAX; + } + + /* Correct exponentiation operator */ + function good0(uint a) internal returns (uint) { + return a**2; + } + + /* Neither operand is a constant */ + function good1(uint a) internal returns (uint) { + return a^a; + } + + /* The constant operand 0xff in hex typically means bitwise xor */ + function good2(uint a) internal returns (uint) { + return a^0xff; + } +} + +contract Derived is Test {} diff --git a/tests/e2e/detectors/test_data/incorrect-exp/0.7.6/incorrect_exp.sol-0.7.6.zip b/tests/e2e/detectors/test_data/incorrect-exp/0.7.6/incorrect_exp.sol-0.7.6.zip new file mode 100644 index 000000000..c6fea0151 Binary files /dev/null and b/tests/e2e/detectors/test_data/incorrect-exp/0.7.6/incorrect_exp.sol-0.7.6.zip differ diff --git a/tests/e2e/detectors/test_data/incorrect-return/0.8.10/incorrect_return.sol b/tests/e2e/detectors/test_data/incorrect-return/0.8.10/incorrect_return.sol new file mode 100644 index 000000000..e81a747ba --- /dev/null +++ b/tests/e2e/detectors/test_data/incorrect-return/0.8.10/incorrect_return.sol @@ -0,0 +1,36 @@ +contract C { + function internal_return() internal{ + assembly { + return (5, 6) + } + } + + function bad0() public returns (bool){ + internal_return(); + return true; + } + + function indirect2() internal { + internal_return(); + } + + function indirect() internal { + indirect2(); + } + + function bad1() public returns (bool){ + indirect(); + return true; + } + + function good0() public{ + // Dont report if there is no following operation + internal_return(); + } + + function good1() public returns (uint a, uint b){ + assembly { + return (5, 6) + } + } +} \ No newline at end of file diff --git a/tests/e2e/detectors/test_data/incorrect-return/0.8.10/incorrect_return.sol-0.8.10.zip b/tests/e2e/detectors/test_data/incorrect-return/0.8.10/incorrect_return.sol-0.8.10.zip new file mode 100644 index 000000000..2491a10a6 Binary files /dev/null and b/tests/e2e/detectors/test_data/incorrect-return/0.8.10/incorrect_return.sol-0.8.10.zip differ diff --git a/tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol b/tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol index 65942ed2e..f3be911be 100644 --- a/tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol +++ b/tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol @@ -23,4 +23,15 @@ contract Unlocked is Locked, Send{ } +// Still reported because solidity < 0.6.0 doesn't have assembly in the AST +contract UnlockedAssembly is Locked{ + + function withdraw() public { + assembly { + let success := call(gas(), caller(),100,0,0,0,0) + } + } + +} + contract OnlyLocked is Locked{ } diff --git a/tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol-0.4.25.zip b/tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol-0.4.25.zip index b6092ecdb..e3e6f6c21 100644 Binary files a/tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol-0.4.25.zip and b/tests/e2e/detectors/test_data/locked-ether/0.4.25/locked_ether.sol-0.4.25.zip differ diff --git a/tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol b/tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol index 0269ce855..e5671b7ad 100644 --- a/tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol +++ b/tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol @@ -23,4 +23,15 @@ contract Unlocked is Locked, Send{ } +// Still reported because solidity < 0.6.0 doesn't have assembly in the AST +contract UnlockedAssembly is Locked{ + + function withdraw() public { + assembly { + let success := call(gas(), caller(),100,0,0,0,0) + } + } + +} + contract OnlyLocked is Locked{ } diff --git a/tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol-0.5.16.zip b/tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol-0.5.16.zip index 88255d730..5dfba9e3f 100644 Binary files a/tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol-0.5.16.zip and b/tests/e2e/detectors/test_data/locked-ether/0.5.16/locked_ether.sol-0.5.16.zip differ diff --git a/tests/e2e/detectors/test_data/locked-ether/0.6.11/locked_ether.sol b/tests/e2e/detectors/test_data/locked-ether/0.6.11/locked_ether.sol index 7f02028e7..aef9ca6e7 100644 --- a/tests/e2e/detectors/test_data/locked-ether/0.6.11/locked_ether.sol +++ b/tests/e2e/detectors/test_data/locked-ether/0.6.11/locked_ether.sol @@ -23,4 +23,14 @@ contract Unlocked is Locked, Send{ } +contract UnlockedAssembly is Locked{ + + function withdraw() public { + assembly { + let success := call(gas(), caller(),100,0,0,0,0) + } + } + +} + contract OnlyLocked is Locked{ } diff --git a/tests/e2e/detectors/test_data/locked-ether/0.6.11/locked_ether.sol-0.6.11.zip b/tests/e2e/detectors/test_data/locked-ether/0.6.11/locked_ether.sol-0.6.11.zip index 2408eeb82..48b675d9a 100644 Binary files a/tests/e2e/detectors/test_data/locked-ether/0.6.11/locked_ether.sol-0.6.11.zip and b/tests/e2e/detectors/test_data/locked-ether/0.6.11/locked_ether.sol-0.6.11.zip differ diff --git a/tests/e2e/detectors/test_data/locked-ether/0.7.6/locked_ether.sol b/tests/e2e/detectors/test_data/locked-ether/0.7.6/locked_ether.sol index 7f02028e7..aef9ca6e7 100644 --- a/tests/e2e/detectors/test_data/locked-ether/0.7.6/locked_ether.sol +++ b/tests/e2e/detectors/test_data/locked-ether/0.7.6/locked_ether.sol @@ -23,4 +23,14 @@ contract Unlocked is Locked, Send{ } +contract UnlockedAssembly is Locked{ + + function withdraw() public { + assembly { + let success := call(gas(), caller(),100,0,0,0,0) + } + } + +} + contract OnlyLocked is Locked{ } diff --git a/tests/e2e/detectors/test_data/locked-ether/0.7.6/locked_ether.sol-0.7.6.zip b/tests/e2e/detectors/test_data/locked-ether/0.7.6/locked_ether.sol-0.7.6.zip index ecf7e7944..8d339e3c2 100644 Binary files a/tests/e2e/detectors/test_data/locked-ether/0.7.6/locked_ether.sol-0.7.6.zip and b/tests/e2e/detectors/test_data/locked-ether/0.7.6/locked_ether.sol-0.7.6.zip differ diff --git a/tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol b/tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol index bedbb64a8..bcbc86c9d 100644 --- a/tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol +++ b/tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol @@ -6,7 +6,7 @@ library Lib{ mapping(address => uint) maps; } - function deleteSt(MyStruct[1] storage st){ + function deleteSt(MyStruct[1] storage st) internal { delete st[0]; } @@ -17,18 +17,29 @@ contract Balances { struct BalancesStruct{ address owner; mapping(address => uint) balances; - } + } + + struct NestedBalanceStruct { + BalancesStruct balanceStruct; + } mapping(uint => BalancesStruct) public stackBalance; + NestedBalanceStruct internal nestedStackBalance; + function createBalance(uint idx) public { - require(stackBalance[idx].owner == 0); - stackBalance[idx] = BalancesStruct(msg.sender); + require(stackBalance[idx].owner == address(0)); + BalancesStruct storage str = stackBalance[idx]; + str.owner = msg.sender; } function deleteBalance(uint idx) public { require(stackBalance[idx].owner == msg.sender); delete stackBalance[idx]; } + + function deleteNestedBalance() public { + delete nestedStackBalance; + } function setBalance(uint idx, address addr, uint val) public { require(stackBalance[idx].owner == msg.sender); diff --git a/tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol-0.4.25.zip b/tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol-0.4.25.zip index be3e13807..588593699 100644 Binary files a/tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol-0.4.25.zip and b/tests/e2e/detectors/test_data/mapping-deletion/0.4.25/MappingDeletion.sol-0.4.25.zip differ diff --git a/tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol b/tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol index e1b608a46..bcbc86c9d 100644 --- a/tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol +++ b/tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol @@ -17,9 +17,15 @@ contract Balances { struct BalancesStruct{ address owner; mapping(address => uint) balances; - } + } + + struct NestedBalanceStruct { + BalancesStruct balanceStruct; + } mapping(uint => BalancesStruct) public stackBalance; + NestedBalanceStruct internal nestedStackBalance; + function createBalance(uint idx) public { require(stackBalance[idx].owner == address(0)); BalancesStruct storage str = stackBalance[idx]; @@ -30,6 +36,10 @@ contract Balances { require(stackBalance[idx].owner == msg.sender); delete stackBalance[idx]; } + + function deleteNestedBalance() public { + delete nestedStackBalance; + } function setBalance(uint idx, address addr, uint val) public { require(stackBalance[idx].owner == msg.sender); diff --git a/tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol-0.5.16.zip b/tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol-0.5.16.zip index 0ad84a588..2e5789046 100644 Binary files a/tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol-0.5.16.zip and b/tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol-0.5.16.zip differ diff --git a/tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol b/tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol index e1b608a46..bcbc86c9d 100644 --- a/tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol +++ b/tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol @@ -17,9 +17,15 @@ contract Balances { struct BalancesStruct{ address owner; mapping(address => uint) balances; - } + } + + struct NestedBalanceStruct { + BalancesStruct balanceStruct; + } mapping(uint => BalancesStruct) public stackBalance; + NestedBalanceStruct internal nestedStackBalance; + function createBalance(uint idx) public { require(stackBalance[idx].owner == address(0)); BalancesStruct storage str = stackBalance[idx]; @@ -30,6 +36,10 @@ contract Balances { require(stackBalance[idx].owner == msg.sender); delete stackBalance[idx]; } + + function deleteNestedBalance() public { + delete nestedStackBalance; + } function setBalance(uint idx, address addr, uint val) public { require(stackBalance[idx].owner == msg.sender); diff --git a/tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol-0.6.11.zip b/tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol-0.6.11.zip index 5f66da061..8f532ea66 100644 Binary files a/tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol-0.6.11.zip and b/tests/e2e/detectors/test_data/mapping-deletion/0.6.11/MappingDeletion.sol-0.6.11.zip differ diff --git a/tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol b/tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol index e1b608a46..bcbc86c9d 100644 --- a/tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol +++ b/tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol @@ -17,9 +17,15 @@ contract Balances { struct BalancesStruct{ address owner; mapping(address => uint) balances; - } + } + + struct NestedBalanceStruct { + BalancesStruct balanceStruct; + } mapping(uint => BalancesStruct) public stackBalance; + NestedBalanceStruct internal nestedStackBalance; + function createBalance(uint idx) public { require(stackBalance[idx].owner == address(0)); BalancesStruct storage str = stackBalance[idx]; @@ -30,6 +36,10 @@ contract Balances { require(stackBalance[idx].owner == msg.sender); delete stackBalance[idx]; } + + function deleteNestedBalance() public { + delete nestedStackBalance; + } function setBalance(uint idx, address addr, uint val) public { require(stackBalance[idx].owner == msg.sender); diff --git a/tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol-0.7.6.zip b/tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol-0.7.6.zip index 5888e0e53..c685454ce 100644 Binary files a/tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol-0.7.6.zip and b/tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol-0.7.6.zip differ diff --git a/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol b/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol index 7181ca911..4dcfb1760 100644 --- a/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol +++ b/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol @@ -53,8 +53,12 @@ contract Test { contract T { uint private _myPrivateVar; - uint _myPublicVar; - + uint private s_myPrivateVar; + uint internal _myInternalVar; + uint internal s_myInternalVar; + uint public _myPublicVar; + uint public s_myStateVar; + uint public myPublicVar; function test(uint _unused, uint _used) public returns(uint){ return _used;} diff --git a/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol-0.4.25.zip b/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol-0.4.25.zip index c7aaae071..be41a7227 100644 Binary files a/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol-0.4.25.zip and b/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol-0.4.25.zip differ diff --git a/tests/e2e/detectors/test_data/naming-convention/0.4.25/no_warning_for_public_constants.sol-0.4.25.zip b/tests/e2e/detectors/test_data/naming-convention/0.4.25/no_warning_for_public_constants.sol-0.4.25.zip index 2726a771d..75ba539c3 100644 Binary files a/tests/e2e/detectors/test_data/naming-convention/0.4.25/no_warning_for_public_constants.sol-0.4.25.zip and b/tests/e2e/detectors/test_data/naming-convention/0.4.25/no_warning_for_public_constants.sol-0.4.25.zip differ diff --git a/tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol b/tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol index 7181ca911..4dcfb1760 100644 --- a/tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol +++ b/tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol @@ -53,8 +53,12 @@ contract Test { contract T { uint private _myPrivateVar; - uint _myPublicVar; - + uint private s_myPrivateVar; + uint internal _myInternalVar; + uint internal s_myInternalVar; + uint public _myPublicVar; + uint public s_myStateVar; + uint public myPublicVar; function test(uint _unused, uint _used) public returns(uint){ return _used;} diff --git a/tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol-0.5.16.zip b/tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol-0.5.16.zip index da900f1f6..52071feef 100644 Binary files a/tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol-0.5.16.zip and b/tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol-0.5.16.zip differ diff --git a/tests/e2e/detectors/test_data/naming-convention/0.5.16/no_warning_for_public_constants.sol-0.5.16.zip b/tests/e2e/detectors/test_data/naming-convention/0.5.16/no_warning_for_public_constants.sol-0.5.16.zip index 160fee3a2..adf409d40 100644 Binary files a/tests/e2e/detectors/test_data/naming-convention/0.5.16/no_warning_for_public_constants.sol-0.5.16.zip and b/tests/e2e/detectors/test_data/naming-convention/0.5.16/no_warning_for_public_constants.sol-0.5.16.zip differ diff --git a/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol b/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol index 7181ca911..7d81c3954 100644 --- a/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol +++ b/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol @@ -8,6 +8,9 @@ contract naming { uint constant MY_CONSTANT = 1; uint constant MY_other_CONSTANT = 2; + uint public immutable i_myImutableVar = 1; + uint private immutable i_myPrivateImutableVar = 1; + uint Var_One = 1; uint varTwo = 2; @@ -53,8 +56,12 @@ contract Test { contract T { uint private _myPrivateVar; - uint _myPublicVar; - + uint private s_myPrivateVar; + uint internal _myInternalVar; + uint internal s_myInternalVar; + uint public _myPublicVar; + uint public s_myStateVar; + uint public myPublicVar; function test(uint _unused, uint _used) public returns(uint){ return _used;} diff --git a/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol-0.6.11.zip b/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol-0.6.11.zip index 3e6277ac1..d46a8569c 100644 Binary files a/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol-0.6.11.zip and b/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol-0.6.11.zip differ diff --git a/tests/e2e/detectors/test_data/naming-convention/0.6.11/no_warning_for_public_constants.sol-0.6.11.zip b/tests/e2e/detectors/test_data/naming-convention/0.6.11/no_warning_for_public_constants.sol-0.6.11.zip index 67f8eff7e..bed78289e 100644 Binary files a/tests/e2e/detectors/test_data/naming-convention/0.6.11/no_warning_for_public_constants.sol-0.6.11.zip and b/tests/e2e/detectors/test_data/naming-convention/0.6.11/no_warning_for_public_constants.sol-0.6.11.zip differ diff --git a/tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol b/tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol index 7181ca911..7d81c3954 100644 --- a/tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol +++ b/tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol @@ -8,6 +8,9 @@ contract naming { uint constant MY_CONSTANT = 1; uint constant MY_other_CONSTANT = 2; + uint public immutable i_myImutableVar = 1; + uint private immutable i_myPrivateImutableVar = 1; + uint Var_One = 1; uint varTwo = 2; @@ -53,8 +56,12 @@ contract Test { contract T { uint private _myPrivateVar; - uint _myPublicVar; - + uint private s_myPrivateVar; + uint internal _myInternalVar; + uint internal s_myInternalVar; + uint public _myPublicVar; + uint public s_myStateVar; + uint public myPublicVar; function test(uint _unused, uint _used) public returns(uint){ return _used;} diff --git a/tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol-0.7.6.zip b/tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol-0.7.6.zip index cc9d43c58..a2e518704 100644 Binary files a/tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol-0.7.6.zip and b/tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol-0.7.6.zip differ diff --git a/tests/e2e/detectors/test_data/naming-convention/0.7.6/no_warning_for_public_constants.sol-0.7.6.zip b/tests/e2e/detectors/test_data/naming-convention/0.7.6/no_warning_for_public_constants.sol-0.7.6.zip index 7b304b5c0..e2697df89 100644 Binary files a/tests/e2e/detectors/test_data/naming-convention/0.7.6/no_warning_for_public_constants.sol-0.7.6.zip and b/tests/e2e/detectors/test_data/naming-convention/0.7.6/no_warning_for_public_constants.sol-0.7.6.zip differ diff --git a/tests/e2e/detectors/test_data/return-bomb/0.8.20/return_bomb.sol b/tests/e2e/detectors/test_data/return-bomb/0.8.20/return_bomb.sol new file mode 100644 index 000000000..76413fdca --- /dev/null +++ b/tests/e2e/detectors/test_data/return-bomb/0.8.20/return_bomb.sol @@ -0,0 +1,57 @@ +contract BadGuy { + function llbad() external pure returns (bytes memory) { + assembly{ + revert(0, 1000000) + } + } + + function fgood() external payable returns (uint){ + assembly{ + return(0, 1000000) + } + } + + function fbad() external payable returns (uint[] memory){ + assembly{ + return(0, 1000000) + } + } + + function fbad1() external payable returns (uint, string memory){ + assembly{ + return(0, 1000000) + } + } + + +} + +contract Mark { + + function oops(address badGuy) public{ + bool success; + string memory str; + bytes memory ret; + uint x; + uint[] memory ret1; + + x = BadGuy(badGuy).fgood{gas:2000}(); + + ret1 = BadGuy(badGuy).fbad(); //good (no gas specified) + + ret1 = BadGuy(badGuy).fbad{gas:2000}(); + + (x, str) = BadGuy(badGuy).fbad1{gas:2000}(); + + // Mark pays a lot of gas for this copy 😬😬😬 + (success, ret) = badGuy.call{gas:10000}( + abi.encodeWithSelector( + BadGuy.llbad.selector + ) + ); + + // Mark may OOG here, preventing local state changes + //importantCleanup(); + } +} + diff --git a/tests/e2e/detectors/test_data/return-bomb/0.8.20/return_bomb.sol-0.8.20.zip b/tests/e2e/detectors/test_data/return-bomb/0.8.20/return_bomb.sol-0.8.20.zip new file mode 100644 index 000000000..4c10ea6fe Binary files /dev/null and b/tests/e2e/detectors/test_data/return-bomb/0.8.20/return_bomb.sol-0.8.20.zip differ diff --git a/tests/e2e/detectors/test_data/return-leave/0.8.10/incorrect_return.sol b/tests/e2e/detectors/test_data/return-leave/0.8.10/incorrect_return.sol new file mode 100644 index 000000000..f02d7f379 --- /dev/null +++ b/tests/e2e/detectors/test_data/return-leave/0.8.10/incorrect_return.sol @@ -0,0 +1,8 @@ +contract C { + + function f() internal returns (uint a, uint b){ + assembly { + return (5, 6) + } + } +} \ No newline at end of file diff --git a/tests/e2e/detectors/test_data/return-leave/0.8.10/incorrect_return.sol-0.8.10.zip b/tests/e2e/detectors/test_data/return-leave/0.8.10/incorrect_return.sol-0.8.10.zip new file mode 100644 index 000000000..f4c389fcf Binary files /dev/null and b/tests/e2e/detectors/test_data/return-leave/0.8.10/incorrect_return.sol-0.8.10.zip differ diff --git a/tests/e2e/detectors/test_data/suicidal/0.7.6/suicidal.sol b/tests/e2e/detectors/test_data/suicidal/0.7.6/suicidal.sol index 428c794d4..31b22d767 100644 --- a/tests/e2e/detectors/test_data/suicidal/0.7.6/suicidal.sol +++ b/tests/e2e/detectors/test_data/suicidal/0.7.6/suicidal.sol @@ -5,4 +5,12 @@ contract C{ selfdestruct(msg.sender); } + function i_am_a_backdoor2(address payable to) public{ + internal_selfdestruct(to); + } + + function internal_selfdestruct(address payable to) internal { + selfdestruct(to); + } + } diff --git a/tests/e2e/detectors/test_data/suicidal/0.7.6/suicidal.sol-0.7.6.zip b/tests/e2e/detectors/test_data/suicidal/0.7.6/suicidal.sol-0.7.6.zip index 635092d49..ecd80364b 100644 Binary files a/tests/e2e/detectors/test_data/suicidal/0.7.6/suicidal.sol-0.7.6.zip and b/tests/e2e/detectors/test_data/suicidal/0.7.6/suicidal.sol-0.7.6.zip differ diff --git a/tests/e2e/detectors/test_data/tautological-compare/0.8.20/compare.sol b/tests/e2e/detectors/test_data/tautological-compare/0.8.20/compare.sol new file mode 100644 index 000000000..ede2f0fc1 --- /dev/null +++ b/tests/e2e/detectors/test_data/tautological-compare/0.8.20/compare.sol @@ -0,0 +1,6 @@ + +contract A{ + function check(uint a) external returns(bool){ + return (a >= a); + } +} \ No newline at end of file diff --git a/tests/e2e/detectors/test_data/tautological-compare/0.8.20/compare.sol-0.8.20.zip b/tests/e2e/detectors/test_data/tautological-compare/0.8.20/compare.sol-0.8.20.zip new file mode 100644 index 000000000..05b78fad0 Binary files /dev/null and b/tests/e2e/detectors/test_data/tautological-compare/0.8.20/compare.sol-0.8.20.zip differ diff --git a/tests/e2e/detectors/test_data/unchecked-lowlevel/0.7.6/unchecked_lowlevel.sol b/tests/e2e/detectors/test_data/unchecked-lowlevel/0.7.6/unchecked_lowlevel.sol index 96712b077..cd6f78e98 100644 --- a/tests/e2e/detectors/test_data/unchecked-lowlevel/0.7.6/unchecked_lowlevel.sol +++ b/tests/e2e/detectors/test_data/unchecked-lowlevel/0.7.6/unchecked_lowlevel.sol @@ -4,8 +4,14 @@ contract MyConc{ } function good(address payable dst) external payable{ - (bool ret, bytes memory _) = dst.call{value:msg.value}(""); + (bool ret, ) = dst.call{value:msg.value}(""); require(ret); } + function good2(address payable dst) external payable{ + (bool ret, ) = dst.call{value:msg.value}(""); + if (!ret) { + revert(); + } + } } diff --git a/tests/e2e/detectors/test_data/unchecked-lowlevel/0.7.6/unchecked_lowlevel.sol-0.7.6.zip b/tests/e2e/detectors/test_data/unchecked-lowlevel/0.7.6/unchecked_lowlevel.sol-0.7.6.zip index 530d247c4..bccb47182 100644 Binary files a/tests/e2e/detectors/test_data/unchecked-lowlevel/0.7.6/unchecked_lowlevel.sol-0.7.6.zip and b/tests/e2e/detectors/test_data/unchecked-lowlevel/0.7.6/unchecked_lowlevel.sol-0.7.6.zip differ diff --git a/tests/e2e/detectors/test_data/uninitialized-local/0.6.11/uninitialized_local_variable.sol b/tests/e2e/detectors/test_data/uninitialized-local/0.6.11/uninitialized_local_variable.sol index 37d4650e2..22e583ec2 100644 --- a/tests/e2e/detectors/test_data/uninitialized-local/0.6.11/uninitialized_local_variable.sol +++ b/tests/e2e/detectors/test_data/uninitialized-local/0.6.11/uninitialized_local_variable.sol @@ -1,10 +1,22 @@ +interface I { + function a() external; +} + contract Uninitialized{ function func() external returns(uint){ uint uint_not_init; uint uint_init = 1; return uint_not_init + uint_init; - } + } + + function func_try_catch(I i) external returns(uint) { + try i.a() { + return 1; + } catch (bytes memory data) { + data; + } + } function noreportfor() public { for(uint i; i < 6; i++) { diff --git a/tests/e2e/detectors/test_data/uninitialized-local/0.6.11/uninitialized_local_variable.sol-0.6.11.zip b/tests/e2e/detectors/test_data/uninitialized-local/0.6.11/uninitialized_local_variable.sol-0.6.11.zip index d1ac3a5ab..d5b120306 100644 Binary files a/tests/e2e/detectors/test_data/uninitialized-local/0.6.11/uninitialized_local_variable.sol-0.6.11.zip and b/tests/e2e/detectors/test_data/uninitialized-local/0.6.11/uninitialized_local_variable.sol-0.6.11.zip differ diff --git a/tests/e2e/detectors/test_data/uninitialized-local/0.7.6/uninitialized_local_variable.sol b/tests/e2e/detectors/test_data/uninitialized-local/0.7.6/uninitialized_local_variable.sol index 37d4650e2..22e583ec2 100644 --- a/tests/e2e/detectors/test_data/uninitialized-local/0.7.6/uninitialized_local_variable.sol +++ b/tests/e2e/detectors/test_data/uninitialized-local/0.7.6/uninitialized_local_variable.sol @@ -1,10 +1,22 @@ +interface I { + function a() external; +} + contract Uninitialized{ function func() external returns(uint){ uint uint_not_init; uint uint_init = 1; return uint_not_init + uint_init; - } + } + + function func_try_catch(I i) external returns(uint) { + try i.a() { + return 1; + } catch (bytes memory data) { + data; + } + } function noreportfor() public { for(uint i; i < 6; i++) { diff --git a/tests/e2e/detectors/test_data/uninitialized-local/0.7.6/uninitialized_local_variable.sol-0.7.6.zip b/tests/e2e/detectors/test_data/uninitialized-local/0.7.6/uninitialized_local_variable.sol-0.7.6.zip index eaef1050d..30b474ac2 100644 Binary files a/tests/e2e/detectors/test_data/uninitialized-local/0.7.6/uninitialized_local_variable.sol-0.7.6.zip and b/tests/e2e/detectors/test_data/uninitialized-local/0.7.6/uninitialized_local_variable.sol-0.7.6.zip differ diff --git a/tests/e2e/detectors/test_detectors.py b/tests/e2e/detectors/test_detectors.py index d003e7ce0..28dcc5e75 100644 --- a/tests/e2e/detectors/test_detectors.py +++ b/tests/e2e/detectors/test_detectors.py @@ -56,7 +56,7 @@ def id_test(test_item: Test): return f"{test_item.detector.__name__}-{test_item.solc_ver}-{test_item.test_file}" -ALL_TEST_OBJECTS = [ +ALL_TESTS = [ Test( all_detectors.UninitializedFunctionPtrsConstructor, "uninitialized_function_ptr_constructor.sol", @@ -1639,6 +1639,11 @@ ALL_TEST_OBJECTS = [ "LowCyclomaticComplexity.sol", "0.8.16", ), + Test( + all_detectors.CacheArrayLength, + "CacheArrayLength.sol", + "0.8.17", + ), Test( all_detectors.IncorrectUsingFor, "IncorrectUsingForTopLevel.sol", @@ -1649,6 +1654,31 @@ ALL_TEST_OBJECTS = [ "encode_packed_collision.sol", "0.7.6", ), + Test( + all_detectors.IncorrectReturn, + "incorrect_return.sol", + "0.8.10", + ), + Test( + all_detectors.ReturnInsteadOfLeave, + "incorrect_return.sol", + "0.8.10", + ), + Test( + all_detectors.IncorrectOperatorExponentiation, + "incorrect_exp.sol", + "0.7.6", + ), + Test( + all_detectors.TautologicalCompare, + "compare.sol", + "0.8.20", + ), + Test( + all_detectors.ReturnBomb, + "return_bomb.sol", + "0.8.20", + ), ] GENERIC_PATH = "/GENERIC_PATH" @@ -1656,7 +1686,7 @@ GENERIC_PATH = "/GENERIC_PATH" TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" # pylint: disable=too-many-locals -@pytest.mark.parametrize("test_item", ALL_TEST_OBJECTS, ids=id_test) +@pytest.mark.parametrize("test_item", ALL_TESTS, ids=id_test) def test_detector(test_item: Test, snapshot): test_dir_path = Path( TEST_DATA_DIR, @@ -1704,5 +1734,5 @@ if __name__ == "__main__": "To generate the zip artifacts run\n\tpython tests/e2e/tests/test_detectors.py --compile" ) elif sys.argv[1] == "--compile": - for next_test in ALL_TEST_OBJECTS: + for next_test in ALL_TESTS: _generate_compile(next_test, skip_existing=True) diff --git a/tests/e2e/solc_parsing/test_ast_parsing.py b/tests/e2e/solc_parsing/test_ast_parsing.py index 9a0bd4d90..a514d1f63 100644 --- a/tests/e2e/solc_parsing/test_ast_parsing.py +++ b/tests/e2e/solc_parsing/test_ast_parsing.py @@ -4,13 +4,13 @@ import re import sys from pathlib import Path from typing import List, Dict, Tuple -from packaging.version import parse as parse_version -import pytest + +from crytic_compile import CryticCompile, save_to_zip +from crytic_compile.utils.zip import load_from_zip from deepdiff import DeepDiff +from packaging.version import parse as parse_version from solc_select.solc_select import install_artifacts as install_solc_versions from solc_select.solc_select import installed_versions as get_installed_solc_versions -from crytic_compile import CryticCompile, save_to_zip -from crytic_compile.utils.zip import load_from_zip from slither import Slither from slither.printers.guidance.echidna import Echidna @@ -308,6 +308,7 @@ ALL_TESTS = [ Test("units_and_global_variables-0.8.0.sol", VERSIONS_08), Test("units_and_global_variables-0.8.4.sol", make_version(8, 4, 6)), Test("units_and_global_variables-0.8.7.sol", make_version(8, 7, 9)), + Test("global_variables-0.8.18.sol", make_version(8, 18, 18)), Test( "push-all.sol", ALL_VERSIONS, @@ -447,12 +448,22 @@ ALL_TESTS = [ Test("using-for-functions-list-3-0.8.0.sol", ["0.8.15"]), Test("using-for-functions-list-4-0.8.0.sol", ["0.8.15"]), Test("using-for-global-0.8.0.sol", ["0.8.15"]), + Test("using-for-this-contract.sol", ["0.8.15"]), Test("library_event-0.8.16.sol", ["0.8.16"]), Test("top-level-struct-0.8.0.sol", ["0.8.0"]), Test("yul-top-level-0.8.0.sol", ["0.8.0"]), Test("complex_imports/import_aliases_issue_1319/test.sol", ["0.5.12"]), Test("yul-state-constant-access.sol", ["0.8.16"]), Test("negate-unary-element.sol", ["0.8.16"]), + Test( + "assembly-functions.sol", + ["0.6.9", "0.7.6", "0.8.16"], + ), + Test("user_defined_operators-0.8.19.sol", ["0.8.19"]), + Test("aliasing/main.sol", ["0.8.19"]), + Test("type-aliases.sol", ["0.8.19"]), + Test("enum-max-min.sol", ["0.8.19"]), + Test("event-top-level.sol", ["0.8.22"]), ] # create the output folder if needed try: @@ -495,12 +506,9 @@ class TestASTParsing: actual = generate_output(sl) - try: - with open(expected, "r", encoding="utf8") as f: - expected = json.load(f) - except OSError: - pytest.xfail("the file for this test was not generated") - raise + assert os.path.isfile(expected), f"Expected file {expected} does not exist" + with open(expected, "r", encoding="utf8") as f: + expected = json.load(f) diff = DeepDiff(expected, actual, ignore_order=True, verbose_level=2, view="tree") if diff: diff --git a/tests/e2e/solc_parsing/test_data/aliasing/l1.sol b/tests/e2e/solc_parsing/test_data/aliasing/l1.sol new file mode 100644 index 000000000..86cb0bd5f --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/aliasing/l1.sol @@ -0,0 +1,24 @@ +import "./l2.sol" as L2; +import {MyErr as MyImportError} from "./l3.sol"; + +type fd is uint; +error MyError(); +uint constant qwe = 34; + +struct SS { + uint g; +} + +enum MyEnum { + A, + B +} + +function tpf(MyEnum p) returns(uint) {return 4;} +function tpf(fd p) pure returns(uint) {return 4;} +function tpf(uint e, SS memory g) view returns(uint) {return 4;} + +library MyC { + function callme() public {} + +} diff --git a/tests/e2e/solc_parsing/test_data/aliasing/l2.sol b/tests/e2e/solc_parsing/test_data/aliasing/l2.sol new file mode 100644 index 000000000..14d3b5fba --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/aliasing/l2.sol @@ -0,0 +1 @@ +function l() {} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/aliasing/l3.sol b/tests/e2e/solc_parsing/test_data/aliasing/l3.sol new file mode 100644 index 000000000..1c92842a9 --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/aliasing/l3.sol @@ -0,0 +1 @@ +error MyErr(); \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/aliasing/main.sol b/tests/e2e/solc_parsing/test_data/aliasing/main.sol new file mode 100644 index 000000000..c725b96c5 --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/aliasing/main.sol @@ -0,0 +1,20 @@ +import "./l1.sol" as R; + +contract Tp { + + function re(R.SS calldata param1, R.MyEnum param2) public { + R.MyEnum a = R.MyEnum.A; + R.SS memory b = R.SS(R.qwe); + R.MyC.callme(); + R.tpf(2, param1); + R.tpf(param2); + R.tpf(R.fd.wrap(4)); + R.L2.l(); + revert R.MyImportError(); + } + + function re2() public { + revert R.MyError(); + } + +} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/assembly-functions.sol b/tests/e2e/solc_parsing/test_data/assembly-functions.sol new file mode 100644 index 000000000..224e16bab --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/assembly-functions.sol @@ -0,0 +1,12 @@ +contract A { + function foo() public { + assembly { + function f() { function z() { function x() { g() } x() } z() } + function w() { function a() {} function b() { a() } b() } + function g() { + f() + } + g() + } + } +} diff --git a/tests/e2e/solc_parsing/test_data/compile/aliasing/main.sol-0.8.19-compact.zip b/tests/e2e/solc_parsing/test_data/compile/aliasing/main.sol-0.8.19-compact.zip new file mode 100644 index 000000000..cbfa8d909 Binary files /dev/null and b/tests/e2e/solc_parsing/test_data/compile/aliasing/main.sol-0.8.19-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.6.9-compact.zip b/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.6.9-compact.zip new file mode 100644 index 000000000..8389eb6f5 Binary files /dev/null and b/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.6.9-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.6.9-legacy.zip b/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.6.9-legacy.zip new file mode 100644 index 000000000..a05a1cd47 Binary files /dev/null and b/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.6.9-legacy.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.7.6-compact.zip b/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.7.6-compact.zip new file mode 100644 index 000000000..b21bdae6f Binary files /dev/null and b/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.7.6-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.7.6-legacy.zip b/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.7.6-legacy.zip new file mode 100644 index 000000000..c1285733d Binary files /dev/null and b/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.7.6-legacy.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.8.16-compact.zip b/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.8.16-compact.zip new file mode 100644 index 000000000..a2b78d7b0 Binary files /dev/null and b/tests/e2e/solc_parsing/test_data/compile/assembly-functions.sol-0.8.16-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.10-compact.zip b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.10-compact.zip index fc45cb40e..c88ab3209 100644 Binary files a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.10-compact.zip and b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.10-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.11-compact.zip b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.11-compact.zip index 853879cf5..f49cefb4f 100644 Binary files a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.11-compact.zip and b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.11-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.12-compact.zip b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.12-compact.zip index c72629231..11e9f5c76 100644 Binary files a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.12-compact.zip and b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.12-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.13-compact.zip b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.13-compact.zip index 9ada2c335..bfe3abf69 100644 Binary files a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.13-compact.zip and b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.13-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.14-compact.zip b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.14-compact.zip index e36f5b94e..fcb0fd1f4 100644 Binary files a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.14-compact.zip and b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.14-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.15-compact.zip b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.15-compact.zip index 1023ab1d4..2050e256a 100644 Binary files a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.15-compact.zip and b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.15-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.4-compact.zip b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.4-compact.zip index 5ecf2b037..d31650594 100644 Binary files a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.4-compact.zip and b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.4-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.5-compact.zip b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.5-compact.zip index 357554c09..a5551ea09 100644 Binary files a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.5-compact.zip and b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.5-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.6-compact.zip b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.6-compact.zip index c5f05ef20..006cd1570 100644 Binary files a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.6-compact.zip and b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.6-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.7-compact.zip b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.7-compact.zip index 51828bce7..95f411a30 100644 Binary files a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.7-compact.zip and b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.7-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.8-compact.zip b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.8-compact.zip index eb6ba091b..f0da5dfc4 100644 Binary files a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.8-compact.zip and b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.8-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.9-compact.zip b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.9-compact.zip index 17e752018..f40795618 100644 Binary files a/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.9-compact.zip and b/tests/e2e/solc_parsing/test_data/compile/custom_error-0.8.4.sol-0.8.9-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/enum-max-min.sol-0.8.19-compact.zip b/tests/e2e/solc_parsing/test_data/compile/enum-max-min.sol-0.8.19-compact.zip new file mode 100644 index 000000000..f29ad0bdb Binary files /dev/null and b/tests/e2e/solc_parsing/test_data/compile/enum-max-min.sol-0.8.19-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/event-top-level.sol-0.8.22-compact.zip b/tests/e2e/solc_parsing/test_data/compile/event-top-level.sol-0.8.22-compact.zip new file mode 100644 index 000000000..ed82f32b1 Binary files /dev/null and b/tests/e2e/solc_parsing/test_data/compile/event-top-level.sol-0.8.22-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/global_variables-0.8.18.sol-0.8.18-compact.zip b/tests/e2e/solc_parsing/test_data/compile/global_variables-0.8.18.sol-0.8.18-compact.zip new file mode 100644 index 000000000..04dde0da9 Binary files /dev/null and b/tests/e2e/solc_parsing/test_data/compile/global_variables-0.8.18.sol-0.8.18-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/type-aliases.sol-0.8.19-compact.zip b/tests/e2e/solc_parsing/test_data/compile/type-aliases.sol-0.8.19-compact.zip new file mode 100644 index 000000000..0c4d2b1c5 Binary files /dev/null and b/tests/e2e/solc_parsing/test_data/compile/type-aliases.sol-0.8.19-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/user_defined_operators-0.8.19.sol-0.8.19-compact.zip b/tests/e2e/solc_parsing/test_data/compile/user_defined_operators-0.8.19.sol-0.8.19-compact.zip new file mode 100644 index 000000000..7159a1486 Binary files /dev/null and b/tests/e2e/solc_parsing/test_data/compile/user_defined_operators-0.8.19.sol-0.8.19-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/compile/using-for-this-contract.sol-0.8.15-compact.zip b/tests/e2e/solc_parsing/test_data/compile/using-for-this-contract.sol-0.8.15-compact.zip new file mode 100644 index 000000000..6950666a4 Binary files /dev/null and b/tests/e2e/solc_parsing/test_data/compile/using-for-this-contract.sol-0.8.15-compact.zip differ diff --git a/tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol b/tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol index 4e1e388fb..e638b8d41 100644 --- a/tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol +++ b/tests/e2e/solc_parsing/test_data/custom_error-0.8.4.sol @@ -8,13 +8,19 @@ struct St{ uint v; } +uint256 constant MAX = 5; + error ErrorSimple(); error ErrorWithArgs(uint, uint); error ErrorWithStruct(St s); +error ErrorWithConst(uint256[MAX]); contract VendingMachine is I { + uint256 constant CMAX = 10; + error CErrorWithConst(uint256[CMAX]); + function err0() public { revert ErrorSimple(); } @@ -32,6 +38,14 @@ contract VendingMachine is I { function err4() public { revert ErrorWithEnum(SomeEnum.ONE); } + function err5(uint256[MAX] calldata a) public { + revert ErrorWithConst(a); + } + function err6(uint256[CMAX] calldata a) public { + revert CErrorWithConst(a); + } + + } contract A{ diff --git a/tests/e2e/solc_parsing/test_data/enum-max-min.sol b/tests/e2e/solc_parsing/test_data/enum-max-min.sol new file mode 100644 index 000000000..5f5ecc342 --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/enum-max-min.sol @@ -0,0 +1,37 @@ + +library Q { + enum E {a} +} + +contract Z { + enum E {a,b} +} + +contract D { + enum E {a,b,c} + + function a() public returns(uint){ + return uint(type(E).max); + } + + function b() public returns(uint){ + return uint(type(Q.E).max); + } + + function c() public returns(uint){ + return uint(type(Z.E).max); + } + + function d() public returns(uint){ + return uint(type(E).min); + } + + function e() public returns(uint){ + return uint(type(Q.E).min); + } + + function f() public returns(uint){ + return uint(type(Z.E).min); + } + +} diff --git a/tests/e2e/solc_parsing/test_data/event-top-level.sol b/tests/e2e/solc_parsing/test_data/event-top-level.sol new file mode 100644 index 000000000..fa64e1bf7 --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/event-top-level.sol @@ -0,0 +1,7 @@ +event MyEvent(uint256 a); + +contract T { + function a() public { + emit MyEvent(2); + } +} diff --git a/tests/e2e/solc_parsing/test_data/expected/aliasing/main.sol-0.8.19-compact.json b/tests/e2e/solc_parsing/test_data/expected/aliasing/main.sol-0.8.19-compact.json new file mode 100644 index 000000000..4aab8998c --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/expected/aliasing/main.sol-0.8.19-compact.json @@ -0,0 +1,9 @@ +{ + "MyC": { + "callme()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "Tp": { + "re(SS,MyEnum)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n}\n", + "re2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.0-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.0-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.0-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.1-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.1-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.1-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.10-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.10-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.10-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.11-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.11-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.11-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.12-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.12-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.12-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.12-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.2-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.2-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.2-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.3-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.3-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.3-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.4-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.4-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.4-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.5-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.5-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.5-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.6-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.6-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.6-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.7-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.7-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.7-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.8-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.8-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.8-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.9-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.9-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.6.9-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.0-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.0-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.0-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.1-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.1-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.1-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.2-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.2-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.2-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.3-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.3-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.3-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.4-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.4-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.4-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.5-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.5-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.5-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.6-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.6-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.7.6-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.0-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.0-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.0-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.1-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.1-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.1-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.10-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.10-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.10-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.11-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.11-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.11-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.12-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.12-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.12-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.12-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.13-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.13-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.13-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.13-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.14-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.14-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.14-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.14-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.15-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.15-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.15-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.15-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.2-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.2-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.2-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.3-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.3-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.3-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.4-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.4-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.4-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.5-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.5-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.5-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.6-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.6-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.6-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.7-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.7-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.7-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.8-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.8-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.8-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.9-compact.json index 5bfb159c1..ff18e4e47 100644 --- a/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.9-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-all.sol-0.8.9-compact.json @@ -1,6 +1,6 @@ { "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->7;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->1;\n}\n", - "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: _ 4\n\"];\n}\n" + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->9;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: INLINE ASM 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: END INLINE ASM 8\n\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->1;\n}\n", + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: _ 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.6.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.6.9-compact.json new file mode 100644 index 000000000..0c50d020c --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.6.9-compact.json @@ -0,0 +1,12 @@ +{ + "A": { + "foo()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n}\n", + "foo.asm_0.f()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.f.z()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.f.z.x()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.w()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.w.a()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n}\n", + "foo.asm_0.w.b()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.g()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.6.9-legacy.json b/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.6.9-legacy.json new file mode 100644 index 000000000..09c0a51f7 --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.6.9-legacy.json @@ -0,0 +1,5 @@ +{ + "A": { + "foo()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.7.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.7.6-compact.json new file mode 100644 index 000000000..0c50d020c --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.7.6-compact.json @@ -0,0 +1,12 @@ +{ + "A": { + "foo()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n}\n", + "foo.asm_0.f()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.f.z()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.f.z.x()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.w()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.w.a()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n}\n", + "foo.asm_0.w.b()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.g()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.7.6-legacy.json b/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.7.6-legacy.json new file mode 100644 index 000000000..09c0a51f7 --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.7.6-legacy.json @@ -0,0 +1,5 @@ +{ + "A": { + "foo()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.8.16-compact.json b/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.8.16-compact.json new file mode 100644 index 000000000..0c50d020c --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/expected/assembly-functions.sol-0.8.16-compact.json @@ -0,0 +1,12 @@ +{ + "A": { + "foo()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n}\n", + "foo.asm_0.f()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.f.z()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.f.z.x()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.w()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.w.a()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n}\n", + "foo.asm_0.w.b()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "foo.asm_0.g()": "digraph{\n0[label=\"Node Type: INLINE ASM 0\n\"];\n0->1;\n1[label=\"Node Type: ENTRY_POINT 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 8db75806e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 8db75806e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 8db75806e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 8db75806e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 8db75806e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 8db75806e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 8db75806e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 8db75806e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 8db75806e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 8db75806e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 8db75806e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 8db75806e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.7.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.7.sol-0.4.7-compact.json deleted file mode 100644 index 8f9f9857b..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.7.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.7.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.7.sol-0.4.8-compact.json deleted file mode 100644 index 8f9f9857b..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.7.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.7.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.7.sol-0.4.9-compact.json deleted file mode 100644 index 8f9f9857b..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/assignment-0.4.7.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index f7313f2eb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index f7313f2eb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index f7313f2eb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index f7313f2eb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index f7313f2eb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index f7313f2eb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index f7313f2eb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index f7313f2eb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index f7313f2eb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index f7313f2eb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index f7313f2eb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index f7313f2eb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.7.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.7.sol-0.4.7-compact.json deleted file mode 100644 index 8939b57f2..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.7.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.7.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.7.sol-0.4.8-compact.json deleted file mode 100644 index 8939b57f2..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.7.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.7.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.7.sol-0.4.9-compact.json deleted file mode 100644 index 8939b57f2..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/binaryoperation-0.4.7.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.0-compact.json deleted file mode 100644 index b9b7fc93e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.1-compact.json deleted file mode 100644 index b9b7fc93e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.10-compact.json deleted file mode 100644 index b9b7fc93e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.11-compact.json deleted file mode 100644 index b9b7fc93e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.2-compact.json deleted file mode 100644 index b9b7fc93e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.3-compact.json deleted file mode 100644 index b9b7fc93e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.4-compact.json deleted file mode 100644 index b9b7fc93e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.5-compact.json deleted file mode 100644 index b9b7fc93e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.6-compact.json deleted file mode 100644 index b9b7fc93e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.7-compact.json deleted file mode 100644 index b9b7fc93e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.8-compact.json deleted file mode 100644 index b9b7fc93e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.9-compact.json deleted file mode 100644 index b9b7fc93e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/break-all.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.0-compact.json deleted file mode 100644 index 113bb5a14..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.0-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": {}, - "D": { - "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.1-compact.json deleted file mode 100644 index 113bb5a14..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.1-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": {}, - "D": { - "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.10-compact.json deleted file mode 100644 index 113bb5a14..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.10-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": {}, - "D": { - "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.11-compact.json deleted file mode 100644 index 113bb5a14..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.11-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": {}, - "D": { - "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.2-compact.json deleted file mode 100644 index 113bb5a14..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.2-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": {}, - "D": { - "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.3-compact.json deleted file mode 100644 index 113bb5a14..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.3-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": {}, - "D": { - "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.4-compact.json deleted file mode 100644 index 113bb5a14..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.4-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": {}, - "D": { - "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.5-compact.json deleted file mode 100644 index 113bb5a14..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.5-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": {}, - "D": { - "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.6-compact.json deleted file mode 100644 index 113bb5a14..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.6-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": {}, - "D": { - "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.7-compact.json deleted file mode 100644 index 113bb5a14..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.7-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": {}, - "D": { - "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.8-compact.json deleted file mode 100644 index 113bb5a14..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.8-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": {}, - "D": { - "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.9-compact.json deleted file mode 100644 index 113bb5a14..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/call_to_variable-all.sol-0.4.9-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": {}, - "D": { - "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.0-compact.json deleted file mode 100644 index a53745acd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "A": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.1-compact.json deleted file mode 100644 index a53745acd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "A": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.10-compact.json deleted file mode 100644 index a53745acd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "A": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.11-compact.json deleted file mode 100644 index a53745acd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "A": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.2-compact.json deleted file mode 100644 index a53745acd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "A": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.3-compact.json deleted file mode 100644 index a53745acd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "A": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.4-compact.json deleted file mode 100644 index a53745acd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "A": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.5-compact.json deleted file mode 100644 index a53745acd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "A": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.6-compact.json deleted file mode 100644 index a53745acd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "A": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.7-compact.json deleted file mode 100644 index a53745acd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "A": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.8-compact.json deleted file mode 100644 index a53745acd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "A": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.9-compact.json deleted file mode 100644 index a53745acd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/comment-all.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "A": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.0-compact.json deleted file mode 100644 index bba15d9bd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.1-compact.json deleted file mode 100644 index bba15d9bd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.10-compact.json deleted file mode 100644 index bba15d9bd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.11-compact.json deleted file mode 100644 index bba15d9bd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.2-compact.json deleted file mode 100644 index bba15d9bd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.3-compact.json deleted file mode 100644 index bba15d9bd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.4-compact.json deleted file mode 100644 index bba15d9bd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.5-compact.json deleted file mode 100644 index bba15d9bd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.6-compact.json deleted file mode 100644 index bba15d9bd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.7-compact.json deleted file mode 100644 index bba15d9bd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.8-compact.json deleted file mode 100644 index bba15d9bd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.9-compact.json deleted file mode 100644 index bba15d9bd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/continue-all.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 5c911c175..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "A": {}, - "B": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "D": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "D()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - }, - "E": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "F": {}, - "G": {}, - "H": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 5c911c175..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "A": {}, - "B": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "D": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "D()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - }, - "E": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "F": {}, - "G": {}, - "H": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 5c911c175..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "A": {}, - "B": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "D": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "D()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - }, - "E": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "F": {}, - "G": {}, - "H": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 5c911c175..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "A": {}, - "B": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "D": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "D()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - }, - "E": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "F": {}, - "G": {}, - "H": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 5c911c175..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "A": {}, - "B": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "D": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "D()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - }, - "E": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "F": {}, - "G": {}, - "H": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 5c911c175..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "A": {}, - "B": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "D": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "D()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - }, - "E": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "F": {}, - "G": {}, - "H": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 5c911c175..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "A": {}, - "B": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "D": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "D()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - }, - "E": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "F": {}, - "G": {}, - "H": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 5c911c175..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "A": {}, - "B": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "D": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "D()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - }, - "E": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "F": {}, - "G": {}, - "H": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 5c911c175..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "A": {}, - "B": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "D": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "D()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - }, - "E": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "F": {}, - "G": {}, - "H": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 5c911c175..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "A": {}, - "B": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "D": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "D()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - }, - "E": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "F": {}, - "G": {}, - "H": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 5c911c175..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "A": {}, - "B": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "D": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "D()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - }, - "E": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "F": {}, - "G": {}, - "H": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 5c911c175..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/contract-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "A": {}, - "B": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "D": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "D()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - }, - "E": { - "B(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "F": {}, - "G": {}, - "H": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.10-compact.json index 7eca6f451..4a79365ac 100644 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.10-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.10-compact.json @@ -5,7 +5,9 @@ "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\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", - "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err5(uint256[5])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err6(uint256[10])": "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" diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.11-compact.json index 7eca6f451..4a79365ac 100644 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.11-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.11-compact.json @@ -5,7 +5,9 @@ "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\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", - "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err5(uint256[5])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err6(uint256[10])": "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" diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.12-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.12-compact.json index 7eca6f451..4a79365ac 100644 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.12-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.12-compact.json @@ -5,7 +5,9 @@ "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\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", - "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err5(uint256[5])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err6(uint256[10])": "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" diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.13-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.13-compact.json index 7eca6f451..4a79365ac 100644 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.13-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.13-compact.json @@ -5,7 +5,9 @@ "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\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", - "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err5(uint256[5])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err6(uint256[10])": "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" diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.14-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.14-compact.json index 7eca6f451..4a79365ac 100644 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.14-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.14-compact.json @@ -5,7 +5,9 @@ "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\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", - "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err5(uint256[5])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err6(uint256[10])": "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" diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.15-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.15-compact.json index 7eca6f451..4a79365ac 100644 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.15-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.15-compact.json @@ -5,7 +5,9 @@ "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\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", - "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err5(uint256[5])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err6(uint256[10])": "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" diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.4-compact.json index 7eca6f451..4a79365ac 100644 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.4-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.4-compact.json @@ -5,7 +5,9 @@ "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\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", - "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err5(uint256[5])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err6(uint256[10])": "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" diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.5-compact.json index 7eca6f451..4a79365ac 100644 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.5-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.5-compact.json @@ -5,7 +5,9 @@ "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\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", - "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err5(uint256[5])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err6(uint256[10])": "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" diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.6-compact.json index 7eca6f451..4a79365ac 100644 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.6-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.6-compact.json @@ -5,7 +5,9 @@ "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\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", - "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err5(uint256[5])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err6(uint256[10])": "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" diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.7-compact.json index 7eca6f451..4a79365ac 100644 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.7-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.7-compact.json @@ -5,7 +5,9 @@ "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\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", - "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err5(uint256[5])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err6(uint256[10])": "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" diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.8-compact.json index 7eca6f451..4a79365ac 100644 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.8-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.8-compact.json @@ -5,7 +5,9 @@ "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\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", - "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err5(uint256[5])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err6(uint256[10])": "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" diff --git a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.9-compact.json index 7eca6f451..4a79365ac 100644 --- a/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.9-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/custom_error-0.8.4.sol-0.8.9-compact.json @@ -5,7 +5,9 @@ "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\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", - "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + "err4()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err5(uint256[5])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err6(uint256[10])": "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" diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.5-compact.json deleted file mode 100644 index 1cf317575..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->4;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->9;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.6-compact.json deleted file mode 100644 index 1cf317575..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->4;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->9;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.7-compact.json deleted file mode 100644 index 1cf317575..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->4;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->9;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.8-compact.json deleted file mode 100644 index 1cf317575..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->4;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->9;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.9-compact.json deleted file mode 100644 index 1cf317575..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/dowhile-0.4.5.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->4;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->9;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.21-compact.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.21-compact.json deleted file mode 100644 index c940f7b41..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.21-compact.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.21-legacy.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.21-legacy.json deleted file mode 100644 index c940f7b41..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.21-legacy.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.22-compact.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.22-compact.json deleted file mode 100644 index c940f7b41..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.22-compact.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.22-legacy.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.22-legacy.json deleted file mode 100644 index c940f7b41..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.22-legacy.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.23-compact.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.23-compact.json deleted file mode 100644 index c940f7b41..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.23-compact.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.23-legacy.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.23-legacy.json deleted file mode 100644 index c940f7b41..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.23-legacy.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.24-compact.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.24-compact.json deleted file mode 100644 index c940f7b41..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.24-compact.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.24-legacy.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.24-legacy.json deleted file mode 100644 index c940f7b41..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.24-legacy.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.25-compact.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.25-compact.json deleted file mode 100644 index c940f7b41..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.25-compact.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.25-legacy.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.25-legacy.json deleted file mode 100644 index c940f7b41..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.25-legacy.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.26-compact.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.26-compact.json deleted file mode 100644 index c940f7b41..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.26-compact.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.26-legacy.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.26-legacy.json deleted file mode 100644 index c940f7b41..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.21.sol-0.4.26-legacy.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.8.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.8.sol-0.4.8-compact.json deleted file mode 100644 index a4e54d0ee..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.8.sol-0.4.8-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.8.sol-0.4.8-legacy.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.8.sol-0.4.8-legacy.json deleted file mode 100644 index a4e54d0ee..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.8.sol-0.4.8-legacy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.8.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.8.sol-0.4.9-compact.json deleted file mode 100644 index a4e54d0ee..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.8.sol-0.4.9-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.8.sol-0.4.9-legacy.json b/tests/e2e/solc_parsing/test_data/expected/emit-0.4.8.sol-0.4.9-legacy.json deleted file mode 100644 index a4e54d0ee..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/emit-0.4.8.sol-0.4.9-legacy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "emitNoKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/enum-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/enum-max-min.sol-0.8.19-compact.json b/tests/e2e/solc_parsing/test_data/expected/enum-max-min.sol-0.8.19-compact.json new file mode 100644 index 000000000..db0ebc88b --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/expected/enum-max-min.sol-0.8.19-compact.json @@ -0,0 +1,12 @@ +{ + "Q": {}, + "Z": {}, + "D": { + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "b()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "c()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "d()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "e()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "f()": "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/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/event-all.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/event-top-level.sol-0.8.22-compact.json b/tests/e2e/solc_parsing/test_data/expected/event-top-level.sol-0.8.22-compact.json new file mode 100644 index 000000000..58c6a3ab6 --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/expected/event-top-level.sol-0.8.22-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.0-compact.json deleted file mode 100644 index fe24348d8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.0-compact.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "C": { - "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", - "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.1-compact.json deleted file mode 100644 index fe24348d8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.1-compact.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "C": { - "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", - "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.10-compact.json deleted file mode 100644 index fe24348d8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.10-compact.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "C": { - "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", - "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.11-compact.json deleted file mode 100644 index fe24348d8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.11-compact.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "C": { - "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", - "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.2-compact.json deleted file mode 100644 index fe24348d8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.2-compact.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "C": { - "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", - "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.3-compact.json deleted file mode 100644 index fe24348d8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.3-compact.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "C": { - "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", - "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.4-compact.json deleted file mode 100644 index fe24348d8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.4-compact.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "C": { - "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", - "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.5-compact.json deleted file mode 100644 index fe24348d8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.5-compact.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "C": { - "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", - "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.6-compact.json deleted file mode 100644 index fe24348d8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.6-compact.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "C": { - "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", - "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.7-compact.json deleted file mode 100644 index fe24348d8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.7-compact.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "C": { - "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", - "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.8-compact.json deleted file mode 100644 index fe24348d8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.8-compact.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "C": { - "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", - "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.9-compact.json deleted file mode 100644 index fe24348d8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/for-all.sol-0.4.9-compact.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "C": { - "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", - "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", - "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", - "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", - "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 5406c6dd0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "C1": { - "C1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C2": { - "C2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C3": { - "C3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - }, - "C4": { - "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C5": { - "constantFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "abstractFunc()": "digraph{\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 5406c6dd0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "C1": { - "C1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C2": { - "C2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C3": { - "C3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - }, - "C4": { - "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C5": { - "constantFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "abstractFunc()": "digraph{\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 5406c6dd0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "C1": { - "C1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C2": { - "C2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C3": { - "C3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - }, - "C4": { - "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C5": { - "constantFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "abstractFunc()": "digraph{\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 5406c6dd0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "C1": { - "C1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C2": { - "C2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C3": { - "C3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - }, - "C4": { - "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C5": { - "constantFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "abstractFunc()": "digraph{\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 5406c6dd0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "C1": { - "C1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C2": { - "C2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C3": { - "C3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - }, - "C4": { - "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C5": { - "constantFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "abstractFunc()": "digraph{\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 5406c6dd0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "C1": { - "C1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C2": { - "C2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C3": { - "C3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - }, - "C4": { - "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C5": { - "constantFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "abstractFunc()": "digraph{\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 5406c6dd0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "C1": { - "C1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C2": { - "C2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C3": { - "C3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - }, - "C4": { - "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C5": { - "constantFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "abstractFunc()": "digraph{\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 5406c6dd0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "C1": { - "C1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C2": { - "C2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C3": { - "C3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - }, - "C4": { - "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C5": { - "constantFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "abstractFunc()": "digraph{\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 5406c6dd0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "C1": { - "C1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C2": { - "C2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C3": { - "C3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - }, - "C4": { - "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C5": { - "constantFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "abstractFunc()": "digraph{\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 5406c6dd0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "C1": { - "C1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C2": { - "C2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C3": { - "C3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - }, - "C4": { - "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C5": { - "constantFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "abstractFunc()": "digraph{\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 5406c6dd0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "C1": { - "C1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C2": { - "C2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C3": { - "C3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - }, - "C4": { - "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C5": { - "constantFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "abstractFunc()": "digraph{\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 5406c6dd0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/function-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "C1": { - "C1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C2": { - "C2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C3": { - "C3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", - "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - }, - "C4": { - "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C5": { - "constantFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "abstractFunc()": "digraph{\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 771efb110..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 771efb110..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 771efb110..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 771efb110..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 771efb110..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 771efb110..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 771efb110..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 771efb110..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 771efb110..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 771efb110..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 771efb110..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 771efb110..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.5-compact.json deleted file mode 100644 index b36758ed7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.5-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.6-compact.json deleted file mode 100644 index b36758ed7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.6-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.7-compact.json deleted file mode 100644 index b36758ed7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.7-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.8-compact.json deleted file mode 100644 index b36758ed7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.8-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.9-compact.json deleted file mode 100644 index b36758ed7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/functioncall-0.4.5.sol-0.4.9-compact.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "I": { - "I()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n}\n", - "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "cursed()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/global_variables-0.8.18.sol-0.8.18-compact.json b/tests/e2e/solc_parsing/test_data/expected/global_variables-0.8.18.sol-0.8.18-compact.json new file mode 100644 index 000000000..0da550d3b --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/expected/global_variables-0.8.18.sol-0.8.18-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.0-compact.json deleted file mode 100644 index c0c884b4e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.0-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", - "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", - "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.1-compact.json deleted file mode 100644 index c0c884b4e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.1-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", - "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", - "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.10-compact.json deleted file mode 100644 index c0c884b4e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.10-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", - "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", - "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.11-compact.json deleted file mode 100644 index c0c884b4e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.11-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", - "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", - "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.2-compact.json deleted file mode 100644 index c0c884b4e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.2-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", - "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", - "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.3-compact.json deleted file mode 100644 index c0c884b4e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.3-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", - "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", - "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.4-compact.json deleted file mode 100644 index c0c884b4e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.4-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", - "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", - "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.5-compact.json deleted file mode 100644 index c0c884b4e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.5-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", - "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", - "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.6-compact.json deleted file mode 100644 index c0c884b4e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.6-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", - "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", - "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.7-compact.json deleted file mode 100644 index c0c884b4e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.7-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", - "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", - "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.8-compact.json deleted file mode 100644 index c0c884b4e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.8-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", - "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", - "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.9-compact.json deleted file mode 100644 index c0c884b4e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/if-all.sol-0.4.9-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", - "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", - "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/import_interface_with_struct_from_top_level-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.0-compact.json deleted file mode 100644 index 43190fcd6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.1-compact.json deleted file mode 100644 index 43190fcd6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.10-compact.json deleted file mode 100644 index 43190fcd6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.11-compact.json deleted file mode 100644 index 43190fcd6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.2-compact.json deleted file mode 100644 index 43190fcd6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.3-compact.json deleted file mode 100644 index 43190fcd6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.4-compact.json deleted file mode 100644 index 43190fcd6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.5-compact.json deleted file mode 100644 index 43190fcd6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.6-compact.json deleted file mode 100644 index 43190fcd6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.7-compact.json deleted file mode 100644 index 43190fcd6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.8-compact.json deleted file mode 100644 index 43190fcd6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.9-compact.json deleted file mode 100644 index 43190fcd6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexaccess-all.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/indexrangeaccess-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/library_implicit_conversion-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 141d16af3..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 141d16af3..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 141d16af3..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 141d16af3..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 141d16af3..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 141d16af3..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 141d16af3..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 141d16af3..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 141d16af3..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 141d16af3..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.10.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/literal-0.4.10.sol-0.4.10-compact.json deleted file mode 100644 index b29327c65..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.10.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.10.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/literal-0.4.10.sol-0.4.11-compact.json deleted file mode 100644 index b29327c65..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/literal-0.4.10.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 2772fda53..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 2772fda53..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 2772fda53..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 2772fda53..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 2772fda53..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 2772fda53..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 2772fda53..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 2772fda53..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 2772fda53..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 2772fda53..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 2772fda53..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 2772fda53..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/memberaccess-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 228af371a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 228af371a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 228af371a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 228af371a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 228af371a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 228af371a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 228af371a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 228af371a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 228af371a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 228af371a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 228af371a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 228af371a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/minmax-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.0-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.0-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.1-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.1-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.10-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.10-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.11-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.11-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.2-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.2-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.3-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.3-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.4-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.4-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.5-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.5-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.6-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.6-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.7-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.7-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.8-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.8-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.9-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.4.9-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.0-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.0-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.0-legacy.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.0-legacy.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.0-legacy.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.1-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.1-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.1-legacy.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.1-legacy.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.1-legacy.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.2-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.2-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.2-legacy.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.2-legacy.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.2-legacy.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.3-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.3-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.3-legacy.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.3-legacy.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.3-legacy.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.4-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.4-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.4-legacy.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.4-legacy.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.4-legacy.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.5-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.5-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.5-legacy.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.5-legacy.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.5-legacy.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.6-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.6-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.6-legacy.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.6-legacy.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.7.6-legacy.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.0-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.0-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.1-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.1-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.10-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.10-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.11-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.11-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.12-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.12-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.12-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.13-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.13-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.13-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.14-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.14-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.14-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.15-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.15-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.15-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.2-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.2-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.3-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.3-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.4-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.4-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.5-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.5-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.6-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.6-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.7-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.7-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.8-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.8-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.9-compact.json deleted file mode 100644 index 34aad8ef1..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/modifier-all.sol-0.8.9-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "C": { - "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", - "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", - "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index cf3c4f4ea..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "B": { - "B()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index cf3c4f4ea..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "B": { - "B()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index cf3c4f4ea..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "B": { - "B()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index cf3c4f4ea..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "B": { - "B()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index cf3c4f4ea..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "B": { - "B()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index cf3c4f4ea..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "B": { - "B()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index cf3c4f4ea..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "B": { - "B()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index cf3c4f4ea..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "B": { - "B()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index cf3c4f4ea..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "B": { - "B()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index cf3c4f4ea..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "B": { - "B()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index cf3c4f4ea..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "B": { - "B()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index cf3c4f4ea..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/newexpression-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "B": { - "B()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" - }, - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/pragma-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.0-compact.json deleted file mode 100644 index a1a35e654..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.1-compact.json deleted file mode 100644 index a1a35e654..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.10-compact.json deleted file mode 100644 index a1a35e654..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.11-compact.json deleted file mode 100644 index a1a35e654..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.2-compact.json deleted file mode 100644 index a1a35e654..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.3-compact.json deleted file mode 100644 index a1a35e654..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.4-compact.json deleted file mode 100644 index a1a35e654..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.5-compact.json deleted file mode 100644 index a1a35e654..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.6-compact.json deleted file mode 100644 index a1a35e654..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.7-compact.json deleted file mode 100644 index a1a35e654..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.8-compact.json deleted file mode 100644 index a1a35e654..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.9-compact.json deleted file mode 100644 index a1a35e654..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/push-all.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.0-compact.json deleted file mode 100644 index 7eddd38f6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.0-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "C": { - "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", - "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", - "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", - "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.1-compact.json deleted file mode 100644 index 7eddd38f6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.1-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "C": { - "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", - "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", - "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", - "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.10-compact.json deleted file mode 100644 index 7eddd38f6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.10-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "C": { - "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", - "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", - "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", - "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.11-compact.json deleted file mode 100644 index 7eddd38f6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.11-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "C": { - "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", - "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", - "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", - "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.2-compact.json deleted file mode 100644 index 7eddd38f6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.2-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "C": { - "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", - "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", - "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", - "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.3-compact.json deleted file mode 100644 index 7eddd38f6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.3-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "C": { - "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", - "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", - "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", - "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.4-compact.json deleted file mode 100644 index 7eddd38f6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.4-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "C": { - "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", - "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", - "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", - "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.5-compact.json deleted file mode 100644 index 7eddd38f6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.5-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "C": { - "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", - "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", - "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", - "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.6-compact.json deleted file mode 100644 index 7eddd38f6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.6-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "C": { - "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", - "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", - "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", - "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.7-compact.json deleted file mode 100644 index 7eddd38f6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.7-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "C": { - "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", - "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", - "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", - "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.8-compact.json deleted file mode 100644 index 7eddd38f6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.8-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "C": { - "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", - "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", - "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", - "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.9-compact.json deleted file mode 100644 index 7eddd38f6..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/return-all.sol-0.4.9-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "C": { - "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", - "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", - "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", - "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 00c3dbb1a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Scope": { - "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", - "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", - "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 00c3dbb1a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Scope": { - "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", - "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", - "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 00c3dbb1a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Scope": { - "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", - "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", - "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 00c3dbb1a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Scope": { - "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", - "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", - "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 00c3dbb1a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Scope": { - "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", - "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", - "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 00c3dbb1a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Scope": { - "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", - "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", - "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 00c3dbb1a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Scope": { - "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", - "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", - "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 00c3dbb1a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Scope": { - "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", - "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", - "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 00c3dbb1a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Scope": { - "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", - "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", - "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 00c3dbb1a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Scope": { - "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", - "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", - "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 00c3dbb1a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Scope": { - "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", - "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", - "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 00c3dbb1a..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/scope-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Scope": { - "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", - "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", - "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", - "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/struct-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index a444e777e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: THROW 2\n\"];\n3[label=\"Node Type: END_IF 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index a444e777e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: THROW 2\n\"];\n3[label=\"Node Type: END_IF 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index a444e777e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: THROW 2\n\"];\n3[label=\"Node Type: END_IF 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index a444e777e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: THROW 2\n\"];\n3[label=\"Node Type: END_IF 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index a444e777e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: THROW 2\n\"];\n3[label=\"Node Type: END_IF 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index a444e777e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: THROW 2\n\"];\n3[label=\"Node Type: END_IF 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index a444e777e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: THROW 2\n\"];\n3[label=\"Node Type: END_IF 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index a444e777e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: THROW 2\n\"];\n3[label=\"Node Type: END_IF 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index a444e777e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: THROW 2\n\"];\n3[label=\"Node Type: END_IF 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index a444e777e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: THROW 2\n\"];\n3[label=\"Node Type: END_IF 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index a444e777e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: THROW 2\n\"];\n3[label=\"Node Type: END_IF 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index a444e777e..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/throw-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: THROW 2\n\"];\n3[label=\"Node Type: END_IF 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-import-bis-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top-level-nested-import-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 7caa60cf7..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/top_level_variable2-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "A": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/trycatch-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index b5912e6b8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index b5912e6b8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index b5912e6b8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index b5912e6b8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index b5912e6b8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index b5912e6b8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index b5912e6b8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index b5912e6b8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index b5912e6b8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index b5912e6b8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index b5912e6b8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index b5912e6b8..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/tupleexpression-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/type-aliases.sol-0.8.19-compact.json b/tests/e2e/solc_parsing/test_data/expected/type-aliases.sol-0.8.19-compact.json new file mode 100644 index 000000000..e76cc99ff --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/expected/type-aliases.sol-0.8.19-compact.json @@ -0,0 +1,6 @@ +{ + "OtherTest": { + "myfunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + }, + "DeleteTest": {} +} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index b4c60f249..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index b4c60f249..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index b4c60f249..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index b4c60f249..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index b4c60f249..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index b4c60f249..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index b4c60f249..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index b4c60f249..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index b4c60f249..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index b4c60f249..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index b4c60f249..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index b4c60f249..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unaryexpression-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/unchecked-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 94dd85fe0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Test": { - "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", - "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n", - "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n}\n", - "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", - "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", - "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index 94dd85fe0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Test": { - "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", - "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n", - "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n}\n", - "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", - "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", - "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index 94dd85fe0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Test": { - "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", - "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n", - "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n}\n", - "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", - "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", - "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index 94dd85fe0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Test": { - "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", - "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n", - "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n}\n", - "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", - "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", - "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index 94dd85fe0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Test": { - "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", - "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n", - "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n}\n", - "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", - "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", - "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index 94dd85fe0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Test": { - "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", - "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n", - "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n}\n", - "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", - "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", - "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index 94dd85fe0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Test": { - "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", - "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n", - "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n}\n", - "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", - "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", - "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index 94dd85fe0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Test": { - "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", - "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n", - "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n}\n", - "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", - "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", - "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index 94dd85fe0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Test": { - "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", - "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n", - "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n}\n", - "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", - "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", - "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index 94dd85fe0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Test": { - "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", - "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n", - "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n}\n", - "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", - "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", - "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index 94dd85fe0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Test": { - "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", - "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n", - "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n}\n", - "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", - "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", - "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index 94dd85fe0..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/units_and_global_variables-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Test": { - "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", - "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n", - "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n}\n", - "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", - "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", - "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/user_defined_operators-0.8.19.sol-0.8.19-compact.json b/tests/e2e/solc_parsing/test_data/expected/user_defined_operators-0.8.19.sol-0.8.19-compact.json new file mode 100644 index 000000000..bee7819a6 --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/expected/user_defined_operators-0.8.19.sol-0.8.19-compact.json @@ -0,0 +1,13 @@ +{ + "Lib": { + "f(Int)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "T": { + "add_function_call(Int,Int)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "add_op(Int,Int)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "lib_call(Int)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "neg_usertype(Int)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "neg_int(int256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "eq_op(Int,Int)": "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/e2e/solc_parsing/test_data/expected/user_defined_types.sol-0.8.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/user_defined_types.sol-0.8.10-compact.json deleted file mode 100644 index 06367c7cd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/user_defined_types.sol-0.8.10-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "B": { - "u()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - }, - "D": {}, - "C": { - "f(Left[])": "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/e2e/solc_parsing/test_data/expected/user_defined_types.sol-0.8.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/user_defined_types.sol-0.8.11-compact.json deleted file mode 100644 index 06367c7cd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/user_defined_types.sol-0.8.11-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "B": { - "u()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - }, - "D": {}, - "C": { - "f(Left[])": "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/e2e/solc_parsing/test_data/expected/user_defined_types.sol-0.8.12-compact.json b/tests/e2e/solc_parsing/test_data/expected/user_defined_types.sol-0.8.12-compact.json deleted file mode 100644 index 06367c7cd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/user_defined_types.sol-0.8.12-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "B": { - "u()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - }, - "D": {}, - "C": { - "f(Left[])": "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/e2e/solc_parsing/test_data/expected/user_defined_types.sol-0.8.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/user_defined_types.sol-0.8.8-compact.json deleted file mode 100644 index 06367c7cd..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/user_defined_types.sol-0.8.8-compact.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "B": { - "u()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" - }, - "D": {}, - "C": { - "f(Left[])": "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/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.10-compact.json index c8211c636..6a50f34f7 100644 --- a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.10-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.10-compact.json @@ -1,5 +1,5 @@ { "Test": { - "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.11-compact.json index c8211c636..6a50f34f7 100644 --- a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.11-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.11-compact.json @@ -1,5 +1,5 @@ { "Test": { - "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.12-compact.json b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.12-compact.json index c8211c636..6a50f34f7 100644 --- a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.12-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.12-compact.json @@ -1,5 +1,5 @@ { "Test": { - "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.13-compact.json b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.13-compact.json index c8211c636..6a50f34f7 100644 --- a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.13-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.13-compact.json @@ -1,5 +1,5 @@ { "Test": { - "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.14-compact.json b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.14-compact.json index c8211c636..6a50f34f7 100644 --- a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.14-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.14-compact.json @@ -1,5 +1,5 @@ { "Test": { - "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.15-compact.json b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.15-compact.json index c8211c636..6a50f34f7 100644 --- a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.15-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.15-compact.json @@ -1,5 +1,5 @@ { "Test": { - "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.8-compact.json index c8211c636..6a50f34f7 100644 --- a/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.8-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/user_defined_value_type/top-level-0.8.8.sol-0.8.8-compact.json @@ -1,5 +1,5 @@ { "Test": { - "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + "set(StackTop,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 0008a4469..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.1-compact.json deleted file mode 100644 index 27fa7c323..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.1-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "L1": { - "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "L2": { - "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.10-compact.json deleted file mode 100644 index 27fa7c323..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.10-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "L1": { - "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "L2": { - "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.11-compact.json deleted file mode 100644 index 27fa7c323..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.11-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "L1": { - "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "L2": { - "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.2-compact.json deleted file mode 100644 index 27fa7c323..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.2-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "L1": { - "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "L2": { - "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.3-compact.json deleted file mode 100644 index 27fa7c323..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.3-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "L1": { - "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "L2": { - "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.4-compact.json deleted file mode 100644 index 27fa7c323..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.4-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "L1": { - "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "L2": { - "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.5-compact.json deleted file mode 100644 index 27fa7c323..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.5-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "L1": { - "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "L2": { - "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.6-compact.json deleted file mode 100644 index 27fa7c323..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.6-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "L1": { - "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "L2": { - "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.7-compact.json deleted file mode 100644 index 27fa7c323..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.7-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "L1": { - "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "L2": { - "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.8-compact.json deleted file mode 100644 index 27fa7c323..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.8-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "L1": { - "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "L2": { - "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.9-compact.json deleted file mode 100644 index 27fa7c323..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/using-for-0.4.1.sol-0.4.9-compact.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "L1": { - "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "L2": { - "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" - }, - "C": {} -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/using-for-this-contract.sol-0.8.15-compact.json b/tests/e2e/solc_parsing/test_data/expected/using-for-this-contract.sol-0.8.15-compact.json new file mode 100644 index 000000000..43eca2c9a --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/expected/using-for-this-contract.sol-0.8.15-compact.json @@ -0,0 +1,8 @@ +{ + "Lib": { + "f(Hello)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "Hello": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index cddfa6dae..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.1-compact.json deleted file mode 100644 index cddfa6dae..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.1-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.10-compact.json deleted file mode 100644 index cddfa6dae..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.10-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.11-compact.json deleted file mode 100644 index cddfa6dae..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.11-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.2-compact.json deleted file mode 100644 index cddfa6dae..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.2-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.3-compact.json deleted file mode 100644 index cddfa6dae..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.3-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.4-compact.json deleted file mode 100644 index cddfa6dae..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.4-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.5-compact.json deleted file mode 100644 index cddfa6dae..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.5-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.6-compact.json deleted file mode 100644 index cddfa6dae..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.6-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.7-compact.json deleted file mode 100644 index cddfa6dae..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.7-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.8-compact.json deleted file mode 100644 index cddfa6dae..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.8-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.9-compact.json deleted file mode 100644 index cddfa6dae..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.0.sol-0.4.9-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.10-compact.json deleted file mode 100644 index 439c5ec12..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.10-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.11-compact.json deleted file mode 100644 index 439c5ec12..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.11-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.5-compact.json deleted file mode 100644 index 439c5ec12..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.5-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.6-compact.json deleted file mode 100644 index 439c5ec12..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.6-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.7-compact.json deleted file mode 100644 index 439c5ec12..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.7-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.8-compact.json deleted file mode 100644 index 439c5ec12..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.8-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.9-compact.json deleted file mode 100644 index 439c5ec12..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/variable-0.4.5.sol-0.4.9-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "C": { - "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n}\n", - "complex()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.0-compact.json deleted file mode 100644 index 4d9657391..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.1-compact.json deleted file mode 100644 index 4d9657391..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.1-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.10-compact.json deleted file mode 100644 index 4d9657391..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.10-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.11-compact.json deleted file mode 100644 index 4d9657391..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.11-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.2-compact.json deleted file mode 100644 index 4d9657391..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.2-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.3-compact.json deleted file mode 100644 index 4d9657391..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.3-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.4-compact.json deleted file mode 100644 index 4d9657391..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.4-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.5-compact.json deleted file mode 100644 index 4d9657391..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.5-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.6-compact.json deleted file mode 100644 index 4d9657391..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.6-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.7-compact.json deleted file mode 100644 index 4d9657391..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.7-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.8-compact.json deleted file mode 100644 index 4d9657391..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.8-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.9-compact.json deleted file mode 100644 index 4d9657391..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/while-all.sol-0.4.9-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.0.sol-0.4.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.0.sol-0.4.0-compact.json deleted file mode 100644 index 8f6ef922b..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.0.sol-0.4.0-compact.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.1-compact.json deleted file mode 100644 index a9569a2fb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.1-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "L": {}, - "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.10-compact.json deleted file mode 100644 index a9569a2fb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.10-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "L": {}, - "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.2-compact.json deleted file mode 100644 index a9569a2fb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.2-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "L": {}, - "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.3-compact.json deleted file mode 100644 index a9569a2fb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.3-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "L": {}, - "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.4-compact.json deleted file mode 100644 index a9569a2fb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.4-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "L": {}, - "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.5-compact.json deleted file mode 100644 index a9569a2fb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.5-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "L": {}, - "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.6-compact.json deleted file mode 100644 index a9569a2fb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.6-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "L": {}, - "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.7-compact.json deleted file mode 100644 index a9569a2fb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.7-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "L": {}, - "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.8-compact.json deleted file mode 100644 index a9569a2fb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.8-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "L": {}, - "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.9-compact.json deleted file mode 100644 index a9569a2fb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.1.sol-0.4.9-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "L": {}, - "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.4.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.4.11-compact.json deleted file mode 100644 index a9569a2fb..000000000 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.4.11-compact.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "L": {}, - "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" - } -} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.0-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.0-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.0-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.1-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.1-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.1-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.10-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.10-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.10-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.11-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.11-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.11-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.12-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.12-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.12-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.12-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.2-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.2-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.2-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.3-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.3-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.3-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.4-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.4-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.4-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.5-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.5-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.5-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.6-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.6-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.6-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.7-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.7-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.7-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.8-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.8-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.8-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.9-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.9-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.4.11.sol-0.6.9-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.0-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.0-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.0-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.1-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.1-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.1-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.2-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.2-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.2-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.3-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.3-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.3-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.4-compact.json index b83f434be..2d2e1425d 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.4-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.0.sol-0.7.4-compact.json @@ -1,6 +1,6 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: RETURN 30\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: END INLINE ASM 30\n\"];\n30->31;\n31[label=\"Node Type: RETURN 31\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.5.sol-0.7.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.5.sol-0.7.5-compact.json index c5983df13..7ef3260c4 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.5.sol-0.7.5-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.5.sol-0.7.5-compact.json @@ -1,5 +1,5 @@ { "C": { - "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: RETURN 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.5.sol-0.7.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.5.sol-0.7.6-compact.json index c5983df13..7ef3260c4 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.7.5.sol-0.7.6-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.7.5.sol-0.7.6-compact.json @@ -1,5 +1,5 @@ { "C": { - "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: RETURN 5\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.0-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.0-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.0-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.0-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.1-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.1-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.1-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.1-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.10-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.10-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.10-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.10-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.11-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.11-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.11-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.11-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.12-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.12-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.12-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.12-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.13-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.13-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.13-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.13-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.14-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.14-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.14-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.14-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.15-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.15-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.15-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.15-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.2-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.2-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.2-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.2-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.3-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.3-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.3-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.3-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.4-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.4-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.4-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.4-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.5-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.5-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.5-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.5-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.6-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.6-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.6-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.6-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.7-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.7-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.7-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.7-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.8-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.8-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.8-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.8-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.9-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.9-compact.json index 6feed6a86..2d5d7bc17 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.9-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-0.8.0.sol-0.8.9-compact.json @@ -1,7 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: RETURN 32\n\"];\n}\n", - "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: EXPRESSION 31\n\"];\n31->32;\n32[label=\"Node Type: END INLINE ASM 32\n\"];\n32->33;\n33[label=\"Node Type: RETURN 33\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: RETURN 4\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/expected/yul-state-constant-access.sol-0.8.16-compact.json b/tests/e2e/solc_parsing/test_data/expected/yul-state-constant-access.sol-0.8.16-compact.json index 6c6bc9377..62a5f1a90 100644 --- a/tests/e2e/solc_parsing/test_data/expected/yul-state-constant-access.sol-0.8.16-compact.json +++ b/tests/e2e/solc_parsing/test_data/expected/yul-state-constant-access.sol-0.8.16-compact.json @@ -1,12 +1,12 @@ { "A": { "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "f2()": "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: INLINE ASM 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", + "f2()": "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: INLINE ASM 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n}\n", "f3()": "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" }, "B": { "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", - "f2()": "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: INLINE ASM 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", + "f2()": "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: INLINE ASM 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END INLINE ASM 4\n\"];\n}\n", "f3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/global_variables-0.8.18.sol b/tests/e2e/solc_parsing/test_data/global_variables-0.8.18.sol new file mode 100644 index 000000000..f21ae5d8f --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/global_variables-0.8.18.sol @@ -0,0 +1,11 @@ +contract C { + function f() public view returns (uint256) { + return block.prevrandao; + } + + function g() public view returns (uint256 ret) { + assembly { + ret := prevrandao() + } + } +} \ No newline at end of file diff --git a/tests/e2e/solc_parsing/test_data/type-aliases.sol b/tests/e2e/solc_parsing/test_data/type-aliases.sol new file mode 100644 index 000000000..53fdaabeb --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/type-aliases.sol @@ -0,0 +1,20 @@ + +struct Z { + int x; + int y; +} + +contract OtherTest { + struct Z { + int x; + int y; + } + + function myfunc() external { + Z memory z = Z(2,3); + } +} + +contract DeleteTest { + type Z is int; +} diff --git a/tests/e2e/solc_parsing/test_data/user_defined_operators-0.8.19.sol b/tests/e2e/solc_parsing/test_data/user_defined_operators-0.8.19.sol new file mode 100644 index 000000000..e4df845fb --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/user_defined_operators-0.8.19.sol @@ -0,0 +1,48 @@ +pragma solidity ^0.8.19; + +type Int is int; +using {add as +, eq as ==, add, neg as -, Lib.f} for Int global; + +function add(Int a, Int b) pure returns (Int) { + return Int.wrap(Int.unwrap(a) + Int.unwrap(b)); +} + +function eq(Int a, Int b) pure returns (bool) { + return true; +} + +function neg(Int a) pure returns (Int) { + return a; +} + +library Lib { + function f(Int r) internal {} +} + +contract T { + function add_function_call(Int b, Int c) public returns(Int) { + Int res = add(b,c); + return res; + } + + function add_op(Int b, Int c) public returns(Int) { + return b + c; + } + + function lib_call(Int b) public { + return b.f(); + } + + function neg_usertype(Int b) public returns(Int) { + Int res = -b; + return res; + } + + function neg_int(int b) public returns(int) { + return -b; + } + + function eq_op(Int b, Int c) public returns(bool) { + return b == c; + } +} diff --git a/tests/e2e/solc_parsing/test_data/using-for-this-contract.sol b/tests/e2e/solc_parsing/test_data/using-for-this-contract.sol new file mode 100644 index 000000000..33bbc74cd --- /dev/null +++ b/tests/e2e/solc_parsing/test_data/using-for-this-contract.sol @@ -0,0 +1,13 @@ +library Lib { + function f(Hello h) external { + + } +} +contract Hello { + using Lib for Hello; + + function test() external { + this.f(); + } +} + diff --git a/tests/e2e/vyper_parsing/__init__.py b/tests/e2e/vyper_parsing/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_builtins_c__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_builtins_c__0.txt new file mode 100644 index 000000000..1f973fcdb --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_builtins_c__0.txt @@ -0,0 +1,38 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +user_shares = () + +IRs: +user_shares(uint256[10]) = []"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +user_shares.append(1) + +IRs: +REF_1 -> LENGTH user_shares +TMP_3(uint256) := REF_1(uint256) +TMP_4(uint256) = TMP_3 (c)+ 1 +REF_1(uint256) (->user_shares) := TMP_4(uint256) +REF_2(uint256) -> user_shares[TMP_3] +REF_2(uint256) (->user_shares) := 1(uint256)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +user_shares.pop() + +IRs: +REF_4 -> LENGTH user_shares +TMP_6(uint256) = REF_4 (c)- 1 +REF_5(uint256) -> user_shares[TMP_6] +REF_5 = delete REF_5 +REF_6 -> LENGTH user_shares +REF_6(uint256) (->user_shares) := TMP_6(uint256)"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_builtins_test_builtins__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_builtins_test_builtins__0.txt new file mode 100644 index 000000000..4719d9926 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_builtins_test_builtins__0.txt @@ -0,0 +1,118 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +a = block.coinbase + +IRs: +a(address) := block.coinbase(address)"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +b = block.difficulty + +IRs: +b(uint256) := block.difficulty(uint256)"]; +2->3; +3[label="Node Type: NEW VARIABLE 3 + +EXPRESSION: +c = block.prevrandao + +IRs: +c(uint256) := block.prevrandao(uint256)"]; +3->4; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +d = block.number + +IRs: +d(uint256) := block.number(uint256)"]; +4->5; +5[label="Node Type: NEW VARIABLE 5 + +EXPRESSION: +e = block.prevhash + +IRs: +e(bytes32) := block.prevhash(bytes32)"]; +5->6; +6[label="Node Type: NEW VARIABLE 6 + +EXPRESSION: +f = block.timestamp + +IRs: +f(uint256) := block.timestamp(uint256)"]; +6->7; +7[label="Node Type: NEW VARIABLE 7 + +EXPRESSION: +h = bytes32(chain.id) + +IRs: +TMP_0 = CONVERT chain.id to bytes32 +h(bytes32) := TMP_0(bytes32)"]; +7->8; +8[label="Node Type: NEW VARIABLE 8 + +EXPRESSION: +i = slice()(msg.data,0,32) + +IRs: +TMP_1(None) = SOLIDITY_CALL slice()(msg.data,0,32) +i(bytes[32]) = ['TMP_1(None)']"]; +8->9; +9[label="Node Type: NEW VARIABLE 9 + +EXPRESSION: +j = msg.gas + +IRs: +j(uint256) := msg.gas(uint256)"]; +9->10; +10[label="Node Type: NEW VARIABLE 10 + +EXPRESSION: +k = msg.sender + +IRs: +k(address) := msg.sender(address)"]; +10->11; +11[label="Node Type: NEW VARIABLE 11 + +EXPRESSION: +l = msg.value + +IRs: +l(uint256) := msg.value(uint256)"]; +11->12; +12[label="Node Type: NEW VARIABLE 12 + +EXPRESSION: +m = tx.origin + +IRs: +m(address) := tx.origin(address)"]; +12->13; +13[label="Node Type: NEW VARIABLE 13 + +EXPRESSION: +n = tx.gasprice + +IRs: +n(uint256) := tx.gasprice(uint256)"]; +13->14; +14[label="Node Type: NEW VARIABLE 14 + +EXPRESSION: +x = self.balance + +IRs: +x(uint256) := self.balance(uint256)"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_default_args_a__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_default_args_a__0.txt new file mode 100644 index 000000000..2f0451a52 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_default_args_a__0.txt @@ -0,0 +1,28 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +self.b(x,True) + +IRs: +INTERNAL_CALL, default_args.b()(x,True)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +self.b(1,self.config) + +IRs: +INTERNAL_CALL, default_args.b()(1,config)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +self.b(1,z) + +IRs: +INTERNAL_CALL, default_args.b()(1,z)"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_default_args_b__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_default_args_b__0.txt new file mode 100644 index 000000000..23126acae --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_default_args_b__0.txt @@ -0,0 +1,24 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +config + +IRs: +CONDITION config"]; +1->3[label="True"]; +1->2[label="False"]; +2[label="Node Type: END_IF 2 +"]; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +self.counter = y + +IRs: +counter(uint256) := y(uint256)"]; +3->2; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for2_for_loop__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for2_for_loop__0.txt new file mode 100644 index 000000000..9e35f147e --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for2_for_loop__0.txt @@ -0,0 +1,63 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +_strategies = strategies + +IRs: +_strategies(address[3]) = ['strategies(address[3])']"]; +1->2; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->4; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +counter_var = 0 + +IRs: +counter_var(uint256) := 0(uint256)"]; +4->5; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +counter_var <= 10 + +IRs: +TMP_0(bool) = counter_var <= 10 +CONDITION TMP_0"]; +5->7[label="True"]; +5->3[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +counter_var += 1 + +IRs: +counter_var(uint256) = counter_var (c)+ 1"]; +6->5; +7[label="Node Type: NEW VARIABLE 7 + +EXPRESSION: +i = counter_var + +IRs: +i(uint256) := counter_var(uint256)"]; +7->8; +8[label="Node Type: NEW VARIABLE 8 + +EXPRESSION: +max_withdraw = IStrategy(_strategies[i]).maxWithdraw(self) + +IRs: +REF_0(address) -> _strategies[i] +TMP_1 = CONVERT REF_0 to IStrategy +TMP_2(uint256) = HIGH_LEVEL_CALL, dest:TMP_1(IStrategy), function:maxWithdraw, arguments:['self'] +max_withdraw(uint256) := TMP_2(uint256)"]; +8->6; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for2_slitherConstructorConstantVariables__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for2_slitherConstructorConstantVariables__0.txt new file mode 100644 index 000000000..781b8e485 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for2_slitherConstructorConstantVariables__0.txt @@ -0,0 +1,19 @@ +digraph{ +0[label="Node Type: OTHER_ENTRYPOINT 0 + +EXPRESSION: +x = 1 + 1 + +IRs: +TMP_3(uint256) = 1 + 1 +x(uint256) := TMP_3(uint256)"]; +0->1; +1[label="Node Type: OTHER_ENTRYPOINT 1 + +EXPRESSION: +MAX_QUEUE = 1 + x + +IRs: +TMP_4(uint256) = 1 + x +MAX_QUEUE(uint256) := TMP_4(uint256)"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for3_get_D__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for3_get_D__0.txt new file mode 100644 index 000000000..f8ab6cef9 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for3_get_D__0.txt @@ -0,0 +1,62 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +S = 0 + +IRs: +S(uint256) := 0(uint256)"]; +1->2; +2[label="Node Type: BEGIN_LOOP 2 +"]; +2->4; +3[label="Node Type: END_LOOP 3 +"]; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +counter_var = 0 + +IRs: +counter_var(uint256) := 0(uint256)"]; +4->5; +5[label="Node Type: IF_LOOP 5 + +EXPRESSION: +counter_var <= len()(_xp) + +IRs: +TMP_0(uint256) = SOLIDITY_CALL len()(_xp) +TMP_1(bool) = counter_var <= TMP_0 +CONDITION TMP_1"]; +5->7[label="True"]; +5->3[label="False"]; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +counter_var += 1 + +IRs: +counter_var(uint256) = counter_var (c)+ 1"]; +6->5; +7[label="Node Type: NEW VARIABLE 7 + +EXPRESSION: +x = _xp[counter_var] + +IRs: +REF_0(uint256) -> _xp[counter_var] +x(uint256) := REF_0(uint256)"]; +7->8; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +S += x + +IRs: +S(uint256) = S (c)+ x"]; +8->6; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for_break_continue_f__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for_break_continue_f__0.txt new file mode 100644 index 000000000..b35bdaa94 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for_break_continue_f__0.txt @@ -0,0 +1,164 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: BEGIN_LOOP 1 +"]; +1->3; +2[label="Node Type: END_LOOP 2 +"]; +3[label="Node Type: NEW VARIABLE 3 + +EXPRESSION: +counter_var = 0 + +IRs: +counter_var(uint256) := 0(uint256)"]; +3->4; +4[label="Node Type: IF_LOOP 4 + +EXPRESSION: +counter_var <= 100 + +IRs: +TMP_0(bool) = counter_var <= 100 +CONDITION TMP_0"]; +4->6[label="True"]; +4->2[label="False"]; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +counter_var += 1 + +IRs: +counter_var(uint256) = counter_var (c)+ 1"]; +5->4; +6[label="Node Type: NEW VARIABLE 6 + +EXPRESSION: +i = counter_var + +IRs: +i(uint256) := counter_var(uint256)"]; +6->7; +7[label="Node Type: IF 7 + +EXPRESSION: +i > 100 + +IRs: +TMP_1(bool) = i > 100 +CONDITION TMP_1"]; +7->9[label="True"]; +7->8[label="False"]; +8[label="Node Type: END_IF 8 +"]; +8->10; +9[label="Node Type: BREAK 9 +"]; +9->2; +10[label="Node Type: IF 10 + +EXPRESSION: +i < 3 + +IRs: +TMP_2(bool) = i < 3 +CONDITION TMP_2"]; +10->12[label="True"]; +10->11[label="False"]; +11[label="Node Type: END_IF 11 +"]; +11->13; +12[label="Node Type: CONTINUE 12 +"]; +12->5; +13[label="Node Type: NEW VARIABLE 13 + +EXPRESSION: +x = 10 + +IRs: +x(uint256) := 10(uint256)"]; +13->14; +14[label="Node Type: BEGIN_LOOP 14 +"]; +14->16; +15[label="Node Type: END_LOOP 15 +"]; +15->5; +16[label="Node Type: NEW VARIABLE 16 + +EXPRESSION: +counter_var_scope_0 = 0 + +IRs: +counter_var_scope_0(uint256) := 0(uint256)"]; +16->17; +17[label="Node Type: IF_LOOP 17 + +EXPRESSION: +counter_var <= 10 + +IRs: +TMP_3(bool) = counter_var <= 10 +CONDITION TMP_3"]; +17->19[label="True"]; +17->15[label="False"]; +18[label="Node Type: EXPRESSION 18 + +EXPRESSION: +counter_var += 1 + +IRs: +counter_var(uint256) = counter_var (c)+ 1"]; +18->17; +19[label="Node Type: NEW VARIABLE 19 + +EXPRESSION: +j = counter_var + +IRs: +j(uint256) := counter_var(uint256)"]; +19->20; +20[label="Node Type: IF 20 + +EXPRESSION: +j > 10 + +IRs: +TMP_4(bool) = j > 10 +CONDITION TMP_4"]; +20->22[label="True"]; +20->21[label="False"]; +21[label="Node Type: END_IF 21 +"]; +21->23; +22[label="Node Type: CONTINUE 22 +"]; +22->18; +23[label="Node Type: IF 23 + +EXPRESSION: +j < 3 + +IRs: +TMP_5(bool) = j < 3 +CONDITION TMP_5"]; +23->25[label="True"]; +23->24[label="False"]; +24[label="Node Type: END_IF 24 +"]; +24->26; +25[label="Node Type: BREAK 25 +"]; +25->15; +26[label="Node Type: EXPRESSION 26 + +EXPRESSION: +x -= 1 + +IRs: +x(uint256) = x (c)- 1"]; +26->18; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for_for_loop__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for_for_loop__0.txt new file mode 100644 index 000000000..575f0d55f --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for_for_loop__0.txt @@ -0,0 +1,56 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: BEGIN_LOOP 1 +"]; +1->3; +2[label="Node Type: END_LOOP 2 +"]; +3[label="Node Type: NEW VARIABLE 3 + +EXPRESSION: +counter_var = 0 + +IRs: +counter_var(uint256) := 0(uint256)"]; +3->4; +4[label="Node Type: IF_LOOP 4 + +EXPRESSION: +counter_var <= len()(self.strategies) + +IRs: +TMP_0(uint256) = SOLIDITY_CALL len()(strategies) +TMP_1(bool) = counter_var <= TMP_0 +CONDITION TMP_1"]; +4->6[label="True"]; +4->2[label="False"]; +5[label="Node Type: EXPRESSION 5 + +EXPRESSION: +counter_var += 1 + +IRs: +counter_var(uint256) = counter_var (c)+ 1"]; +5->4; +6[label="Node Type: NEW VARIABLE 6 + +EXPRESSION: +strategy = strategies[counter_var] + +IRs: +REF_0(address) -> strategies[counter_var] +strategy(address) := REF_0(address)"]; +6->7; +7[label="Node Type: NEW VARIABLE 7 + +EXPRESSION: +z = IStrategy(strategy).asset() + +IRs: +TMP_2 = CONVERT strategy to IStrategy +TMP_3(address) = HIGH_LEVEL_CALL, dest:TMP_2(IStrategy), function:asset, arguments:[] +z(address) := TMP_3(address)"]; +7->5; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for_slitherConstructorConstantVariables__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for_slitherConstructorConstantVariables__0.txt new file mode 100644 index 000000000..a5e0a06f7 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_for_slitherConstructorConstantVariables__0.txt @@ -0,0 +1,19 @@ +digraph{ +0[label="Node Type: OTHER_ENTRYPOINT 0 + +EXPRESSION: +x = 1 + 1 + +IRs: +TMP_4(uint256) = 1 + 1 +x(uint256) := TMP_4(uint256)"]; +0->1; +1[label="Node Type: OTHER_ENTRYPOINT 1 + +EXPRESSION: +MAX_QUEUE = 1 + x + +IRs: +TMP_5(uint256) = 1 + x +MAX_QUEUE(uint256) := TMP_5(uint256)"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_if_compute__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_if_compute__0.txt new file mode 100644 index 000000000..b623aa188 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_if_compute__0.txt @@ -0,0 +1,172 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +a = p + +IRs: +a(uint256) := p(uint256)"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +b = 1 + +IRs: +b(uint256) := 1(uint256)"]; +2->3; +3[label="Node Type: NEW VARIABLE 3 + +EXPRESSION: +c = 0 + +IRs: +c(uint256) := 0(uint256)"]; +3->4; +4[label="Node Type: IF 4 + +EXPRESSION: +b > 0 + +IRs: +TMP_0(bool) = b > 0 +CONDITION TMP_0"]; +4->6[label="True"]; +4->5[label="False"]; +5[label="Node Type: END_IF 5 +"]; +6[label="Node Type: NEW VARIABLE 6 + +EXPRESSION: +old_a = 1 + +IRs: +old_a(uint256) := 1(uint256)"]; +6->7; +7[label="Node Type: NEW VARIABLE 7 + +EXPRESSION: +old_c = 2 + +IRs: +old_c(uint256) := 2(uint256)"]; +7->8; +8[label="Node Type: IF 8 + +EXPRESSION: +p > old_a + +IRs: +TMP_1(bool) = p > old_a +CONDITION TMP_1"]; +8->10[label="True"]; +8->15[label="False"]; +9[label="Node Type: END_IF 9 +"]; +9->20; +10[label="Node Type: EXPRESSION 10 + +EXPRESSION: +c = unsafe_div()(old_a * 10 ** 18,p) + +IRs: +TMP_2(uint256) = 10 (c)** 18 +TMP_3(uint256) = old_a (c)* TMP_2 +TMP_4(None) = SOLIDITY_CALL unsafe_div()(TMP_3,p) +c(uint256) := TMP_4(None)"]; +10->11; +11[label="Node Type: IF 11 + +EXPRESSION: +c < 10 ** 36 / 1 + +IRs: +TMP_5(uint256) = 10 (c)** 36 +TMP_6(uint256) = TMP_5 (c)/ 1 +TMP_7(bool) = c < TMP_6 +CONDITION TMP_7"]; +11->13[label="True"]; +11->12[label="False"]; +12[label="Node Type: END_IF 12 +"]; +12->9; +13[label="Node Type: EXPRESSION 13 + +EXPRESSION: +a = unsafe_div()(old_a * 1,10 ** 18) + +IRs: +TMP_8(uint256) = old_a (c)* 1 +TMP_9(uint256) = 10 (c)** 18 +TMP_10(None) = SOLIDITY_CALL unsafe_div()(TMP_8,TMP_9) +a(uint256) := TMP_10(None)"]; +13->14; +14[label="Node Type: EXPRESSION 14 + +EXPRESSION: +c = 10 ** 36 / 1 + +IRs: +TMP_11(uint256) = 10 (c)** 36 +TMP_12(uint256) = TMP_11 (c)/ 1 +c(uint256) := TMP_12(uint256)"]; +14->12; +15[label="Node Type: EXPRESSION 15 + +EXPRESSION: +c = unsafe_div()(p * 10 ** 18,old_a) + +IRs: +TMP_13(uint256) = 10 (c)** 18 +TMP_14(uint256) = p (c)* TMP_13 +TMP_15(None) = SOLIDITY_CALL unsafe_div()(TMP_14,old_a) +c(uint256) := TMP_15(None)"]; +15->16; +16[label="Node Type: IF 16 + +EXPRESSION: +c < 10 ** 36 / 1 + +IRs: +TMP_16(uint256) = 10 (c)** 36 +TMP_17(uint256) = TMP_16 (c)/ 1 +TMP_18(bool) = c < TMP_17 +CONDITION TMP_18"]; +16->18[label="True"]; +16->17[label="False"]; +17[label="Node Type: END_IF 17 +"]; +17->9; +18[label="Node Type: EXPRESSION 18 + +EXPRESSION: +a = unsafe_div()(old_a * 10 ** 18,1) + +IRs: +TMP_19(uint256) = 10 (c)** 18 +TMP_20(uint256) = old_a (c)* TMP_19 +TMP_21(None) = SOLIDITY_CALL unsafe_div()(TMP_20,1) +a(uint256) := TMP_21(None)"]; +18->19; +19[label="Node Type: EXPRESSION 19 + +EXPRESSION: +c = 10 ** 36 / 1 + +IRs: +TMP_22(uint256) = 10 (c)** 36 +TMP_23(uint256) = TMP_22 (c)/ 1 +c(uint256) := TMP_23(uint256)"]; +19->17; +20[label="Node Type: EXPRESSION 20 + +EXPRESSION: +c = 1 + +IRs: +c(uint256) := 1(uint256)"]; +20->5; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_in_bar__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_in_bar__0.txt new file mode 100644 index 000000000..49552d27f --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_in_bar__0.txt @@ -0,0 +1,62 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +uint256(x) & uint256(self.roles[self]) != 0 + +IRs: +TMP_10 = CONVERT x to uint256 +REF_4(in.Roles) -> roles[self] +TMP_11 = CONVERT REF_4 to uint256 +TMP_12(uint256) = TMP_10 & TMP_11 +TMP_13(bool) = TMP_12 != 0 +CONDITION TMP_13"]; +1->3[label="True"]; +1->2[label="False"]; +2[label="Node Type: END_IF 2 +"]; +2->4; +3[label="Node Type: RETURN 3 + +EXPRESSION: +True + +IRs: +RETURN True"]; +3->2; +4[label="Node Type: IF 4 + +EXPRESSION: +uint256(x) & uint256(self.roles[self]) == 0 + +IRs: +TMP_14 = CONVERT x to uint256 +REF_5(in.Roles) -> roles[self] +TMP_15 = CONVERT REF_5 to uint256 +TMP_16(uint256) = TMP_14 & TMP_15 +TMP_17(bool) = TMP_16 == 0 +CONDITION TMP_17"]; +4->6[label="True"]; +4->5[label="False"]; +5[label="Node Type: END_IF 5 +"]; +5->7; +6[label="Node Type: RETURN 6 + +EXPRESSION: +False + +IRs: +RETURN False"]; +6->5; +7[label="Node Type: RETURN 7 + +EXPRESSION: +False + +IRs: +RETURN False"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_in_baz__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_in_baz__0.txt new file mode 100644 index 000000000..95328dad9 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_in_baz__0.txt @@ -0,0 +1,66 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: IF 1 + +EXPRESSION: +uint256(x) & uint256(Roles.A | Roles.B) != 0 + +IRs: +TMP_0 = CONVERT x to uint256 +REF_0(in.Roles) -> Roles.A +REF_1(in.Roles) -> Roles.B +TMP_1(in.Roles) = REF_0 | REF_1 +TMP_2 = CONVERT TMP_1 to uint256 +TMP_3(uint256) = TMP_0 & TMP_2 +TMP_4(bool) = TMP_3 != 0 +CONDITION TMP_4"]; +1->3[label="True"]; +1->2[label="False"]; +2[label="Node Type: END_IF 2 +"]; +2->4; +3[label="Node Type: RETURN 3 + +EXPRESSION: +True + +IRs: +RETURN True"]; +3->2; +4[label="Node Type: IF 4 + +EXPRESSION: +uint256(x) & uint256(Roles.A | Roles.B) == 0 + +IRs: +TMP_5 = CONVERT x to uint256 +REF_2(in.Roles) -> Roles.A +REF_3(in.Roles) -> Roles.B +TMP_6(in.Roles) = REF_2 | REF_3 +TMP_7 = CONVERT TMP_6 to uint256 +TMP_8(uint256) = TMP_5 & TMP_7 +TMP_9(bool) = TMP_8 == 0 +CONDITION TMP_9"]; +4->6[label="True"]; +4->5[label="False"]; +5[label="Node Type: END_IF 5 +"]; +5->7; +6[label="Node Type: RETURN 6 + +EXPRESSION: +False + +IRs: +RETURN False"]; +6->5; +7[label="Node Type: RETURN 7 + +EXPRESSION: +False + +IRs: +RETURN False"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_in_foo__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_in_foo__0.txt new file mode 100644 index 000000000..cd1e34bf1 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_in_foo__0.txt @@ -0,0 +1,74 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +a = 0 + +IRs: +a(int128) := 0(uint256)"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +b = 0 + +IRs: +b(int128) := 0(uint256)"]; +2->3; +3[label="Node Type: IF 3 + +EXPRESSION: +x == b || x == a + +IRs: +TMP_18(bool) = x == b +TMP_19(bool) = x == a +TMP_20(bool) = TMP_18 || TMP_19 +CONDITION TMP_20"]; +3->5[label="True"]; +3->4[label="False"]; +4[label="Node Type: END_IF 4 +"]; +4->6; +5[label="Node Type: RETURN 5 + +EXPRESSION: +True + +IRs: +RETURN True"]; +5->4; +6[label="Node Type: IF 6 + +EXPRESSION: +x != b && x != a + +IRs: +TMP_21(bool) = x != b +TMP_22(bool) = x != a +TMP_23(bool) = TMP_21 && TMP_22 +CONDITION TMP_23"]; +6->8[label="True"]; +6->7[label="False"]; +7[label="Node Type: END_IF 7 +"]; +7->9; +8[label="Node Type: EXPRESSION 8 + +EXPRESSION: +revert(string)(nope) + +IRs: +TMP_24(None) = SOLIDITY_CALL revert(string)(nope)"]; +8->7; +9[label="Node Type: RETURN 9 + +EXPRESSION: +False + +IRs: +RETURN False"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_initarry___init__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_initarry___init__0.txt new file mode 100644 index 000000000..e3417a894 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_initarry___init__0.txt @@ -0,0 +1,22 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +BORROWED_TOKEN = ERC20(x) + +IRs: +TMP_0 = CONVERT x to ERC20 +BORROWED_TOKEN(ERC20) := TMP_0(ERC20)"]; +1->2; +2[label="Node Type: EXPRESSION 2 + +EXPRESSION: +COLLATERAL_TOKEN = ERC20(y) + +IRs: +TMP_1 = CONVERT y to ERC20 +COLLATERAL_TOKEN(ERC20) := TMP_1(ERC20)"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_initarry_coins__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_initarry_coins__0.txt new file mode 100644 index 000000000..ac4917822 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_initarry_coins__0.txt @@ -0,0 +1,16 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +(address(BORROWED_TOKEN),address(COLLATERAL_TOKEN))[i] + +IRs: +TMP_2 = CONVERT BORROWED_TOKEN to address +TMP_3 = CONVERT COLLATERAL_TOKEN to address +TMP_4(address[2]) = ['TMP_2(address)', 'TMP_3(address)'] +REF_0(address) -> TMP_4[i] +RETURN REF_0"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_interface_constant_slitherConstructorConstantVariables__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_interface_constant_slitherConstructorConstantVariables__0.txt new file mode 100644 index 000000000..31ff6d408 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_interface_constant_slitherConstructorConstantVariables__0.txt @@ -0,0 +1,9 @@ +digraph{ +0[label="Node Type: OTHER_ENTRYPOINT 0 + +EXPRESSION: +MY_CONSTANT = 50 + +IRs: +MY_CONSTANT(uint256) := 50(uint256)"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_interface_conversion_bar__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_interface_conversion_bar__0.txt new file mode 100644 index 000000000..1a19c5614 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_interface_conversion_bar__0.txt @@ -0,0 +1,57 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +a = 0 + +IRs: +a(int128) := 0(uint256)"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +b = 0 + +IRs: +b(int128) := 0(uint256)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +(a,b) = self.foo() + +IRs: +TUPLE_0(int128,int128) = INTERNAL_CALL, interface_conversion.foo()() +a(int128)= UNPACK TUPLE_0 index: 0 +b(int128)= UNPACK TUPLE_0 index: 1 "]; +3->4; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +x = 0x0000000000000000000000000000000000000000 + +IRs: +x(address) := 0(address)"]; +4->5; +5[label="Node Type: NEW VARIABLE 5 + +EXPRESSION: +c = 0 + +IRs: +c(uint256) := 0(uint256)"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +(a,c) = Test(x).foo() + +IRs: +TMP_0 = CONVERT x to Test +TUPLE_1(int128,uint256) = HIGH_LEVEL_CALL, dest:TMP_0(Test), function:foo, arguments:[] +a(int128)= UNPACK TUPLE_1 index: 0 +c(uint256)= UNPACK TUPLE_1 index: 1 "]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_interface_conversion_baz__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_interface_conversion_baz__0.txt new file mode 100644 index 000000000..4280229d0 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_interface_conversion_baz__0.txt @@ -0,0 +1,56 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +a = 0 + +IRs: +a(int128) := 0(uint256)"]; +1->2; +2[label="Node Type: NEW VARIABLE 2 + +EXPRESSION: +b = 0 + +IRs: +b(int128) := 0(uint256)"]; +2->3; +3[label="Node Type: EXPRESSION 3 + +EXPRESSION: +(a,b) = self.foo() + +IRs: +TUPLE_2(int128,int128) = INTERNAL_CALL, interface_conversion.foo()() +a(int128)= UNPACK TUPLE_2 index: 0 +b(int128)= UNPACK TUPLE_2 index: 1 "]; +3->4; +4[label="Node Type: NEW VARIABLE 4 + +EXPRESSION: +x = 0x0000000000000000000000000000000000000000 + +IRs: +x(address) := 0(address)"]; +4->5; +5[label="Node Type: NEW VARIABLE 5 + +EXPRESSION: +c = 0 + +IRs: +c(uint256) := 0(uint256)"]; +5->6; +6[label="Node Type: EXPRESSION 6 + +EXPRESSION: +(a,c) = self.tester.foo() + +IRs: +TUPLE_3(int128,uint256) = HIGH_LEVEL_CALL, dest:tester(Test), function:foo, arguments:[] +a(int128)= UNPACK TUPLE_3 index: 0 +c(uint256)= UNPACK TUPLE_3 index: 1 "]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_interface_conversion_foo__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_interface_conversion_foo__0.txt new file mode 100644 index 000000000..8d1c1166b --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_interface_conversion_foo__0.txt @@ -0,0 +1,12 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +(2,3) + +IRs: +RETURN 2,3"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_precedence_fa__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_precedence_fa__0.txt new file mode 100644 index 000000000..9d3526f54 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_precedence_fa__0.txt @@ -0,0 +1,12 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +1 + +IRs: +RETURN 1"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_precedence_fb__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_precedence_fb__0.txt new file mode 100644 index 000000000..0c204c9fa --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_precedence_fb__0.txt @@ -0,0 +1,12 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: EXPRESSION 1 + +EXPRESSION: +revert()() + +IRs: +TMP_0(None) = SOLIDITY_CALL revert()()"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_precedence_foo__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_precedence_foo__0.txt new file mode 100644 index 000000000..2180c6eb1 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_precedence_foo__0.txt @@ -0,0 +1,17 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +x != self.fb() && x != self.fa() + +IRs: +TMP_1(uint256) = INTERNAL_CALL, precedence.fb()() +TMP_2(bool) = x != TMP_1 +TMP_3(uint256) = INTERNAL_CALL, precedence.fa()() +TMP_4(bool) = x != TMP_3 +TMP_5(bool) = TMP_2 && TMP_4 +RETURN TMP_5"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_struct_test__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_struct_test__0.txt new file mode 100644 index 000000000..d8c540f21 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_struct_test__0.txt @@ -0,0 +1,13 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: RETURN 1 + +EXPRESSION: +X(1) + +IRs: +TMP_0(struct.X) = new X(1) +RETURN TMP_0"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_tuple_struct___default__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_tuple_struct___default__0.txt new file mode 100644 index 000000000..7587cdfa2 --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_tuple_struct___default__0.txt @@ -0,0 +1,28 @@ +digraph{ +0[label="Node Type: ENTRY_POINT 0 +"]; +0->1; +1[label="Node Type: NEW VARIABLE 1 + +EXPRESSION: +chainlink_lrd = Test(msg.sender).get() + +IRs: +TMP_0 = CONVERT msg.sender to Test +TUPLE_0(uint80,int256,uint256,uint256,uint80) = HIGH_LEVEL_CALL, dest:TMP_0(Test), function:get, arguments:[] +TMP_1(uint80)= UNPACK TUPLE_0 index: 0 +TMP_2(int256)= UNPACK TUPLE_0 index: 1 +TMP_3(uint256)= UNPACK TUPLE_0 index: 2 +TMP_4(uint256)= UNPACK TUPLE_0 index: 3 +TMP_5(uint80)= UNPACK TUPLE_0 index: 4 +chainlink_lrd(FAKE_TUPLE_0_1_2_3_4) = new FAKE_TUPLE_0_1_2_3_4(TMP_1,TMP_2,TMP_3,TMP_4,TMP_5)"]; +1->2; +2[label="Node Type: RETURN 2 + +EXPRESSION: +chainlink_lrd[0] + +IRs: +REF_1(uint80) -> chainlink_lrd._0 +RETURN REF_1"]; +} diff --git a/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_types_slitherConstructorConstantVariables__0.txt b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_types_slitherConstructorConstantVariables__0.txt new file mode 100644 index 000000000..b53263a8d --- /dev/null +++ b/tests/e2e/vyper_parsing/snapshots/ast_parsing__vyper_cfgir_types_slitherConstructorConstantVariables__0.txt @@ -0,0 +1,9 @@ +digraph{ +0[label="Node Type: OTHER_ENTRYPOINT 0 + +EXPRESSION: +MAX_BANDS = 10 + +IRs: +MAX_BANDS(uint256) := 10(uint256)"]; +} diff --git a/tests/e2e/vyper_parsing/test_ast_parsing.py b/tests/e2e/vyper_parsing/test_ast_parsing.py new file mode 100644 index 000000000..7ca818436 --- /dev/null +++ b/tests/e2e/vyper_parsing/test_ast_parsing.py @@ -0,0 +1,25 @@ +from pathlib import Path +from slither import Slither + +TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" + +ALL_TESTS = list(Path(TEST_DATA_DIR).glob("*.vy")) + + +def pytest_generate_tests(metafunc): + test_cases = [] + for test_file in ALL_TESTS: + sl = Slither(test_file.as_posix()) + for contract in sl.contracts: + if contract.is_interface: + continue + for func_or_modifier in contract.functions: + test_cases.append( + (func_or_modifier.canonical_name, func_or_modifier.slithir_cfg_to_dot_str()) + ) + + metafunc.parametrize("test_case", test_cases, ids=lambda x: x[0]) + + +def test_vyper_cfgir(test_case, snapshot): + assert snapshot() == test_case[1] diff --git a/tests/e2e/vyper_parsing/test_data/ERC20.vy b/tests/e2e/vyper_parsing/test_data/ERC20.vy new file mode 100644 index 000000000..a3bb62694 --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/ERC20.vy @@ -0,0 +1,9 @@ + + +interface ERC20: + def totalSupply() -> uint256: view + def balanceOf(_owner: address) -> uint256: view + def allowance(_owner: address, _spender: address) -> uint256: view + def transfer(_to: address, _value: uint256) -> bool: nonpayable + def transferFrom(_from: address, _to: address, _value: uint256) -> bool: nonpayable + def approve(_spender: address, _value: uint256) -> bool: nonpayable diff --git a/tests/e2e/vyper_parsing/test_data/builtins.vy b/tests/e2e/vyper_parsing/test_data/builtins.vy new file mode 100644 index 000000000..4c4a72927 --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/builtins.vy @@ -0,0 +1,24 @@ + +@payable +@external +def test_builtins(): + a: address = block.coinbase + b: uint256 = block.difficulty + c: uint256 = block.prevrandao + d: uint256 = block.number + e: bytes32 = block.prevhash + f: uint256 = block.timestamp + h: bytes32 = convert(chain.id, bytes32) + i: Bytes[32] = slice(msg.data, 0, 32) + j: uint256 = msg.gas + k: address = msg.sender + l: uint256 = msg.value + m: address = tx.origin + n: uint256 = tx.gasprice + x: uint256 = self.balance + +@external +def c(x: uint256): + user_shares: DynArray[uint256, 10] = [] + user_shares.append(1) + user_shares.pop() diff --git a/tests/e2e/vyper_parsing/test_data/default_args.vy b/tests/e2e/vyper_parsing/test_data/default_args.vy new file mode 100644 index 000000000..10115363b --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/default_args.vy @@ -0,0 +1,12 @@ +counter: uint256 +config: bool +@internal +def b(y: uint256, config: bool = True): + if config: + self.counter = y + +@external +def a(x: uint256, z: bool): + self.b(x) + self.b(1, self.config) + self.b(1, z) \ No newline at end of file diff --git a/tests/e2e/vyper_parsing/test_data/for.vy b/tests/e2e/vyper_parsing/test_data/for.vy new file mode 100644 index 000000000..7df83bbbb --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/for.vy @@ -0,0 +1,29 @@ + + +x: constant(uint256) = 1 + 1 +MAX_QUEUE: constant(uint256) = 1 + x + +interface IStrategy: + def asset() -> address: view + def balanceOf(owner: address) -> uint256: view + def maxDeposit(receiver: address) -> uint256: view + def maxWithdraw(owner: address) -> uint256: view + def withdraw(amount: uint256, receiver: address, owner: address) -> uint256: nonpayable + def redeem(shares: uint256, receiver: address, owner: address) -> uint256: nonpayable + def deposit(assets: uint256, receiver: address) -> uint256: nonpayable + def totalAssets() -> (uint256): view + def convertToAssets(shares: uint256) -> uint256: view + def convertToShares(assets: uint256) -> uint256: view + def previewWithdraw(assets: uint256) -> uint256: view + +struct X: + y: int8 + +strategies: public(DynArray[address, MAX_QUEUE]) + +@external +def for_loop(): + + for strategy in self.strategies: + z: address = IStrategy(strategy).asset() + diff --git a/tests/e2e/vyper_parsing/test_data/for2.vy b/tests/e2e/vyper_parsing/test_data/for2.vy new file mode 100644 index 000000000..f129e56b7 --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/for2.vy @@ -0,0 +1,26 @@ + + +x: constant(uint256) = 1 + 1 +MAX_QUEUE: constant(uint256) = 1 + x + +interface IStrategy: + def asset() -> address: view + def balanceOf(owner: address) -> uint256: view + def maxDeposit(receiver: address) -> uint256: view + def maxWithdraw(owner: address) -> uint256: view + def withdraw(amount: uint256, receiver: address, owner: address) -> uint256: nonpayable + def redeem(shares: uint256, receiver: address, owner: address) -> uint256: nonpayable + def deposit(assets: uint256, receiver: address) -> uint256: nonpayable + def totalAssets() -> (uint256): view + def convertToAssets(shares: uint256) -> uint256: view + def convertToShares(assets: uint256) -> uint256: view + def previewWithdraw(assets: uint256) -> uint256: view + +@external +def for_loop(strategies: DynArray[address, MAX_QUEUE]): + _strategies: DynArray[address, MAX_QUEUE] = strategies + + for i in range(10): + + max_withdraw: uint256 = IStrategy(_strategies[i]).maxWithdraw(self) + diff --git a/tests/e2e/vyper_parsing/test_data/for3.vy b/tests/e2e/vyper_parsing/test_data/for3.vy new file mode 100644 index 000000000..4b55b6970 --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/for3.vy @@ -0,0 +1,6 @@ + +@external +def get_D(_xp: uint256[3], _amp: uint256): + S: uint256 = 0 + for x in _xp: + S += x \ No newline at end of file diff --git a/tests/e2e/vyper_parsing/test_data/for_break_continue.vy b/tests/e2e/vyper_parsing/test_data/for_break_continue.vy new file mode 100644 index 000000000..3ea8e6cbd --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/for_break_continue.vy @@ -0,0 +1,17 @@ +@external +def f(): + for i in range(100): + if (i > 100): + break + + if (i < 3): + continue + x: uint256 = 10 + for j in range(10): + if (j > 10): + continue + + if (j < 3): + break + + x -= 1 diff --git a/tests/e2e/vyper_parsing/test_data/if.vy b/tests/e2e/vyper_parsing/test_data/if.vy new file mode 100644 index 000000000..e706b9c0e --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/if.vy @@ -0,0 +1,22 @@ +@external +@view +def compute(p: uint256): + a: uint256 = p + b: uint256 = 1 + c: uint256 = 0 + + if b > 0: + old_a: uint256 = 1 + old_c: uint256 = 2 + if p > old_a: + c = unsafe_div(old_a * 10**18, p) + if c < 10**36 / 1: + a = unsafe_div(old_a * 1, 10**18) + c = 10**36 / 1 + else: + c = unsafe_div(p * 10**18, old_a) + if c < 10**36 / 1: + a = unsafe_div(old_a * 10**18, 1) + c = 10**36 / 1 + + c = 1 diff --git a/tests/e2e/vyper_parsing/test_data/in.vy b/tests/e2e/vyper_parsing/test_data/in.vy new file mode 100644 index 000000000..5d4827ca1 --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/in.vy @@ -0,0 +1,36 @@ +enum Roles: + A + B + +roles: public(HashMap[address, Roles]) + +@external +def baz(x: Roles) -> bool: + if x in (Roles.A | Roles.B): + return True + if x not in (Roles.A | Roles.B): + return False + + return False + +@external +def bar(x: Roles) -> bool: + + if x in self.roles[self]: + return True + if x not in self.roles[self]: + return False + + return False + +@external +def foo(x: int128) -> bool: + a: int128 = 0 + b: int128 = 0 + + if x in [a, b]: + return True + if x not in [a, b]: + raise "nope" + + return False \ No newline at end of file diff --git a/tests/e2e/vyper_parsing/test_data/initarry.vy b/tests/e2e/vyper_parsing/test_data/initarry.vy new file mode 100644 index 000000000..35c3c0693 --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/initarry.vy @@ -0,0 +1,17 @@ +interface ERC20: + def transfer(_to: address, _value: uint256) -> bool: nonpayable + def transferFrom(_from: address, _to: address, _value: uint256) -> bool: nonpayable + def approve(_spender: address, _value: uint256) -> bool: nonpayable + +BORROWED_TOKEN: immutable(ERC20) +COLLATERAL_TOKEN: immutable(ERC20) + +@external +def __init__(x: address, y: address): + BORROWED_TOKEN = ERC20(x) + COLLATERAL_TOKEN = ERC20(y) + +@external +@pure +def coins(i: uint256) -> address: + return [BORROWED_TOKEN.address, COLLATERAL_TOKEN.address][i] \ No newline at end of file diff --git a/tests/e2e/vyper_parsing/test_data/interface_constant.vy b/tests/e2e/vyper_parsing/test_data/interface_constant.vy new file mode 100644 index 000000000..7e6612c68 --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/interface_constant.vy @@ -0,0 +1,7 @@ +struct MyStruct: + liquidation_range: address +MY_CONSTANT: constant(uint256) = 50 +interface MyInterface: + def my_func(a: int256, b: DynArray[uint256, MY_CONSTANT]) -> MyStruct: nonpayable + + diff --git a/tests/e2e/vyper_parsing/test_data/interface_conversion.vy b/tests/e2e/vyper_parsing/test_data/interface_conversion.vy new file mode 100644 index 000000000..ad30f0ebf --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/interface_conversion.vy @@ -0,0 +1,29 @@ +interface Test: + def foo() -> (int128, uint256): nonpayable + +tester: Test + +@internal +def foo() -> (int128, int128): + return 2, 3 + +@external +def bar(): + a: int128 = 0 + b: int128 = 0 + (a, b) = self.foo() + + x: address = 0x0000000000000000000000000000000000000000 + c: uint256 = 0 + a, c = Test(x).foo() + +@external +def baz(): + a: int128 = 0 + b: int128 = 0 + (a, b) = self.foo() + + x: address = 0x0000000000000000000000000000000000000000 + c: uint256 = 0 + a, c = self.tester.foo() + diff --git a/tests/e2e/vyper_parsing/test_data/precedence.vy b/tests/e2e/vyper_parsing/test_data/precedence.vy new file mode 100644 index 000000000..ec8618663 --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/precedence.vy @@ -0,0 +1,13 @@ +@internal +def fa() -> uint256: + return 1 + +@internal +def fb() -> uint256: + raise + +@external +def foo(x: uint256) -> bool: + return x not in [self.fa(), self.fb()] + + diff --git a/tests/e2e/vyper_parsing/test_data/struct.vy b/tests/e2e/vyper_parsing/test_data/struct.vy new file mode 100644 index 000000000..97c6f5589 --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/struct.vy @@ -0,0 +1,7 @@ +struct X: + y: int8 + + +@external +def test() -> X: + return X({y: 1}) diff --git a/tests/e2e/vyper_parsing/test_data/tuple_struct.vy b/tests/e2e/vyper_parsing/test_data/tuple_struct.vy new file mode 100644 index 000000000..1bcb57b85 --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/tuple_struct.vy @@ -0,0 +1,10 @@ +interface Test: + def get() -> (uint80, int256, uint256, uint256, uint80): view +@external +def __default__() -> uint80: + chainlink_lrd: (uint80, int256, uint256, uint256, uint80) = Test(msg.sender).get() + return chainlink_lrd[0] + + + + diff --git a/tests/e2e/vyper_parsing/test_data/types.vy b/tests/e2e/vyper_parsing/test_data/types.vy new file mode 100644 index 000000000..02f18fe5a --- /dev/null +++ b/tests/e2e/vyper_parsing/test_data/types.vy @@ -0,0 +1,16 @@ +name: public(String[64]) +symbol: public(String[32]) +decimals: public(uint256) +totalSupply: public(uint256) + +balances: HashMap[address, uint256] +allowances: HashMap[address, HashMap[address, uint256]] + +MAX_BANDS: constant(uint256) = 10 + +x: public(uint256[3][4]) +y: public(uint256[2]) + +struct Loan: + liquidation_range: DynArray[uint256, MAX_BANDS] + deposit_amounts: DynArray[uint256, MAX_BANDS] \ No newline at end of file diff --git a/tests/tools/check-erc/erc20.sol b/tests/tools/check_erc/erc20.sol similarity index 100% rename from tests/tools/check-erc/erc20.sol rename to tests/tools/check_erc/erc20.sol diff --git a/tests/tools/check-erc/test_1.txt b/tests/tools/check_erc/test_1.txt similarity index 100% rename from tests/tools/check-erc/test_1.txt rename to tests/tools/check_erc/test_1.txt diff --git a/tests/tools/check-kspec/safeAdd/safeAdd.sol b/tests/tools/check_kspec/safeAdd/safeAdd.sol similarity index 100% rename from tests/tools/check-kspec/safeAdd/safeAdd.sol rename to tests/tools/check_kspec/safeAdd/safeAdd.sol diff --git a/tests/tools/check-kspec/safeAdd/spec.md b/tests/tools/check_kspec/safeAdd/spec.md similarity index 100% rename from tests/tools/check-kspec/safeAdd/spec.md rename to tests/tools/check_kspec/safeAdd/spec.md diff --git a/tests/tools/check-kspec/test_1.txt b/tests/tools/check_kspec/test_1.txt similarity index 100% rename from tests/tools/check-kspec/test_1.txt rename to tests/tools/check_kspec/test_1.txt diff --git a/tests/tools/check-upgradeability/contractV1.sol b/tests/tools/check_upgradeability/contractV1.sol similarity index 100% rename from tests/tools/check-upgradeability/contractV1.sol rename to tests/tools/check_upgradeability/contractV1.sol diff --git a/tests/tools/check-upgradeability/contractV1_struct.sol b/tests/tools/check_upgradeability/contractV1_struct.sol similarity index 100% rename from tests/tools/check-upgradeability/contractV1_struct.sol rename to tests/tools/check_upgradeability/contractV1_struct.sol diff --git a/tests/tools/check-upgradeability/contractV2.sol b/tests/tools/check_upgradeability/contractV2.sol similarity index 100% rename from tests/tools/check-upgradeability/contractV2.sol rename to tests/tools/check_upgradeability/contractV2.sol diff --git a/tests/tools/check-upgradeability/contractV2_bug.sol b/tests/tools/check_upgradeability/contractV2_bug.sol similarity index 100% rename from tests/tools/check-upgradeability/contractV2_bug.sol rename to tests/tools/check_upgradeability/contractV2_bug.sol diff --git a/tests/tools/check-upgradeability/contractV2_bug2.sol b/tests/tools/check_upgradeability/contractV2_bug2.sol similarity index 100% rename from tests/tools/check-upgradeability/contractV2_bug2.sol rename to tests/tools/check_upgradeability/contractV2_bug2.sol diff --git a/tests/tools/check-upgradeability/contractV2_struct.sol b/tests/tools/check_upgradeability/contractV2_struct.sol similarity index 100% rename from tests/tools/check-upgradeability/contractV2_struct.sol rename to tests/tools/check_upgradeability/contractV2_struct.sol diff --git a/tests/tools/check-upgradeability/contractV2_struct_bug.sol b/tests/tools/check_upgradeability/contractV2_struct_bug.sol similarity index 100% rename from tests/tools/check-upgradeability/contractV2_struct_bug.sol rename to tests/tools/check_upgradeability/contractV2_struct_bug.sol diff --git a/tests/tools/check-upgradeability/contract_initialization.sol b/tests/tools/check_upgradeability/contract_initialization.sol similarity index 100% rename from tests/tools/check-upgradeability/contract_initialization.sol rename to tests/tools/check_upgradeability/contract_initialization.sol diff --git a/tests/tools/check-upgradeability/contract_v1_var_init.sol b/tests/tools/check_upgradeability/contract_v1_var_init.sol similarity index 100% rename from tests/tools/check-upgradeability/contract_v1_var_init.sol rename to tests/tools/check_upgradeability/contract_v1_var_init.sol diff --git a/tests/tools/check-upgradeability/contract_v2_constant.sol b/tests/tools/check_upgradeability/contract_v2_constant.sol similarity index 100% rename from tests/tools/check-upgradeability/contract_v2_constant.sol rename to tests/tools/check_upgradeability/contract_v2_constant.sol diff --git a/tests/tools/check-upgradeability/proxy.sol b/tests/tools/check_upgradeability/proxy.sol similarity index 100% rename from tests/tools/check-upgradeability/proxy.sol rename to tests/tools/check_upgradeability/proxy.sol diff --git a/tests/tools/check-upgradeability/test_1.txt b/tests/tools/check_upgradeability/test_1.txt similarity index 100% rename from tests/tools/check-upgradeability/test_1.txt rename to tests/tools/check_upgradeability/test_1.txt diff --git a/tests/tools/check-upgradeability/test_10.txt b/tests/tools/check_upgradeability/test_10.txt similarity index 100% rename from tests/tools/check-upgradeability/test_10.txt rename to tests/tools/check_upgradeability/test_10.txt diff --git a/tests/tools/check-upgradeability/test_11.txt b/tests/tools/check_upgradeability/test_11.txt similarity index 100% rename from tests/tools/check-upgradeability/test_11.txt rename to tests/tools/check_upgradeability/test_11.txt diff --git a/tests/tools/check-upgradeability/test_12.txt b/tests/tools/check_upgradeability/test_12.txt similarity index 100% rename from tests/tools/check-upgradeability/test_12.txt rename to tests/tools/check_upgradeability/test_12.txt diff --git a/tests/tools/check-upgradeability/test_13.txt b/tests/tools/check_upgradeability/test_13.txt similarity index 100% rename from tests/tools/check-upgradeability/test_13.txt rename to tests/tools/check_upgradeability/test_13.txt diff --git a/tests/tools/check-upgradeability/test_2.txt b/tests/tools/check_upgradeability/test_2.txt similarity index 100% rename from tests/tools/check-upgradeability/test_2.txt rename to tests/tools/check_upgradeability/test_2.txt diff --git a/tests/tools/check-upgradeability/test_3.txt b/tests/tools/check_upgradeability/test_3.txt similarity index 100% rename from tests/tools/check-upgradeability/test_3.txt rename to tests/tools/check_upgradeability/test_3.txt diff --git a/tests/tools/check-upgradeability/test_4.txt b/tests/tools/check_upgradeability/test_4.txt similarity index 100% rename from tests/tools/check-upgradeability/test_4.txt rename to tests/tools/check_upgradeability/test_4.txt diff --git a/tests/tools/check-upgradeability/test_5.txt b/tests/tools/check_upgradeability/test_5.txt similarity index 100% rename from tests/tools/check-upgradeability/test_5.txt rename to tests/tools/check_upgradeability/test_5.txt diff --git a/tests/tools/check-upgradeability/test_6.txt b/tests/tools/check_upgradeability/test_6.txt similarity index 100% rename from tests/tools/check-upgradeability/test_6.txt rename to tests/tools/check_upgradeability/test_6.txt diff --git a/tests/tools/check-upgradeability/test_7.txt b/tests/tools/check_upgradeability/test_7.txt similarity index 100% rename from tests/tools/check-upgradeability/test_7.txt rename to tests/tools/check_upgradeability/test_7.txt diff --git a/tests/tools/check-upgradeability/test_8.txt b/tests/tools/check_upgradeability/test_8.txt similarity index 100% rename from tests/tools/check-upgradeability/test_8.txt rename to tests/tools/check_upgradeability/test_8.txt diff --git a/tests/tools/check-upgradeability/test_9.txt b/tests/tools/check_upgradeability/test_9.txt similarity index 100% rename from tests/tools/check-upgradeability/test_9.txt rename to tests/tools/check_upgradeability/test_9.txt diff --git a/tests/tools/read-storage/conftest.py b/tests/tools/read-storage/conftest.py new file mode 100644 index 000000000..3e2cfb400 --- /dev/null +++ b/tests/tools/read-storage/conftest.py @@ -0,0 +1,56 @@ +""" +Testing utilities for the read-storage tool +""" + +import shutil +import subprocess +from time import sleep +from typing import Generator +from dataclasses import dataclass +from web3 import Web3 +import pytest + + +@dataclass +class GanacheInstance: + def __init__(self, provider: str, eth_address: str, eth_privkey: str): + self.provider = provider + self.eth_address = eth_address + self.eth_privkey = eth_privkey + + +@pytest.fixture(scope="module", name="ganache") +def fixture_ganache() -> Generator[GanacheInstance, None, None]: + """Fixture that runs ganache""" + if not shutil.which("ganache"): + raise Exception( + "ganache was not found in PATH, you can install it with `npm install -g ganache`" + ) + + # Address #1 when ganache is run with `--wallet.seed test`, it starts with 1000 ETH + eth_address = "0xae17D2dD99e07CA3bF2571CCAcEAA9e2Aefc2Dc6" + eth_privkey = "0xe48ba530a63326818e116be262fd39ae6dcddd89da4b1f578be8afd4e8894b8d" + eth = int(1e18 * 1e6) + port = 8545 + with subprocess.Popen( + f"""ganache + --port {port} + --chain.networkId 1 + --chain.chainId 1 + --account {eth_privkey},{eth} + """.replace( + "\n", " " + ), + shell=True, + ) as p: + + sleep(3) + yield GanacheInstance(f"http://127.0.0.1:{port}", eth_address, eth_privkey) + p.kill() + p.wait() + + +@pytest.fixture(scope="module", name="web3") +def fixture_web3(ganache: GanacheInstance): + w3 = Web3(Web3.HTTPProvider(ganache.provider, request_kwargs={"timeout": 30})) + return w3 diff --git a/tests/tools/read-storage/test_data/storage_layout-0.8.10.sol b/tests/tools/read-storage/test_data/StorageLayout.sol similarity index 95% rename from tests/tools/read-storage/test_data/storage_layout-0.8.10.sol rename to tests/tools/read-storage/test_data/StorageLayout.sol index 28d1428eb..0940b6769 100644 --- a/tests/tools/read-storage/test_data/storage_layout-0.8.10.sol +++ b/tests/tools/read-storage/test_data/StorageLayout.sol @@ -1,5 +1,6 @@ +pragma solidity 0.8.10; // overwrite abi and bin: -// solc tests/storage-layout/storage_layout-0.8.10.sol --abi --bin -o tests/storage-layout --overwrite +// solc StorageLayout.sol --abi --bin --overwrite contract StorageLayout { uint248 packedUint = 1; bool packedBool = true; diff --git a/tests/tools/read-storage/test_data/TEST_unstructured_storage.json b/tests/tools/read-storage/test_data/TEST_unstructured_storage.json new file mode 100644 index 000000000..6dbdbddca --- /dev/null +++ b/tests/tools/read-storage/test_data/TEST_unstructured_storage.json @@ -0,0 +1,56 @@ +{ + "masterCopy": { + "name": "masterCopy", + "type_string": "address", + "slot": 0, + "size": 160, + "offset": 0, + "value": "0x0000000000000000000000000000000000000000", + "elems": {} + }, + "ADMIN_SLOT": { + "name": "ADMIN_SLOT", + "type_string": "address", + "slot": 7616251639890160809447714111544359812065171195189364993079081710756264753419, + "size": 160, + "offset": 0, + "value": "0xae17D2dD99e07CA3bF2571CCAcEAA9e2Aefc2Dc6", + "elems": {} + }, + "IMPLEMENTATION_SLOT": { + "name": "IMPLEMENTATION_SLOT", + "type_string": "address", + "slot": 24440054405305269366569402256811496959409073762505157381672968839269610695612, + "size": 160, + "offset": 0, + "value": "0x54006763154c764da4AF42a8c3cfc25Ea29765D5", + "elems": {} + }, + "ROLLBACK_SLOT": { + "name": "ROLLBACK_SLOT", + "type_string": "bool", + "slot": 33048860383849004559742813297059419343339852917517107368639918720169455489347, + "size": 1, + "offset": 0, + "value": true, + "elems": {} + }, + "BEACON_SLOT": { + "name": "BEACON_SLOT", + "type_string": "address", + "slot": 74152234768234802001998023604048924213078445070507226371336425913862612794704, + "size": 160, + "offset": 0, + "value": "0x54006763154c764da4AF42a8c3cfc25Ea29765D5", + "elems": {} + }, + "fallback_sload_hardcoded": { + "name": "fallback_sload_hardcoded", + "type_string": "address", + "slot": 89532207833283453166981358064394884954800891875771469636219037672473505217783, + "size": 160, + "offset": 0, + "value": "0x54006763154c764da4AF42a8c3cfc25Ea29765D5", + "elems": {} + } +} \ No newline at end of file diff --git a/tests/tools/read-storage/test_data/UnstructuredStorageLayout.abi b/tests/tools/read-storage/test_data/UnstructuredStorageLayout.abi new file mode 100644 index 000000000..9b579f254 --- /dev/null +++ b/tests/tools/read-storage/test_data/UnstructuredStorageLayout.abi @@ -0,0 +1 @@ +[{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"store","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/tests/tools/read-storage/test_data/UnstructuredStorageLayout.bin b/tests/tools/read-storage/test_data/UnstructuredStorageLayout.bin new file mode 100644 index 000000000..9f20de74c --- /dev/null +++ b/tests/tools/read-storage/test_data/UnstructuredStorageLayout.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b5061030b806100206000396000f3fe608060405234801561001057600080fd5b506004361061002f5760003560e01c8063975057e71461009757610030565b5b600180035473ffffffffffffffffffffffffffffffffffffffff600054167fc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7543660008037600080366000845af43d806000803e816000811461009257816000f35b816000fd5b61009f6100a1565b005b60006100ab6101a8565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146100e657600080fd5b60007f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b9050600033905080825560007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905060007354006763154c764da4af42a8c3cfc25ea29765d59050808255807fc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf75561018460016101d6565b6101a17354006763154c764da4af42a8c3cfc25ea29765d5610220565b5050505050565b6000807f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b9050805491505090565b806102037f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b61025e565b60000160006101000a81548160ff02191690831515021790555050565b600060017fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5160001c61025291906102a1565b60001b90508181555050565b6000819050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006102ac82610268565b91506102b783610268565b9250828210156102ca576102c9610272565b5b82820390509291505056fea2646970667358221220f079473c1b94744ac2818f521ccef06187a433d996633e61e51a86dfb60cc6ff64736f6c634300080a0033 \ No newline at end of file diff --git a/tests/tools/read-storage/test_data/UnstructuredStorageLayout.sol b/tests/tools/read-storage/test_data/UnstructuredStorageLayout.sol new file mode 100644 index 000000000..81b14a119 --- /dev/null +++ b/tests/tools/read-storage/test_data/UnstructuredStorageLayout.sol @@ -0,0 +1,141 @@ +pragma solidity 0.8.10; +// overwrite abi and bin: +// solc UnstructuredStorageLayout.sol --abi --bin --overwrite + +library StorageSlot { + struct AddressSlot { + address value; + } + + struct BooleanSlot { + bool value; + } + + struct Bytes32Slot { + bytes32 value; + } + + struct Uint256Slot { + uint256 value; + } + + /** + * @dev Returns an `AddressSlot` with member `value` located at `slot`. + */ + function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `BooleanSlot` with member `value` located at `slot`. + */ + function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. + */ + function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `Uint256Slot` with member `value` located at `slot`. + */ + function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } +} + +contract UnstructuredStorageLayout { + + bytes32 constant ADMIN_SLOT = keccak256("org.zeppelinos.proxy.admin"); + // This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1. + bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 + bytes32 private constant ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; + bytes32 constant BEACON_SLOT = bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1); + + address internal masterCopy; + + function _admin() internal view returns (address admin) { + bytes32 slot = ADMIN_SLOT; + assembly { + admin := sload(slot) + } + } + + function _implementation() internal view returns (address) { + address _impl; + bytes32 slot = IMPLEMENTATION_SLOT; + assembly { + _impl := sload(slot) + } + return _impl; + } + + function _set_rollback(bool _rollback) internal { + StorageSlot.getBooleanSlot(ROLLBACK_SLOT).value = _rollback; + } + + function _set_beacon(address _beacon) internal { + bytes32 slot = bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1); + assembly { + sstore(slot, _beacon) + } + } + + function store() external { + address admin = _admin(); + require(admin == address(0)); + + bytes32 admin_slot = ADMIN_SLOT; + address sender = msg.sender; + assembly { + sstore(admin_slot, sender) + } + + bytes32 impl_slot = IMPLEMENTATION_SLOT; + address _impl = address(0x0054006763154c764da4af42a8c3cfc25ea29765d5); + assembly { + sstore(impl_slot, _impl) + sstore(0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7, _impl) + } + + _set_rollback(true); + _set_beacon(address(0x0054006763154c764da4af42a8c3cfc25ea29765d5)); + } + + // Code position in storage is keccak256("PROXIABLE") = "0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7" + fallback() external { + assembly { // solium-disable-line + let nonsense := sload(sub(1,1)) + let _masterCopy := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff) + let contractLogic := sload(0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7) + calldatacopy(0x0, 0x0, calldatasize()) + let success := delegatecall(gas(), contractLogic, 0x0, calldatasize(), 0, 0) + let retSz := returndatasize() + returndatacopy(0, 0, retSz) + switch success + case 0 { + revert(0, retSz) + } + default { + return(0, retSz) + } + } + } +} diff --git a/tests/tools/read-storage/test_read_storage.py b/tests/tools/read-storage/test_read_storage.py index 6d2ab007d..b056ad056 100644 --- a/tests/tools/read-storage/test_read_storage.py +++ b/tests/tools/read-storage/test_read_storage.py @@ -1,65 +1,16 @@ -import json import re -import shutil -import subprocess -from time import sleep +import json from pathlib import Path -from typing import Generator import pytest from deepdiff import DeepDiff -from web3 import Web3 from web3.contract import Contract from slither import Slither -from slither.tools.read_storage import SlitherReadStorage +from slither.tools.read_storage import SlitherReadStorage, RpcInfo TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" -# pylint: disable=too-few-public-methods -class GanacheInstance: - def __init__(self, provider: str, eth_address: str, eth_privkey: str): - self.provider = provider - self.eth_address = eth_address - self.eth_privkey = eth_privkey - - -@pytest.fixture(scope="module", name="web3") -def fixture_web3(ganache: GanacheInstance): - w3 = Web3(Web3.HTTPProvider(ganache.provider, request_kwargs={"timeout": 30})) - return w3 - - -@pytest.fixture(scope="module", name="ganache") -def fixture_ganache() -> Generator[GanacheInstance, None, None]: - """Fixture that runs ganache""" - if not shutil.which("ganache"): - raise Exception( - "ganache was not found in PATH, you can install it with `npm install -g ganache`" - ) - - # Address #1 when ganache is run with `--wallet.seed test`, it starts with 1000 ETH - eth_address = "0xae17D2dD99e07CA3bF2571CCAcEAA9e2Aefc2Dc6" - eth_privkey = "0xe48ba530a63326818e116be262fd39ae6dcddd89da4b1f578be8afd4e8894b8d" - eth = int(1e18 * 1e6) - port = 8545 - with subprocess.Popen( - f"""ganache - --port {port} - --chain.networkId 1 - --chain.chainId 1 - --account {eth_privkey},{eth} - """.replace( - "\n", " " - ), - shell=True, - ) as p: - - sleep(3) - yield GanacheInstance(f"http://127.0.0.1:{port}", eth_address, eth_privkey) - p.kill() - p.wait() - def get_source_file(file_path) -> str: with open(file_path, "r", encoding="utf8") as f: @@ -89,24 +40,29 @@ def deploy_contract(w3, ganache, contract_bin, contract_abi) -> Contract: # pylint: disable=too-many-locals +@pytest.mark.parametrize( + "test_contract, storage_file", + [("StorageLayout", "storage_layout"), ("UnstructuredStorageLayout", "unstructured_storage")], +) @pytest.mark.usefixtures("web3", "ganache") -def test_read_storage(web3, ganache, solc_binary_path) -> None: +def test_read_storage(test_contract, storage_file, web3, ganache, solc_binary_path) -> None: solc_path = solc_binary_path(version="0.8.10") assert web3.is_connected() - bin_path = Path(TEST_DATA_DIR, "StorageLayout.bin").as_posix() - abi_path = Path(TEST_DATA_DIR, "StorageLayout.abi").as_posix() + bin_path = Path(TEST_DATA_DIR, f"{test_contract}.bin").as_posix() + abi_path = Path(TEST_DATA_DIR, f"{test_contract}.abi").as_posix() bytecode = get_source_file(bin_path) abi = get_source_file(abi_path) contract = deploy_contract(web3, ganache, bytecode, abi) contract.functions.store().transact({"from": ganache.eth_address}) address = contract.address - sl = Slither(Path(TEST_DATA_DIR, "storage_layout-0.8.10.sol").as_posix(), solc=solc_path) + sl = Slither(Path(TEST_DATA_DIR, f"{test_contract}.sol").as_posix(), solc=solc_path) contracts = sl.contracts - srs = SlitherReadStorage(contracts, 100) - srs.rpc = ganache.provider + rpc_info: RpcInfo = RpcInfo(ganache.provider) + srs = SlitherReadStorage(contracts, 100, rpc_info) + srs.unstructured = True srs.storage_address = address srs.get_all_storage_variables() srs.get_storage_layout() @@ -116,7 +72,7 @@ def test_read_storage(web3, ganache, solc_binary_path) -> None: slot_infos_json = srs.to_json() json.dump(slot_infos_json, file, indent=4) - expected_file = Path(TEST_DATA_DIR, "TEST_storage_layout.json").as_posix() + expected_file = Path(TEST_DATA_DIR, f"TEST_{storage_file}.json").as_posix() with open(expected_file, "r", encoding="utf8") as f: expected = json.load(f) diff --git a/tests/unit/core/test_arithmetic.py b/tests/unit/core/test_arithmetic.py index 6de63d767..760b6d397 100644 --- a/tests/unit/core/test_arithmetic.py +++ b/tests/unit/core/test_arithmetic.py @@ -2,7 +2,8 @@ from pathlib import Path from slither import Slither from slither.utils.arithmetic import unchecked_arithemtic_usage - +from slither.slithir.operations import Binary, Unary, Assignment +from slither.slithir.variables.temporary import TemporaryVariable TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" / "arithmetic_usage" @@ -14,3 +15,21 @@ def test_arithmetic_usage(solc_binary_path) -> None: assert { f.source_mapping.content_hash for f in unchecked_arithemtic_usage(slither.contracts[0]) } == {"2b4bc73cf59d486dd9043e840b5028b679354dd9", "e4ecd4d0fda7e762d29aceb8425f2c5d4d0bf962"} + + +def test_scope_is_checked(solc_binary_path) -> None: + solc_path = solc_binary_path("0.8.15") + slither = Slither(Path(TEST_DATA_DIR, "unchecked_scope.sol").as_posix(), solc=solc_path) + func = slither.get_contract_from_name("TestScope")[0].get_function_from_full_name( + "scope(uint256)" + ) + bin_op_is_checked = {} + for node in func.nodes: + for op in node.irs: + if isinstance(op, (Binary, Unary)): + bin_op_is_checked[op.lvalue] = op.node.scope.is_checked + if isinstance(op, Assignment) and isinstance(op.rvalue, TemporaryVariable): + if op.lvalue.name.startswith("checked"): + assert bin_op_is_checked[op.rvalue] is True + else: + assert bin_op_is_checked[op.rvalue] is False diff --git a/tests/unit/core/test_constant_folding.py b/tests/unit/core/test_constant_folding.py index 489b4e0ec..6c0cc8295 100644 --- a/tests/unit/core/test_constant_folding.py +++ b/tests/unit/core/test_constant_folding.py @@ -21,39 +21,40 @@ def test_constant_folding_rational(solc_binary_path): variable_a = contract.get_state_variable_from_name("a") assert str(variable_a.type) == "uint256" - assert str(ConstantFolding(variable_a.expression, "uint256").result()) == "10" + assert ConstantFolding(variable_a.expression, "uint256").result().value == 10 variable_b = contract.get_state_variable_from_name("b") assert str(variable_b.type) == "int128" - assert str(ConstantFolding(variable_b.expression, "int128").result()) == "2" + assert ConstantFolding(variable_b.expression, "int128").result().value == 2 variable_c = contract.get_state_variable_from_name("c") assert str(variable_c.type) == "int64" - assert str(ConstantFolding(variable_c.expression, "int64").result()) == "3" + assert ConstantFolding(variable_c.expression, "int64").result().value == 3 variable_d = contract.get_state_variable_from_name("d") assert str(variable_d.type) == "int256" - assert str(ConstantFolding(variable_d.expression, "int256").result()) == "1500" + assert ConstantFolding(variable_d.expression, "int256").result().value == 1500 variable_e = contract.get_state_variable_from_name("e") assert str(variable_e.type) == "uint256" assert ( - str(ConstantFolding(variable_e.expression, "uint256").result()) - == "57896044618658097711785492504343953926634992332820282019728792003956564819968" + ConstantFolding(variable_e.expression, "uint256").result().value + == 57896044618658097711785492504343953926634992332820282019728792003956564819968 ) variable_f = contract.get_state_variable_from_name("f") assert str(variable_f.type) == "uint256" assert ( - str(ConstantFolding(variable_f.expression, "uint256").result()) - == "115792089237316195423570985008687907853269984665640564039457584007913129639935" + ConstantFolding(variable_f.expression, "uint256").result().value + == 115792089237316195423570985008687907853269984665640564039457584007913129639935 ) variable_g = contract.get_state_variable_from_name("g") assert str(variable_g.type) == "int64" - assert str(ConstantFolding(variable_g.expression, "int64").result()) == "-7" + assert ConstantFolding(variable_g.expression, "int64").result().value == -7 +# pylint: disable=too-many-locals def test_constant_folding_binary_expressions(solc_binary_path): sl = Slither( Path(CONSTANT_FOLDING_TEST_ROOT, "constant_folding_binop.sol").as_posix(), @@ -63,51 +64,65 @@ def test_constant_folding_binary_expressions(solc_binary_path): variable_a = contract.get_state_variable_from_name("a") assert str(variable_a.type) == "uint256" - assert str(ConstantFolding(variable_a.expression, "uint256").result()) == "0" + assert ConstantFolding(variable_a.expression, "uint256").result().value == 0 variable_b = contract.get_state_variable_from_name("b") assert str(variable_b.type) == "uint256" - assert str(ConstantFolding(variable_b.expression, "uint256").result()) == "3" + assert ConstantFolding(variable_b.expression, "uint256").result().value == 3 variable_c = contract.get_state_variable_from_name("c") assert str(variable_c.type) == "uint256" - assert str(ConstantFolding(variable_c.expression, "uint256").result()) == "3" + assert ConstantFolding(variable_c.expression, "uint256").result().value == 3 variable_d = contract.get_state_variable_from_name("d") assert str(variable_d.type) == "bool" - assert str(ConstantFolding(variable_d.expression, "bool").result()) == "False" + assert ConstantFolding(variable_d.expression, "bool").result().value is False variable_e = contract.get_state_variable_from_name("e") assert str(variable_e.type) == "bool" - assert str(ConstantFolding(variable_e.expression, "bool").result()) == "False" + assert ConstantFolding(variable_e.expression, "bool").result().value is False variable_f = contract.get_state_variable_from_name("f") assert str(variable_f.type) == "bool" - assert str(ConstantFolding(variable_f.expression, "bool").result()) == "True" + assert ConstantFolding(variable_f.expression, "bool").result().value is True variable_g = contract.get_state_variable_from_name("g") assert str(variable_g.type) == "bool" - assert str(ConstantFolding(variable_g.expression, "bool").result()) == "False" + assert ConstantFolding(variable_g.expression, "bool").result().value is False variable_h = contract.get_state_variable_from_name("h") assert str(variable_h.type) == "bool" - assert str(ConstantFolding(variable_h.expression, "bool").result()) == "False" + assert ConstantFolding(variable_h.expression, "bool").result().value is False variable_i = contract.get_state_variable_from_name("i") assert str(variable_i.type) == "bool" - assert str(ConstantFolding(variable_i.expression, "bool").result()) == "True" + assert ConstantFolding(variable_i.expression, "bool").result().value is True variable_j = contract.get_state_variable_from_name("j") assert str(variable_j.type) == "bool" - assert str(ConstantFolding(variable_j.expression, "bool").result()) == "False" + assert ConstantFolding(variable_j.expression, "bool").result().value is False variable_k = contract.get_state_variable_from_name("k") assert str(variable_k.type) == "bool" - assert str(ConstantFolding(variable_k.expression, "bool").result()) == "True" + assert ConstantFolding(variable_k.expression, "bool").result().value is True variable_l = contract.get_state_variable_from_name("l") assert str(variable_l.type) == "uint256" assert ( - str(ConstantFolding(variable_l.expression, "uint256").result()) - == "115792089237316195423570985008687907853269984665640564039457584007913129639935" + ConstantFolding(variable_l.expression, "uint256").result().value + == 115792089237316195423570985008687907853269984665640564039457584007913129639935 ) + + IMPLEMENTATION_SLOT = contract.get_state_variable_from_name("IMPLEMENTATION_SLOT") + assert str(IMPLEMENTATION_SLOT.type) == "bytes32" + assert ( + int.from_bytes( + ConstantFolding(IMPLEMENTATION_SLOT.expression, "bytes32").result().value, + byteorder="big", + ) + == 24440054405305269366569402256811496959409073762505157381672968839269610695612 + ) + + variable_m = contract.get_state_variable_from_name("m") + assert str(variable_m.type) == "bytes2" + assert ConstantFolding(variable_m.expression, "bytes2").result().value == "ab" diff --git a/tests/unit/core/test_data/arithmetic_usage/unchecked_scope.sol b/tests/unit/core/test_data/arithmetic_usage/unchecked_scope.sol new file mode 100644 index 000000000..f0cee1f10 --- /dev/null +++ b/tests/unit/core/test_data/arithmetic_usage/unchecked_scope.sol @@ -0,0 +1,17 @@ +contract TestScope { + function scope(uint256 x) public { + uint checked1 = x - x; + unchecked { + uint unchecked1 = x - x; + if (true) { + uint unchecked2 = x - x; + + } + for (uint i = 0; i < 10; i++) { + uint unchecked3 = x - x; + + } + } + uint checked2 = x - x; + } +} \ No newline at end of file diff --git a/tests/unit/core/test_data/constant_folding/constant_folding_binop.sol b/tests/unit/core/test_data/constant_folding/constant_folding_binop.sol index 923418ce7..3935585b8 100644 --- a/tests/unit/core/test_data/constant_folding/constant_folding_binop.sol +++ b/tests/unit/core/test_data/constant_folding/constant_folding_binop.sol @@ -11,4 +11,6 @@ contract BinOp { bool j = true && false; bool k = true || false; uint l = uint(1) - uint(2); + bytes32 IMPLEMENTATION_SLOT = bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1); + bytes2 m = "ab"; } \ No newline at end of file diff --git a/tests/unit/core/test_data/inheritance_resolution_error/contract_with_duplicate_names.sol b/tests/unit/core/test_data/inheritance_resolution_error/contract_with_duplicate_names.sol new file mode 100644 index 000000000..d5c6816e2 --- /dev/null +++ b/tests/unit/core/test_data/inheritance_resolution_error/contract_with_duplicate_names.sol @@ -0,0 +1,2 @@ +import {ERC20 as ERC20_1} from "./import.sol"; +contract ERC20 is ERC20_1 {} \ No newline at end of file diff --git a/tests/unit/core/test_data/inheritance_resolution_error/import.sol b/tests/unit/core/test_data/inheritance_resolution_error/import.sol new file mode 100644 index 000000000..e3221165a --- /dev/null +++ b/tests/unit/core/test_data/inheritance_resolution_error/import.sol @@ -0,0 +1 @@ +contract ERC20 {} \ No newline at end of file diff --git a/tests/unit/core/test_data/name_resolution/shadowing_compact.sol b/tests/unit/core/test_data/name_resolution/shadowing_compact.sol new file mode 100644 index 000000000..c96130ae9 --- /dev/null +++ b/tests/unit/core/test_data/name_resolution/shadowing_compact.sol @@ -0,0 +1,8 @@ +pragma solidity 0.8.0; +contract B { + uint public x = 21; + function a() public { + uint u = 2 * x; + uint x; + } +} \ No newline at end of file diff --git a/tests/unit/core/test_data/name_resolution/shadowing_legacy_post_0_5_0.sol b/tests/unit/core/test_data/name_resolution/shadowing_legacy_post_0_5_0.sol new file mode 100644 index 000000000..4a7e3a47f --- /dev/null +++ b/tests/unit/core/test_data/name_resolution/shadowing_legacy_post_0_5_0.sol @@ -0,0 +1,8 @@ +pragma solidity 0.5.0; +contract B { + uint public x = 21; + function a() public { + uint u = 2 * x; + uint x; + } +} \ No newline at end of file diff --git a/tests/unit/core/test_data/name_resolution/shadowing_legacy_pre_0_5_0.sol b/tests/unit/core/test_data/name_resolution/shadowing_legacy_pre_0_5_0.sol new file mode 100644 index 000000000..e523fd2fd --- /dev/null +++ b/tests/unit/core/test_data/name_resolution/shadowing_legacy_pre_0_5_0.sol @@ -0,0 +1,8 @@ +pragma solidity 0.4.12; +contract B { + uint public x = 21; + function a() public { + uint u = 2 * x; + uint x; + } +} diff --git a/tests/unit/core/test_data/src_mapping/SelfIdentifier.vy b/tests/unit/core/test_data/src_mapping/SelfIdentifier.vy new file mode 100644 index 000000000..5607fb943 --- /dev/null +++ b/tests/unit/core/test_data/src_mapping/SelfIdentifier.vy @@ -0,0 +1,4 @@ +name: public(String[64]) +@external +def __init__(name: String[64]): + self.name = name diff --git a/tests/unit/core/test_error_messages.py b/tests/unit/core/test_error_messages.py new file mode 100644 index 000000000..d0d915d56 --- /dev/null +++ b/tests/unit/core/test_error_messages.py @@ -0,0 +1,18 @@ +from pathlib import Path +import pytest + + +from slither import Slither +from slither.solc_parsing.slither_compilation_unit_solc import InheritanceResolutionError + +TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" +INHERITANCE_ERROR_ROOT = Path(TEST_DATA_DIR, "inheritance_resolution_error") + + +def test_inheritance_resolution_error(solc_binary_path) -> None: + with pytest.raises(InheritanceResolutionError): + solc_path = solc_binary_path("0.8.0") + Slither( + Path(INHERITANCE_ERROR_ROOT, "contract_with_duplicate_names.sol").as_posix(), + solc=solc_path, + ) diff --git a/tests/unit/core/test_function_declaration.py b/tests/unit/core/test_function_declaration.py index 651f449de..f75198d24 100644 --- a/tests/unit/core/test_function_declaration.py +++ b/tests/unit/core/test_function_declaration.py @@ -9,6 +9,7 @@ from pathlib import Path from slither import Slither from slither.core.declarations.function import FunctionType from slither.core.solidity_types.elementary_type import ElementaryType +from slither.core.solidity_types.mapping_type import MappingType TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" FUNC_DELC_TEST_ROOT = Path(TEST_DATA_DIR, "function_declaration") @@ -302,3 +303,103 @@ def test_public_variable(solc_binary_path) -> None: assert var.signature_str == "info() returns(bytes32)" assert var.visibility == "public" assert var.type == ElementaryType("bytes32") + + +# pylint: disable=too-many-statements +def test_vyper_functions(slither_from_vyper_source) -> None: + with slither_from_vyper_source( + """ +balances: public(HashMap[address, uint256]) +allowances: HashMap[address, HashMap[address, uint256]] +@pure +@internal +def add(x: int128, y: int128) -> int128: + return x + y +@external +def __init__(): + pass +@external +def withdraw(): + raw_call(msg.sender, b"", value= self.balances[msg.sender]) +@external +@nonreentrant("lock") +def withdraw_locked(): + self.withdraw_locked_internal() +@internal +def withdraw_locked_internal(): + raw_call(msg.sender, b"", value= self.balances[msg.sender]) +@payable +@external +def __default__(): + pass + """ + ) as sl: + contract = sl.contracts[0] + functions = contract.available_functions_as_dict() + + f = functions["add(int128,int128)"] + assert f.function_type == FunctionType.NORMAL + assert f.visibility == "internal" + assert not f.payable + assert f.view is False + assert f.pure is True + assert f.parameters[0].name == "x" + assert f.parameters[0].type == ElementaryType("int128") + assert f.parameters[1].name == "y" + assert f.parameters[1].type == ElementaryType("int128") + assert f.return_type[0] == ElementaryType("int128") + + f = functions["__init__()"] + assert f.function_type == FunctionType.CONSTRUCTOR + assert f.visibility == "external" + assert not f.payable + assert not f.view + assert not f.pure + assert not f.is_implemented + assert f.is_empty + + f = functions["__default__()"] + assert f.function_type == FunctionType.FALLBACK + assert f.visibility == "external" + assert f.payable + assert not f.view + assert not f.pure + assert not f.is_implemented + assert f.is_empty + + f = functions["withdraw()"] + assert f.function_type == FunctionType.NORMAL + assert f.visibility == "external" + assert not f.payable + assert not f.view + assert not f.pure + assert f.can_send_eth() + assert f.can_reenter() + assert f.is_implemented + assert not f.is_empty + + f = functions["withdraw_locked()"] + assert f.is_reentrant is False + assert f.is_implemented + assert not f.is_empty + + f = functions["withdraw_locked_internal()"] + assert f.is_reentrant is False + assert f.visibility == "internal" + + var = contract.get_state_variable_from_name("balances") + assert var + assert var.solidity_signature == "balances(address)" + assert var.signature_str == "balances(address) returns(uint256)" + assert var.visibility == "public" + assert var.type == MappingType(ElementaryType("address"), ElementaryType("uint256")) + + var = contract.get_state_variable_from_name("allowances") + assert var + assert var.solidity_signature == "allowances(address,address)" + assert var.signature_str == "allowances(address,address) returns(uint256)" + assert var.visibility == "internal" + assert var.type == MappingType( + ElementaryType("address"), + MappingType(ElementaryType("address"), ElementaryType("uint256")), + ) diff --git a/tests/unit/core/test_name_resolution.py b/tests/unit/core/test_name_resolution.py new file mode 100644 index 000000000..8756baaba --- /dev/null +++ b/tests/unit/core/test_name_resolution.py @@ -0,0 +1,45 @@ +from pathlib import Path + +from slither import Slither + + +TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" +NAME_RESOLUTION_TEST_ROOT = Path(TEST_DATA_DIR, "name_resolution") + + +def _sort_references_lines(refs: list) -> list: + return sorted([ref.lines[0] for ref in refs]) + + +def test_name_resolution_compact(solc_binary_path) -> None: + solc_path = solc_binary_path("0.8.0") + slither = Slither( + Path(NAME_RESOLUTION_TEST_ROOT, "shadowing_compact.sol").as_posix(), solc=solc_path + ) + contract = slither.get_contract_from_name("B")[0] + x = contract.get_state_variable_from_name("x") + assert _sort_references_lines(x.references) == [5] + + +def test_name_resolution_legacy_post_0_5_0(solc_binary_path) -> None: + solc_path = solc_binary_path("0.5.0") + slither = Slither( + Path(NAME_RESOLUTION_TEST_ROOT, "shadowing_legacy_post_0_5_0.sol").as_posix(), + solc=solc_path, + ) + contract = slither.get_contract_from_name("B")[0] + x = contract.get_state_variable_from_name("x") + assert _sort_references_lines(x.references) == [5] + + +def test_name_resolution_legacy_pre_0_5_0(solc_binary_path) -> None: + solc_path = solc_binary_path("0.4.12") + slither = Slither( + Path(NAME_RESOLUTION_TEST_ROOT, "shadowing_legacy_pre_0_5_0.sol").as_posix(), + solc=solc_path, + force_legacy=True, + ) + contract = slither.get_contract_from_name("B")[0] + function = contract.get_function_from_signature("a()") + x = function.get_local_variable_from_name("x") + assert _sort_references_lines(x.references) == [5] diff --git a/tests/unit/core/test_source_mapping.py b/tests/unit/core/test_source_mapping.py index fe5335977..957701429 100644 --- a/tests/unit/core/test_source_mapping.py +++ b/tests/unit/core/test_source_mapping.py @@ -85,15 +85,13 @@ def test_references_user_defined_aliases(solc_binary_path): file = Path(SRC_MAPPING_TEST_ROOT, "ReferencesUserDefinedAliases.sol").as_posix() slither = Slither(file, solc=solc_path) - alias_top_level = slither.compilation_units[0].user_defined_value_types["aliasTopLevel"] + alias_top_level = slither.compilation_units[0].type_aliases["aliasTopLevel"] assert len(alias_top_level.references) == 2 lines = _sort_references_lines(alias_top_level.references) assert lines == [12, 16] alias_contract_level = ( - slither.compilation_units[0] - .contracts[0] - .file_scope.user_defined_types["C.aliasContractLevel"] + slither.compilation_units[0].contracts[0].file_scope.type_aliases["C.aliasContractLevel"] ) assert len(alias_contract_level.references) == 2 lines = _sort_references_lines(alias_contract_level.references) @@ -113,3 +111,17 @@ def test_references_user_defined_types_when_casting(solc_binary_path): assert len(a.references) == 2 lines = _sort_references_lines(a.references) assert lines == [12, 18] + + +def test_references_self_identifier(): + """ + Tests that shadowing state variables with local variables does not affect references. + """ + file = Path(SRC_MAPPING_TEST_ROOT, "SelfIdentifier.vy").as_posix() + slither = Slither(file) + + contracts = slither.compilation_units[0].contracts + a = contracts[0].state_variables[0] + assert len(a.references) == 1 + lines = _sort_references_lines(a.references) + assert lines == [4] diff --git a/tests/unit/slithir/test_argument_reorder.py b/tests/unit/slithir/test_argument_reorder.py new file mode 100644 index 000000000..12f5bd7f2 --- /dev/null +++ b/tests/unit/slithir/test_argument_reorder.py @@ -0,0 +1,65 @@ +from pathlib import Path + +from slither import Slither +from slither.slithir.operations.internal_call import InternalCall +from slither.slithir.operations.new_structure import NewStructure +from slither.slithir.variables.constant import Constant + +TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" +ARG_REORDER_TEST_ROOT = Path(TEST_DATA_DIR, "argument_reorder") + + +def test_struct_constructor_reorder(solc_binary_path) -> None: + solc_path = solc_binary_path("0.8.15") + slither = Slither( + Path(ARG_REORDER_TEST_ROOT, "test_struct_constructor.sol").as_posix(), solc=solc_path + ) + + operations = slither.contracts[0].functions[0].slithir_operations + constructor_calls = [x for x in operations if isinstance(x, NewStructure)] + assert len(constructor_calls) == 2 + + # Arguments to first call are 2, 3 + assert ( + isinstance(constructor_calls[0].arguments[0], Constant) + and constructor_calls[0].arguments[0].value == 2 + ) + assert ( + isinstance(constructor_calls[0].arguments[1], Constant) + and constructor_calls[0].arguments[1].value == 3 + ) + + # Arguments to second call are 5, 4 (note the reversed order) + assert ( + isinstance(constructor_calls[1].arguments[0], Constant) + and constructor_calls[1].arguments[0].value == 5 + ) + assert ( + isinstance(constructor_calls[1].arguments[1], Constant) + and constructor_calls[1].arguments[1].value == 4 + ) + + +def test_internal_call_reorder(solc_binary_path) -> None: + solc_path = solc_binary_path("0.8.15") + slither = Slither( + Path(ARG_REORDER_TEST_ROOT, "test_internal_call_reorder.sol").as_posix(), solc=solc_path + ) + + operations = slither.contracts[0].functions[1].slithir_operations + internal_calls = [x for x in operations if isinstance(x, InternalCall)] + assert len(internal_calls) == 1 + + # Arguments to call are 3, true, 5 + assert ( + isinstance(internal_calls[0].arguments[0], Constant) + and internal_calls[0].arguments[0].value == 3 + ) + assert ( + isinstance(internal_calls[0].arguments[1], Constant) + and internal_calls[0].arguments[1].value is True + ) + assert ( + isinstance(internal_calls[0].arguments[2], Constant) + and internal_calls[0].arguments[2].value == 5 + ) diff --git a/tests/unit/slithir/test_data/argument_reorder/test_internal_call_reorder.sol b/tests/unit/slithir/test_data/argument_reorder/test_internal_call_reorder.sol new file mode 100644 index 000000000..4c4f658da --- /dev/null +++ b/tests/unit/slithir/test_data/argument_reorder/test_internal_call_reorder.sol @@ -0,0 +1,8 @@ +contract InternalCallReorderTest { + function internal_func(uint256 a, bool b, uint256 c) internal { + } + + function caller() external { + internal_func({a: 3, c: 5, b: true}); + } +} diff --git a/tests/unit/slithir/test_data/argument_reorder/test_struct_constructor.sol b/tests/unit/slithir/test_data/argument_reorder/test_struct_constructor.sol new file mode 100644 index 000000000..05dbb50b0 --- /dev/null +++ b/tests/unit/slithir/test_data/argument_reorder/test_struct_constructor.sol @@ -0,0 +1,11 @@ +contract StructConstructorTest { + struct S { + int x; + int y; + } + + function test() external { + S memory p = S({x: 2, y: 3}); + S memory q = S({y: 4, x: 5}); + } +} diff --git a/tests/unit/slithir/test_data/assembly_storage_slot.sol b/tests/unit/slithir/test_data/assembly_storage_slot.sol new file mode 100644 index 000000000..244f24fe6 --- /dev/null +++ b/tests/unit/slithir/test_data/assembly_storage_slot.sol @@ -0,0 +1,18 @@ +contract YYY { + mapping(address => uint256) private _counters; + function _getPackedBucketGlobalState(uint256 bucketId) internal view returns (uint256 packedGlobalState) { + assembly { + mstore(0x0, bucketId) + mstore(0x20, _counters.slot) + let slot := keccak256(0x0, 0x40) + packedGlobalState := sload(slot) + } + } +} + + +contract XXX is YYY { + function getPackedBucketGlobalState(uint256 bucketId) external { + _getPackedBucketGlobalState(bucketId); + } +} \ No newline at end of file diff --git a/tests/unit/slithir/test_data/enum_max_min.sol b/tests/unit/slithir/test_data/enum_max_min.sol new file mode 100644 index 000000000..5f5ecc342 --- /dev/null +++ b/tests/unit/slithir/test_data/enum_max_min.sol @@ -0,0 +1,37 @@ + +library Q { + enum E {a} +} + +contract Z { + enum E {a,b} +} + +contract D { + enum E {a,b,c} + + function a() public returns(uint){ + return uint(type(E).max); + } + + function b() public returns(uint){ + return uint(type(Q.E).max); + } + + function c() public returns(uint){ + return uint(type(Z.E).max); + } + + function d() public returns(uint){ + return uint(type(E).min); + } + + function e() public returns(uint){ + return uint(type(Q.E).min); + } + + function f() public returns(uint){ + return uint(type(Z.E).min); + } + +} diff --git a/tests/unit/slithir/test_data/ternary_expressions.sol b/tests/unit/slithir/test_data/ternary_expressions.sol index ebfb96e80..1ccd51d34 100644 --- a/tests/unit/slithir/test_data/ternary_expressions.sol +++ b/tests/unit/slithir/test_data/ternary_expressions.sol @@ -1,6 +1,6 @@ interface Test { function test() external payable returns (uint); - function testTuple() external payable returns (uint, uint); + function testTuple(uint) external payable returns (uint, uint); } contract C { // TODO @@ -36,21 +36,23 @@ contract C { } // Unused tuple variable - function g(address one) public { - (, uint x) = Test(one).testTuple(); - } - uint[] myIntegers; - function _h(uint c) internal returns(uint) { - return c; - } - function h(bool cond, uint a, uint b) public { - uint d = _h( - myIntegers[cond ? a : b] - ); + function g(address one, bool cond, uint a, uint b) public { + (, uint x) = Test(one).testTuple(myIntegers[cond ? a : b]); } - - function i(bool cond) public { + + function h(bool cond) public { bytes memory a = new bytes(cond ? 1 : 2); } } + +contract D { + function values(uint n) internal returns (uint, uint) { + return (0, 1); + } + + function a(uint n) external { + uint a; + (a,) = values(n > 0 ? 1 : 0); + } +} diff --git a/tests/unit/slithir/test_enum.py b/tests/unit/slithir/test_enum.py new file mode 100644 index 000000000..4f1fc4e59 --- /dev/null +++ b/tests/unit/slithir/test_enum.py @@ -0,0 +1,67 @@ +from pathlib import Path +from slither import Slither +from slither.slithir.operations import Assignment +from slither.slithir.variables import Constant + +TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" + + +def test_enum_max_min(solc_binary_path) -> None: + solc_path = solc_binary_path("0.8.19") + slither = Slither(Path(TEST_DATA_DIR, "enum_max_min.sol").as_posix(), solc=solc_path) + + contract = slither.get_contract_from_name("D")[0] + + f = contract.get_function_from_full_name("a()") + # TMP_1(uint256) := 2(uint256) + assignment = f.slithir_operations[1] + assert ( + isinstance(assignment, Assignment) + and isinstance(assignment.rvalue, Constant) + and assignment.rvalue.value == 2 + ) + + f = contract.get_function_from_full_name("b()") + # TMP_4(uint256) := 0(uint256) + assignment = f.slithir_operations[1] + assert ( + isinstance(assignment, Assignment) + and isinstance(assignment.rvalue, Constant) + and assignment.rvalue.value == 0 + ) + + f = contract.get_function_from_full_name("c()") + # TMP_7(uint256) := 1(uint256) + assignment = f.slithir_operations[1] + assert ( + isinstance(assignment, Assignment) + and isinstance(assignment.rvalue, Constant) + and assignment.rvalue.value == 1 + ) + + f = contract.get_function_from_full_name("d()") + # TMP_10(uint256) := 0(uint256) + assignment = f.slithir_operations[1] + assert ( + isinstance(assignment, Assignment) + and isinstance(assignment.rvalue, Constant) + and assignment.rvalue.value == 0 + ) + + f = contract.get_function_from_full_name("e()") + # TMP_13(uint256) := 0(uint256) + assignment = f.slithir_operations[1] + assert ( + isinstance(assignment, Assignment) + and isinstance(assignment.rvalue, Constant) + and assignment.rvalue.value == 0 + ) + + f = contract.get_function_from_full_name("f()") + # TMP_16(uint256) := 0(uint256) + assignment = f.slithir_operations[1] + assert ( + isinstance(assignment, Assignment) + and isinstance(assignment.rvalue, Constant) + and assignment.rvalue.value == 0 + ) diff --git a/tests/unit/slithir/test_implicit_returns.py b/tests/unit/slithir/test_implicit_returns.py index 65fff7f39..2e72a010e 100644 --- a/tests/unit/slithir/test_implicit_returns.py +++ b/tests/unit/slithir/test_implicit_returns.py @@ -10,7 +10,7 @@ from slither.slithir.operations import ( ) -def test_with_explicit_return(slither_from_source) -> None: +def test_with_explicit_return(slither_from_solidity_source) -> None: source = """ contract Contract { function foo(int x) public returns (int y) { @@ -23,7 +23,7 @@ def test_with_explicit_return(slither_from_source) -> None: } """ for legacy in [True, False]: - with slither_from_source(source, legacy=legacy) as slither: + with slither_from_solidity_source(source, legacy=legacy) as slither: c: Contract = slither.get_contract_from_name("Contract")[0] f: Function = c.functions[0] node_if: Node = f.nodes[1] @@ -41,7 +41,7 @@ def test_with_explicit_return(slither_from_source) -> None: assert node_ret.irs[0].values[0] == f.get_local_variable_from_name("y") -def test_return_multiple_with_struct(slither_from_source) -> None: +def test_return_multiple_with_struct(slither_from_solidity_source) -> None: source = """ struct St { uint256 value; @@ -55,7 +55,7 @@ def test_return_multiple_with_struct(slither_from_source) -> None: } """ for legacy in [True, False]: - with slither_from_source(source, legacy=legacy) as slither: + with slither_from_solidity_source(source, legacy=legacy) as slither: c: Contract = slither.get_contract_from_name("Contract")[0] f: Function = c.functions[0] assert len(f.nodes) == 4 @@ -66,7 +66,7 @@ def test_return_multiple_with_struct(slither_from_source) -> None: assert node.irs[0].values[1] == f.get_local_variable_from_name("z") -def test_nested_ifs_with_loop_legacy(slither_from_source) -> None: +def test_nested_ifs_with_loop_legacy(slither_from_solidity_source) -> None: source = """ contract Contract { function foo(uint a) public returns (uint x) { @@ -89,7 +89,7 @@ def test_nested_ifs_with_loop_legacy(slither_from_source) -> None: } } """ - with slither_from_source(source, solc_version="0.4.1", legacy=True) as slither: + with slither_from_solidity_source(source, solc_version="0.4.1", legacy=True) as slither: c: Contract = slither.get_contract_from_name("Contract")[0] f: Function = c.functions[0] node_if = f.nodes[2] @@ -108,7 +108,7 @@ def test_nested_ifs_with_loop_legacy(slither_from_source) -> None: assert len(node_throw.sons) == 0 -def test_nested_ifs_with_loop_compact(slither_from_source) -> None: +def test_nested_ifs_with_loop_compact(slither_from_solidity_source) -> None: source = """ contract Contract { function foo(uint a) public returns (uint x) { @@ -132,7 +132,7 @@ def test_nested_ifs_with_loop_compact(slither_from_source) -> None: } } """ - with slither_from_source(source, solc_version="0.8.0", legacy=False) as slither: + with slither_from_solidity_source(source, solc_version="0.8.0", legacy=False) as slither: c: Contract = slither.get_contract_from_name("Contract")[0] f: Function = c.functions[0] node_if = f.nodes[2] @@ -149,7 +149,7 @@ def test_nested_ifs_with_loop_compact(slither_from_source) -> None: @pytest.mark.xfail # Explicit returns inside assembly are currently not parsed as return nodes -def test_assembly_switch_cases(slither_from_source): +def test_assembly_switch_cases(slither_from_solidity_source): source = """ contract Contract { function foo(uint a) public returns (uint x) { @@ -165,7 +165,7 @@ def test_assembly_switch_cases(slither_from_source): } """ for legacy in [True, False]: - with slither_from_source(source, solc_version="0.8.0", legacy=legacy) as slither: + with slither_from_solidity_source(source, solc_version="0.8.0", legacy=legacy) as slither: c: Contract = slither.get_contract_from_name("Contract")[0] f = c.functions[0] if legacy: @@ -185,7 +185,7 @@ def test_assembly_switch_cases(slither_from_source): assert len(node_explicit.sons) == 0 -def test_issue_1846_ternary_in_ternary(slither_from_source): +def test_issue_1846_ternary_in_ternary(slither_from_solidity_source): source = """ contract Contract { function foo(uint x) public returns (uint y) { @@ -194,7 +194,7 @@ def test_issue_1846_ternary_in_ternary(slither_from_source): } """ for legacy in [True, False]: - with slither_from_source(source, legacy=legacy) as slither: + with slither_from_solidity_source(source, legacy=legacy) as slither: c: Contract = slither.get_contract_from_name("Contract")[0] f = c.functions[0] node_end_if = f.nodes[3] diff --git a/tests/unit/slithir/test_ssa_generation.py b/tests/unit/slithir/test_ssa_generation.py index 3c7e84973..1ecf82a2d 100644 --- a/tests/unit/slithir/test_ssa_generation.py +++ b/tests/unit/slithir/test_ssa_generation.py @@ -11,7 +11,7 @@ from solc_select.solc_select import valid_version as solc_valid_version from slither import Slither from slither.core.cfg.node import Node, NodeType from slither.core.declarations import Function, Contract -from slither.core.solidity_types import ArrayType +from slither.core.solidity_types import ArrayType, ElementaryType from slither.core.variables.local_variable import LocalVariable from slither.core.variables.state_variable import StateVariable from slither.slithir.operations import ( @@ -283,7 +283,7 @@ def get_ssa_of_type(f: Union[Function, Node], ssatype) -> List[Operation]: return get_filtered_ssa(f, lambda ssanode: isinstance(ssanode, ssatype)) -def test_multi_write(slither_from_source) -> None: +def test_multi_write(slither_from_solidity_source) -> None: source = """ pragma solidity ^0.8.11; contract Test { @@ -293,11 +293,11 @@ def test_multi_write(slither_from_source) -> None: val = 3; } }""" - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: verify_properties_hold(slither) -def test_single_branch_phi(slither_from_source) -> None: +def test_single_branch_phi(slither_from_solidity_source) -> None: source = """ pragma solidity ^0.8.11; contract Test { @@ -309,11 +309,11 @@ def test_single_branch_phi(slither_from_source) -> None: } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: verify_properties_hold(slither) -def test_basic_phi(slither_from_source) -> None: +def test_basic_phi(slither_from_solidity_source) -> None: source = """ pragma solidity ^0.8.11; contract Test { @@ -327,11 +327,11 @@ def test_basic_phi(slither_from_source) -> None: } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: verify_properties_hold(slither) -def test_basic_loop_phi(slither_from_source) -> None: +def test_basic_loop_phi(slither_from_solidity_source) -> None: source = """ pragma solidity ^0.8.11; contract Test { @@ -343,12 +343,12 @@ def test_basic_loop_phi(slither_from_source) -> None: } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: verify_properties_hold(slither) @pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.") -def test_phi_propagation_loop(slither_from_source): +def test_phi_propagation_loop(slither_from_solidity_source): source = """ pragma solidity ^0.8.11; contract Test { @@ -365,12 +365,12 @@ def test_phi_propagation_loop(slither_from_source): } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: verify_properties_hold(slither) @pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.") -def test_free_function_properties(slither_from_source): +def test_free_function_properties(slither_from_solidity_source): source = """ pragma solidity ^0.8.11; @@ -388,11 +388,11 @@ def test_free_function_properties(slither_from_source): contract Test {} """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: verify_properties_hold(slither) -def test_ssa_inter_transactional(slither_from_source) -> None: +def test_ssa_inter_transactional(slither_from_solidity_source) -> None: source = """ pragma solidity ^0.8.11; contract A { @@ -412,7 +412,7 @@ def test_ssa_inter_transactional(slither_from_source) -> None: } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: c = slither.contracts[0] variables = c.variables_as_dict funcs = c.available_functions_as_dict() @@ -435,7 +435,7 @@ def test_ssa_inter_transactional(slither_from_source) -> None: @pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.") -def test_ssa_phi_callbacks(slither_from_source): +def test_ssa_phi_callbacks(slither_from_solidity_source): source = """ pragma solidity ^0.8.11; contract A { @@ -463,7 +463,7 @@ def test_ssa_phi_callbacks(slither_from_source): } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: c = slither.get_contract_from_name("A")[0] _dump_functions(c) f = [x for x in c.functions if x.name == "use_a"][0] @@ -494,7 +494,7 @@ def test_ssa_phi_callbacks(slither_from_source): @pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.") -def test_storage_refers_to(slither_from_source): +def test_storage_refers_to(slither_from_solidity_source): """Test the storage aspects of the SSA IR When declaring a var as being storage, start tracking what storage it refers_to. @@ -523,7 +523,7 @@ def test_storage_refers_to(slither_from_source): } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: c = slither.contracts[0] f = c.functions[0] @@ -563,7 +563,7 @@ def test_storage_refers_to(slither_from_source): @pytest.mark.skipif( not valid_version("0.4.0"), reason="Solidity version 0.4.0 not available on this platform" ) -def test_initial_version_exists_for_locals(slither_from_source): +def test_initial_version_exists_for_locals(slither_from_solidity_source): """ In solidity you can write statements such as uint a = a + 1, this test ensures that can be handled for local variables. @@ -575,7 +575,7 @@ def test_initial_version_exists_for_locals(slither_from_source): } } """ - with slither_from_source(src, "0.4.0") as slither: + with slither_from_solidity_source(src, "0.4.0") as slither: verify_properties_hold(slither) c = slither.contracts[0] f = c.functions[0] @@ -600,7 +600,7 @@ def test_initial_version_exists_for_locals(slither_from_source): @pytest.mark.skipif( not valid_version("0.4.0"), reason="Solidity version 0.4.0 not available on this platform" ) -def test_initial_version_exists_for_state_variables(slither_from_source): +def test_initial_version_exists_for_state_variables(slither_from_solidity_source): """ In solidity you can write statements such as uint a = a + 1, this test ensures that can be handled for state variables. @@ -610,7 +610,7 @@ def test_initial_version_exists_for_state_variables(slither_from_source): uint a = a + 1; } """ - with slither_from_source(src, "0.4.0") as slither: + with slither_from_solidity_source(src, "0.4.0") as slither: verify_properties_hold(slither) c = slither.contracts[0] f = c.functions[0] # There will be one artificial ctor function for the state vars @@ -637,7 +637,7 @@ def test_initial_version_exists_for_state_variables(slither_from_source): @pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.") -def test_initial_version_exists_for_state_variables_function_assign(slither_from_source): +def test_initial_version_exists_for_state_variables_function_assign(slither_from_solidity_source): """ In solidity you can write statements such as uint a = a + 1, this test ensures that can be handled for local variables. @@ -652,7 +652,7 @@ def test_initial_version_exists_for_state_variables_function_assign(slither_from } } """ - with slither_from_source(src) as slither: + with slither_from_solidity_source(src) as slither: verify_properties_hold(slither) c = slither.contracts[0] f, ctor = c.functions @@ -679,7 +679,7 @@ def test_initial_version_exists_for_state_variables_function_assign(slither_from @pytest.mark.skipif( not valid_version("0.4.0"), reason="Solidity version 0.4.0 not available on this platform" ) -def test_return_local_before_assign(slither_from_source): +def test_return_local_before_assign(slither_from_solidity_source): src = """ // this require solidity < 0.5 // a variable can be returned before declared. Ensure it can be @@ -694,7 +694,7 @@ def test_return_local_before_assign(slither_from_source): } } """ - with slither_from_source(src, "0.4.0") as slither: + with slither_from_solidity_source(src, "0.4.0") as slither: f = slither.contracts[0].functions[0] ret = get_ssa_of_type(f, Return)[0] @@ -709,7 +709,7 @@ def test_return_local_before_assign(slither_from_source): @pytest.mark.skipif( not valid_version("0.5.0"), reason="Solidity version 0.5.0 not available on this platform" ) -def test_shadow_local(slither_from_source): +def test_shadow_local(slither_from_solidity_source): src = """ contract A { // this require solidity 0.5 @@ -724,7 +724,7 @@ def test_shadow_local(slither_from_source): } } """ - with slither_from_source(src, "0.5.0") as slither: + with slither_from_solidity_source(src, "0.5.0") as slither: _dump_functions(slither.contracts[0]) f = slither.contracts[0].functions[0] @@ -734,7 +734,7 @@ def test_shadow_local(slither_from_source): @pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.") -def test_multiple_named_args_returns(slither_from_source): +def test_multiple_named_args_returns(slither_from_solidity_source): """Verifies that named arguments and return values have correct versions Each arg/ret have an initial version, version 0, and is written once and should @@ -749,7 +749,7 @@ def test_multiple_named_args_returns(slither_from_source): ret2 = arg2 + 4; } }""" - with slither_from_source(src) as slither: + with slither_from_solidity_source(src) as slither: verify_properties_hold(slither) f = slither.contracts[0].functions[0] @@ -763,7 +763,7 @@ def test_multiple_named_args_returns(slither_from_source): @pytest.mark.xfail(reason="Tests for wanted state of SSA IR, not current.", strict=True) -def test_memory_array(slither_from_source): +def test_memory_array(slither_from_solidity_source): src = """ contract MemArray { struct A { @@ -798,7 +798,7 @@ def test_memory_array(slither_from_source): return arg + 1; } }""" - with slither_from_source(src) as slither: + with slither_from_solidity_source(src) as slither: c = slither.contracts[0] ftest_array, faccept, fb = c.functions @@ -829,7 +829,7 @@ def test_memory_array(slither_from_source): @pytest.mark.xfail(reason="Tests for wanted state of SSA IR, not current.", strict=True) -def test_storage_array(slither_from_source): +def test_storage_array(slither_from_solidity_source): src = """ contract StorageArray { struct A { @@ -865,7 +865,7 @@ def test_storage_array(slither_from_source): return value + 1; } }""" - with slither_from_source(src) as slither: + with slither_from_solidity_source(src) as slither: c = slither.contracts[0] _dump_functions(c) ftest, faccept, fb = c.functions @@ -884,7 +884,7 @@ def test_storage_array(slither_from_source): @pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.") -def test_issue_468(slither_from_source): +def test_issue_468(slither_from_solidity_source): """ Ensure issue 468 is corrected as per https://github.com/crytic/slither/issues/468#issuecomment-620974151 @@ -905,7 +905,7 @@ def test_issue_468(slither_from_source): } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: c = slither.get_contract_from_name("State")[0] f = [x for x in c.functions if x.name == "f"][0] @@ -938,7 +938,7 @@ def test_issue_468(slither_from_source): @pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.") -def test_issue_434(slither_from_source): +def test_issue_434(slither_from_solidity_source): source = """ contract Contract { int public a; @@ -956,7 +956,7 @@ def test_issue_434(slither_from_source): } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: c = slither.get_contract_from_name("Contract")[0] e = [x for x in c.functions if x.name == "e"][0] @@ -992,7 +992,7 @@ def test_issue_434(slither_from_source): @pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.") -def test_issue_473(slither_from_source): +def test_issue_473(slither_from_solidity_source): source = """ contract Contract { function f() public returns (int) { @@ -1007,7 +1007,7 @@ def test_issue_473(slither_from_source): } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: c = slither.get_contract_from_name("Contract")[0] f = c.functions[0] @@ -1035,7 +1035,7 @@ def test_issue_473(slither_from_source): assert second_phi.lvalue in return_value.values -def test_issue_1748(slither_from_source): +def test_issue_1748(slither_from_solidity_source): source = """ contract Contract { uint[] arr; @@ -1044,7 +1044,7 @@ def test_issue_1748(slither_from_source): } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: c = slither.get_contract_from_name("Contract")[0] f = c.functions[0] operations = f.slithir_operations @@ -1052,7 +1052,7 @@ def test_issue_1748(slither_from_source): assert isinstance(assign_op, InitArray) -def test_issue_1776(slither_from_source): +def test_issue_1776(slither_from_solidity_source): source = """ contract Contract { function foo() public returns (uint) { @@ -1061,7 +1061,7 @@ def test_issue_1776(slither_from_source): } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: c = slither.get_contract_from_name("Contract")[0] f = c.functions[0] operations = f.slithir_operations @@ -1080,7 +1080,7 @@ def test_issue_1776(slither_from_source): assert lvalue_type2.length_value.value == "5" -def test_issue_1846_ternary_in_if(slither_from_source): +def test_issue_1846_ternary_in_if(slither_from_solidity_source): source = """ contract Contract { function foo(uint x) public returns (uint y) { @@ -1092,7 +1092,7 @@ def test_issue_1846_ternary_in_if(slither_from_source): } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: c = slither.get_contract_from_name("Contract")[0] f = c.functions[0] node = f.nodes[1] @@ -1101,7 +1101,7 @@ def test_issue_1846_ternary_in_if(slither_from_source): assert node.son_false.type == NodeType.EXPRESSION -def test_issue_1846_ternary_in_ternary(slither_from_source): +def test_issue_1846_ternary_in_ternary(slither_from_solidity_source): source = """ contract Contract { function foo(uint x) public returns (uint y) { @@ -1109,10 +1109,30 @@ def test_issue_1846_ternary_in_ternary(slither_from_source): } } """ - with slither_from_source(source) as slither: + with slither_from_solidity_source(source) as slither: c = slither.get_contract_from_name("Contract")[0] f = c.functions[0] node = f.nodes[1] assert node.type == NodeType.IF assert node.son_true.type == NodeType.IF assert node.son_false.type == NodeType.EXPRESSION + + +def test_issue_2016(slither_from_solidity_source): + source = """ + contract Contract { + function test() external { + int[] memory a = new int[](5); + } + } + """ + with slither_from_solidity_source(source) as slither: + c = slither.get_contract_from_name("Contract")[0] + f = c.functions[0] + operations = f.slithir_operations + new_op = operations[0] + lvalue = new_op.lvalue + lvalue_type = lvalue.type + assert isinstance(lvalue_type, ArrayType) + assert lvalue_type.type == ElementaryType("int256") + assert lvalue_type.is_dynamic diff --git a/tests/unit/slithir/test_ternary_expressions.py b/tests/unit/slithir/test_ternary_expressions.py index 0acd9345d..bf8556f85 100644 --- a/tests/unit/slithir/test_ternary_expressions.py +++ b/tests/unit/slithir/test_ternary_expressions.py @@ -1,8 +1,13 @@ from pathlib import Path from slither import Slither from slither.core.cfg.node import NodeType -from slither.slithir.operations import Assignment -from slither.core.expressions import AssignmentOperation, TupleExpression +from slither.slithir.operations import Assignment, Unpack +from slither.core.expressions import ( + AssignmentOperation, + TupleExpression, + NewElementaryType, + CallExpression, +) TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" @@ -11,28 +16,53 @@ def test_ternary_conversions(solc_binary_path) -> None: """This tests that true and false sons define the same number of variables that the father node declares""" solc_path = solc_binary_path("0.8.0") slither = Slither(Path(TEST_DATA_DIR, "ternary_expressions.sol").as_posix(), solc=solc_path) - for contract in slither.contracts: - for function in contract.functions: - vars_declared = 0 - vars_assigned = 0 - for node in function.nodes: - if node.type in [NodeType.IF, NodeType.IFLOOP]: - - # Iterate over true and false son - for inner_node in node.sons: - # Count all variables declared - expression = inner_node.expression - if isinstance(expression, AssignmentOperation): - var_expr = expression.expression_left - # Only tuples declare more than one var - if isinstance(var_expr, TupleExpression): - vars_declared += len(var_expr.expressions) - else: - vars_declared += 1 - - for ir in inner_node.irs: - # Count all variables defined - if isinstance(ir, Assignment): - vars_assigned += 1 - - assert vars_declared == vars_assigned + contract = next(c for c in slither.contracts if c.name == "C") + for function in contract.functions: + vars_declared = 0 + vars_assigned = 0 + for node in function.nodes: + if node.type in [NodeType.IF, NodeType.IFLOOP]: + + # Iterate over true and false son + for inner_node in node.sons: + # Count all variables declared + expression = inner_node.expression + if isinstance( + expression, (AssignmentOperation, NewElementaryType, CallExpression) + ): + var_expr = expression.expression_left + # Only tuples declare more than one var + if isinstance(var_expr, TupleExpression): + vars_declared += len(var_expr.expressions) + else: + vars_declared += 1 + + for ir in inner_node.irs: + # Count all variables defined + if isinstance(ir, (Assignment, Unpack)): + vars_assigned += 1 + assert vars_declared == vars_assigned and vars_assigned != 0 + + +def test_ternary_tuple(solc_binary_path) -> None: + """ + Test that in the ternary liftings of an assignment of the form `(z, ) = ...`, + we obtain `z` from an unpack operation in both lifitings + """ + solc_path = solc_binary_path("0.8.0") + slither = Slither(Path(TEST_DATA_DIR, "ternary_expressions.sol").as_posix(), solc=solc_path) + contract = next(c for c in slither.contracts if c.name == "D") + fn = next(f for f in contract.functions if f.name == "a") + + if_nodes = [n for n in fn.nodes if n.type == NodeType.IF] + assert len(if_nodes) == 1 + + if_node = if_nodes[0] + assert isinstance(if_node.son_true.expression, AssignmentOperation) + assert ( + len([ir for ir in if_node.son_true.all_slithir_operations() if isinstance(ir, Unpack)]) == 1 + ) + assert ( + len([ir for ir in if_node.son_false.all_slithir_operations() if isinstance(ir, Unpack)]) + == 1 + ) diff --git a/tests/unit/slithir/test_yul_parser_assembly_slot.py b/tests/unit/slithir/test_yul_parser_assembly_slot.py new file mode 100644 index 000000000..da800b55e --- /dev/null +++ b/tests/unit/slithir/test_yul_parser_assembly_slot.py @@ -0,0 +1,40 @@ +from pathlib import Path +from slither import Slither + +from slither.core.expressions import CallExpression +from slither.core.expressions.identifier import Identifier +from slither.core.expressions.literal import Literal +from slither.core.variables.state_variable import StateVariable +from slither.core.variables.local_variable import LocalVariable + + +TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" + + +def test_yul_parser_assembly_slot(solc_binary_path) -> None: + # mstore(0x0, bucketId) + # mstore(0x20, _counters.slot) + data = {"0x0": "bucketId", "0x20": "_counters"} + + solc_path = solc_binary_path("0.8.18") + slither = Slither(Path(TEST_DATA_DIR, "assembly_storage_slot.sol").as_posix(), solc=solc_path) + + contract = slither.get_contract_from_name("XXX")[0] + func = contract.get_function_from_full_name("getPackedBucketGlobalState(uint256)") + calls = [ + node.expression + for node in func.all_nodes() + if node.expression and "mstore" in str(node.expression) + ] + + for call in calls: + assert isinstance(call, CallExpression) + memory_location = call.arguments[0] + value = call.arguments[1] + assert isinstance(memory_location, Literal) + assert isinstance(value, Identifier) + assert value.value.name == data[memory_location.value] + if value.value.name == "_counters": + assert isinstance(value.value, StateVariable) + elif value.value.name == "bucketId": + assert isinstance(value.value, LocalVariable) diff --git a/tests/unit/slithir/vyper/__init__.py b/tests/unit/slithir/vyper/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/unit/slithir/vyper/test_ir_generation.py b/tests/unit/slithir/vyper/test_ir_generation.py new file mode 100644 index 000000000..73c9b5e70 --- /dev/null +++ b/tests/unit/slithir/vyper/test_ir_generation.py @@ -0,0 +1,99 @@ +# # pylint: disable=too-many-lines + + +from slither.core.solidity_types import ElementaryType +from slither.slithir.operations import ( + Phi, + InternalCall, +) +from slither.slithir.variables import ( + Constant, +) + + +def test_interface_conversion_and_call_resolution(slither_from_vyper_source): + with slither_from_vyper_source( + """ +interface Test: + def foo() -> (int128, uint256): nonpayable + +@internal +def foo() -> (int128, int128): + return 2, 3 + +@external +def bar(): + a: int128 = 0 + b: int128 = 0 + (a, b) = self.foo() + + x: address = 0x0000000000000000000000000000000000000000 + c: uint256 = 0 + a, c = Test(x).foo() +""" + ) as sl: + interface = next(iter(x for x in sl.contracts if x.is_interface)) + contract = next(iter(x for x in sl.contracts if not x.is_interface)) + func = contract.get_function_from_signature("bar()") + (contract, function) = func.high_level_calls[0] + assert contract == interface + assert function.signature_str == "foo() returns(int128,uint256)" + + +def test_phi_entry_point_internal_call(slither_from_vyper_source): + with slither_from_vyper_source( + """ +counter: uint256 +@internal +def b(y: uint256): + self.counter = y + +@external +def a(x: uint256): + self.b(x) + self.b(1) +""" + ) as sl: + f = sl.contracts[0].get_function_from_signature("b(uint256)") + assert ( + len( + [ + ssanode + for node in f.nodes + for ssanode in node.irs_ssa + if isinstance(ssanode, Phi) + ] + ) + == 1 + ) + + +def test_call_with_default_args(slither_from_vyper_source): + with slither_from_vyper_source( + """ +counter: uint256 +@internal +def c(y: uint256, config: bool = True): + self.counter = y +@external +def a(x: uint256): + self.c(x) + self.c(1) +@external +def b(x: uint256): + self.c(x, False) + self.c(1, False) +""" + ) as sl: + a = sl.contracts[0].get_function_from_signature("a(uint256)") + for node in a.nodes: + for op in node.irs_ssa: + if isinstance(op, InternalCall) and op.function.name == "c": + assert len(op.arguments) == 2 + assert op.arguments[1] == Constant("True", ElementaryType("bool")) + b = sl.contracts[0].get_function_from_signature("b(uint256)") + for node in b.nodes: + for op in node.irs_ssa: + if isinstance(op, InternalCall) and op.function.name == "c": + assert len(op.arguments) == 2 + assert op.arguments[1] == Constant("False", ElementaryType("bool")) diff --git a/tests/unit/utils/test_data/code_generation/CodeGeneration.sol b/tests/unit/utils/test_data/code_generation/CodeGeneration.sol index 6f1f63c72..292a4b43f 100644 --- a/tests/unit/utils/test_data/code_generation/CodeGeneration.sol +++ b/tests/unit/utils/test_data/code_generation/CodeGeneration.sol @@ -1,7 +1,10 @@ pragma solidity ^0.8.4; + +import "./IFee.sol"; + interface I { - enum SomeEnum { ONE, TWO, THREE } - error ErrorWithEnum(SomeEnum e); + enum SomeEnum { ONE, TWO, THREE } + error ErrorWithEnum(SomeEnum e); } contract TestContract is I { @@ -62,4 +65,10 @@ contract TestContract is I { function setOtherI(I _i) public { otherI = _i; } + + function newFee(uint128 fee) public returns (IFee.Fee memory) { + IFee.Fee memory _fee; + _fee.fee = fee; + return _fee; + } } \ No newline at end of file diff --git a/tests/unit/utils/test_data/code_generation/IFee.sol b/tests/unit/utils/test_data/code_generation/IFee.sol new file mode 100644 index 000000000..17560f60c --- /dev/null +++ b/tests/unit/utils/test_data/code_generation/IFee.sol @@ -0,0 +1,5 @@ +interface IFee { + struct Fee { + uint128 fee; + } +} diff --git a/tests/unit/utils/test_data/code_generation/TEST_generated_code.sol b/tests/unit/utils/test_data/code_generation/TEST_generated_code.sol index 373fba9ca..5240e1063 100644 --- a/tests/unit/utils/test_data/code_generation/TEST_generated_code.sol +++ b/tests/unit/utils/test_data/code_generation/TEST_generated_code.sol @@ -14,6 +14,9 @@ interface ITestContract { struct Nested { St st; } + struct Fee { + uint128 fee; + } function stateA() external returns (uint256); function owner() external returns (address); function structsMap(address,uint256) external returns (uint256); @@ -26,5 +29,6 @@ interface ITestContract { function getSt(uint256) external view returns (uint256); function removeSt(uint256) external; function setOtherI(address) external; + function newFee(uint128) external returns (uint128); } diff --git a/tests/unit/utils/test_data/code_generation/TEST_generated_code_not_unrolled.sol b/tests/unit/utils/test_data/code_generation/TEST_generated_code_not_unrolled.sol index 0cc4dc040..1154ec4cc 100644 --- a/tests/unit/utils/test_data/code_generation/TEST_generated_code_not_unrolled.sol +++ b/tests/unit/utils/test_data/code_generation/TEST_generated_code_not_unrolled.sol @@ -14,6 +14,9 @@ interface ITestContract { struct Nested { St st; } + struct Fee { + uint128 fee; + } function stateA() external returns (uint256); function owner() external returns (address); function structsMap(address,uint256) external returns (St memory); @@ -26,5 +29,6 @@ interface ITestContract { function getSt(uint256) external view returns (St memory); function removeSt(St memory) external; function setOtherI(address) external; + function newFee(uint128) external returns (Fee memory); } diff --git a/tests/unit/utils/test_data/upgradeability_util/src/ContractV2.sol b/tests/unit/utils/test_data/upgradeability_util/src/ContractV2.sol index 9b102f3e9..9c508caf3 100644 --- a/tests/unit/utils/test_data/upgradeability_util/src/ContractV2.sol +++ b/tests/unit/utils/test_data/upgradeability_util/src/ContractV2.sol @@ -1,6 +1,7 @@ pragma solidity ^0.8.2; import "./ProxyStorage.sol"; +import "./ERC20.sol"; contract ContractV2 is ProxyStorage { uint private stateA = 0; @@ -38,4 +39,8 @@ contract ContractV2 is ProxyStorage { function checkB() internal returns (bool) { return stateB == 32; } + + function erc20Transfer(address erc20, address to, uint256 amount) public returns (bool) { + return ERC20(erc20).transfer(to, amount); + } } diff --git a/tests/unit/utils/test_data/upgradeability_util/src/ERC20.sol b/tests/unit/utils/test_data/upgradeability_util/src/ERC20.sol new file mode 100644 index 000000000..6c7801581 --- /dev/null +++ b/tests/unit/utils/test_data/upgradeability_util/src/ERC20.sol @@ -0,0 +1,376 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Implementation of the {IERC20} interface. + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using {_mint}. + * For a generic mechanism see {ERC20PresetMinterPauser}. + * + * TIP: For a detailed writeup see our guide + * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How + * to implement supply mechanisms]. + * + * We have followed general OpenZeppelin Contracts guidelines: functions revert + * instead returning `false` on failure. This behavior is nonetheless + * conventional and does not conflict with the expectations of ERC20 + * applications. + * + * Additionally, an {Approval} event is emitted on calls to {transferFrom}. + * This allows applications to reconstruct the allowance for all accounts just + * by listening to said events. Other implementations of the EIP may not emit + * these events, as it isn't required by the specification. + * + * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} + * functions have been added to mitigate the well-known issues around setting + * allowances. See {IERC20-approve}. + */ +contract ERC20 { + mapping(address => uint256) private _balances; + + mapping(address => mapping(address => uint256)) private _allowances; + + uint256 private _totalSupply; + + string private _name; + string private _symbol; + + /** + * @dev Sets the values for {name} and {symbol}. + * + * The default value of {decimals} is 18. To select a different value for + * {decimals} you should overload it. + * + * All two of these values are immutable: they can only be set once during + * construction. + */ + constructor(string memory name_, string memory symbol_) { + _name = name_; + _symbol = symbol_; + } + + /** + * @dev Returns the name of the token. + */ + function name() public view virtual returns (string memory) { + return _name; + } + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() public view virtual returns (string memory) { + return _symbol; + } + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5.05` (`505 / 10 ** 2`). + * + * Tokens usually opt for a value of 18, imitating the relationship between + * Ether and Wei. This is the value {ERC20} uses, unless this function is + * overridden; + * + * NOTE: This information is only used for _display_ purposes: it in + * no way affects any of the arithmetic of the contract, including + * {IERC20-balanceOf} and {IERC20-transfer}. + */ + function decimals() public view virtual returns (uint8) { + return 18; + } + + /** + * @dev See {IERC20-totalSupply}. + */ + function totalSupply() public view virtual returns (uint256) { + return _totalSupply; + } + + /** + * @dev See {IERC20-balanceOf}. + */ + function balanceOf(address account) public view virtual returns (uint256) { + return _balances[account]; + } + + /** + * @dev See {IERC20-transfer}. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - the caller must have a balance of at least `amount`. + */ + function transfer(address to, uint256 amount) public virtual returns (bool) { + address owner = msg.sender; + _transfer(owner, to, amount); + return true; + } + + /** + * @dev See {IERC20-allowance}. + */ + function allowance(address owner, address spender) public view virtual returns (uint256) { + return _allowances[owner][spender]; + } + + /** + * @dev See {IERC20-approve}. + * + * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on + * `transferFrom`. This is semantically equivalent to an infinite approval. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 amount) public virtual returns (bool) { + address owner = msg.sender; + _approve(owner, spender, amount); + return true; + } + + /** + * @dev See {IERC20-transferFrom}. + * + * Emits an {Approval} event indicating the updated allowance. This is not + * required by the EIP. See the note at the beginning of {ERC20}. + * + * NOTE: Does not update the allowance if the current allowance + * is the maximum `uint256`. + * + * Requirements: + * + * - `from` and `to` cannot be the zero address. + * - `from` must have a balance of at least `amount`. + * - the caller must have allowance for ``from``'s tokens of at least + * `amount`. + */ + function transferFrom( + address from, + address to, + uint256 amount + ) public virtual returns (bool) { + address spender = msg.sender; + _spendAllowance(from, spender, amount); + _transfer(from, to, amount); + return true; + } + + /** + * @dev Atomically increases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { + address owner = msg.sender; + _approve(owner, spender, allowance(owner, spender) + addedValue); + return true; + } + + /** + * @dev Atomically decreases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `spender` must have allowance for the caller of at least + * `subtractedValue`. + */ + function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { + address owner = msg.sender; + uint256 currentAllowance = allowance(owner, spender); + require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); + unchecked { + _approve(owner, spender, currentAllowance - subtractedValue); + } + + return true; + } + + /** + * @dev Moves `amount` of tokens from `from` to `to`. + * + * This internal function is equivalent to {transfer}, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a {Transfer} event. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `from` must have a balance of at least `amount`. + */ + function _transfer( + address from, + address to, + uint256 amount + ) internal virtual { + require(from != address(0), "ERC20: transfer from the zero address"); + require(to != address(0), "ERC20: transfer to the zero address"); + + _beforeTokenTransfer(from, to, amount); + + uint256 fromBalance = _balances[from]; + require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); + unchecked { + _balances[from] = fromBalance - amount; + // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by + // decrementing then incrementing. + _balances[to] += amount; + } + _afterTokenTransfer(from, to, amount); + } + + /** @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * Requirements: + * + * - `account` cannot be the zero address. + */ + function _mint(address account, uint256 amount) internal virtual { + require(account != address(0), "ERC20: mint to the zero address"); + + _beforeTokenTransfer(address(0), account, amount); + + _totalSupply += amount; + unchecked { + // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. + _balances[account] += amount; + } + _afterTokenTransfer(address(0), account, amount); + } + + /** + * @dev Destroys `amount` tokens from `account`, reducing the + * total supply. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * Requirements: + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + */ + function _burn(address account, uint256 amount) internal virtual { + require(account != address(0), "ERC20: burn from the zero address"); + + _beforeTokenTransfer(account, address(0), amount); + + uint256 accountBalance = _balances[account]; + require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); + unchecked { + _balances[account] = accountBalance - amount; + // Overflow not possible: amount <= accountBalance <= totalSupply. + _totalSupply -= amount; + } + _afterTokenTransfer(account, address(0), amount); + } + + /** + * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. + * + * This internal function is equivalent to `approve`, and can be used to + * e.g. set automatic allowances for certain subsystems, etc. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _approve( + address owner, + address spender, + uint256 amount + ) internal virtual { + require(owner != address(0), "ERC20: approve from the zero address"); + require(spender != address(0), "ERC20: approve to the zero address"); + + _allowances[owner][spender] = amount; + } + + /** + * @dev Updates `owner` s allowance for `spender` based on spent `amount`. + * + * Does not update the allowance amount in case of infinite allowance. + * Revert if not enough allowance is available. + * + * Might emit an {Approval} event. + */ + function _spendAllowance( + address owner, + address spender, + uint256 amount + ) internal virtual { + uint256 currentAllowance = allowance(owner, spender); + if (currentAllowance != type(uint256).max) { + require(currentAllowance >= amount, "ERC20: insufficient allowance"); + unchecked { + _approve(owner, spender, currentAllowance - amount); + } + } + } + + /** + * @dev Hook that is called before any transfer of tokens. This includes + * minting and burning. + * + * Calling conditions: + * + * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * will be transferred to `to`. + * - when `from` is zero, `amount` tokens will be minted for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens will be burned. + * - `from` and `to` are never both zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer( + address from, + address to, + uint256 amount + ) internal virtual {} + + /** + * @dev Hook that is called after any transfer of tokens. This includes + * minting and burning. + * + * Calling conditions: + * + * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * has been transferred to `to`. + * - when `from` is zero, `amount` tokens have been minted for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens have been burned. + * - `from` and `to` are never both zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _afterTokenTransfer( + address from, + address to, + uint256 amount + ) internal virtual {} +} diff --git a/tests/unit/utils/test_upgradeability_util.py b/tests/unit/utils/test_upgradeability_util.py index 325050574..1d0447331 100644 --- a/tests/unit/utils/test_upgradeability_util.py +++ b/tests/unit/utils/test_upgradeability_util.py @@ -20,19 +20,41 @@ def test_upgrades_compare(solc_binary_path) -> None: sl = Slither(os.path.join(TEST_DATA_DIR, "TestUpgrades-0.8.2.sol"), solc=solc_path) v1 = sl.get_contract_from_name("ContractV1")[0] v2 = sl.get_contract_from_name("ContractV2")[0] - missing_vars, new_vars, tainted_vars, new_funcs, modified_funcs, tainted_funcs = compare(v1, v2) + ( + missing_vars, + new_vars, + tainted_vars, + new_funcs, + modified_funcs, + tainted_funcs, + tainted_contracts, + ) = compare(v1, v2, include_external=True) assert len(missing_vars) == 0 assert new_vars == [v2.get_state_variable_from_name("stateC")] assert tainted_vars == [ - v2.get_state_variable_from_name("stateB"), v2.get_state_variable_from_name("bug"), ] - assert new_funcs == [v2.get_function_from_signature("i()")] + assert new_funcs == [ + v2.get_function_from_signature("i()"), + v2.get_function_from_signature("erc20Transfer(address,address,uint256)"), + ] assert modified_funcs == [v2.get_function_from_signature("checkB()")] assert tainted_funcs == [ - v2.get_function_from_signature("g(uint256)"), v2.get_function_from_signature("h()"), ] + erc20 = sl.get_contract_from_name("ERC20")[0] + assert len(tainted_contracts) == 1 + assert tainted_contracts[0].contract == erc20 + assert set(tainted_contracts[0].tainted_functions) == { + erc20.get_function_from_signature("transfer(address,uint256)"), + erc20.get_function_from_signature("_transfer(address,address,uint256)"), + erc20.get_function_from_signature("_burn(address,uint256)"), + erc20.get_function_from_signature("balanceOf(address)"), + erc20.get_function_from_signature("_mint(address,uint256)"), + } + assert tainted_contracts[0].tainted_variables == [ + erc20.get_state_variable_from_name("_balances") + ] def test_upgrades_implementation_var(solc_binary_path) -> None: