From eab2af42789125b80d624f1eb7da4aac48055862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Wed, 2 Jul 2025 13:14:40 -0300 Subject: [PATCH 01/27] platform: foundry: compile specific files with `forge` Future work: clean up the solc platform and its `.config(...)` integration if it is no longer needed. --- crytic_compile/platform/foundry.py | 69 ++++++++++++++++++++++++------ 1 file changed, 57 insertions(+), 12 deletions(-) diff --git a/crytic_compile/platform/foundry.py b/crytic_compile/platform/foundry.py index 79c418b4..29e5e876 100755 --- a/crytic_compile/platform/foundry.py +++ b/crytic_compile/platform/foundry.py @@ -2,10 +2,9 @@ Foundry platform """ import logging -import os import subprocess from pathlib import Path -from typing import TYPE_CHECKING, List, Optional, TypeVar +from typing import TYPE_CHECKING, List, Optional, TypeVar, Union import json @@ -32,6 +31,14 @@ class Foundry(AbstractPlatform): PROJECT_URL = "https://github.com/foundry-rs/foundry" TYPE = Type.FOUNDRY + def __init__(self, target: str, **_kwargs: str): + super().__init__(target, **_kwargs) + + project_root = Foundry.locate_project_root(target) + # if we are initializing this, it is indeed a foundry project and thus has a root path + assert project_root is not None + self._project_root: Path = project_root + # pylint: disable=too-many-locals,too-many-statements,too-many-branches def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None: """Compile @@ -52,18 +59,23 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None: LOGGER.info( "--ignore-compile used, if something goes wrong, consider removing the ignore compile flag" ) - - if not ignore_compile: + else: compilation_command = [ "forge", "build", "--build-info", ] + targeted_build = not self._project_root.samefile(self._target) + if targeted_build: + compilation_command += [ + str(Path(self._target).resolve().relative_to(self._project_root)) + ] + compile_all = kwargs.get("foundry_compile_all", False) - if not compile_all: - foundry_config = self.config(self._target) + if not targeted_build and not compile_all: + foundry_config = self.config(self._project_root) if foundry_config: compilation_command += [ "--skip", @@ -74,16 +86,18 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None: run( compilation_command, - cwd=self._target, + cwd=self._project_root, ) build_directory = Path( - self._target, + self._project_root, out_directory, "build-info", ) - hardhat_like_parsing(crytic_compile, self._target, build_directory, self._target) + hardhat_like_parsing( + crytic_compile, str(self._target), build_directory, str(self._project_root) + ) def clean(self, **kwargs: str) -> None: """Clean compilation artifacts @@ -99,7 +113,38 @@ def clean(self, **kwargs: str) -> None: if ignore_compile: return - run(["forge", "clean"], cwd=self._target) + run(["forge", "clean"], cwd=self._project_root) + + @staticmethod + def locate_project_root(file_or_dir: str) -> Optional[Path]: + """Determine the project root (if the target is a Foundry project) + + Foundry projects are detected through the presence of their + configuration file. See the following for reference: + + https://github.com/foundry-rs/foundry/blob/6983a938580a1eb25d9dbd61eb8cad8cd137a86d/crates/config/README.md#foundrytoml + + Args: + file_or_dir (str): path to the target + + Returns: + Optional[Path]: path to the project root, if found + """ + + target = Path(file_or_dir).resolve() + + # if the target is a directory, see if it has a foundry config + if target.is_dir() and (target / "foundry.toml").is_file(): + return target + + # if the target is a file, it might be a specific contract + # within a foundry project. Look in parent directories for a + # config file + for p in target.parents: + if (p / "foundry.toml").is_file(): + return p + + return None @staticmethod def is_supported(target: str, **kwargs: str) -> bool: @@ -115,10 +160,10 @@ def is_supported(target: str, **kwargs: str) -> bool: if kwargs.get("foundry_ignore", False): return False - return os.path.isfile(os.path.join(target, "foundry.toml")) + return Foundry.locate_project_root(target) is not None @staticmethod - def config(working_dir: str) -> Optional[PlatformConfig]: + def config(working_dir: Union[str, Path]) -> Optional[PlatformConfig]: """Return configuration data that should be passed to solc, such as remappings. Args: From 4c2addcfbfbf0b0029cfd7cd6ae3a6ee85075fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Wed, 2 Jul 2025 13:19:22 -0300 Subject: [PATCH 02/27] platform: foundry: use relative paths for `--skip` arguments Foundry now supports using relative paths with the `./` syntax. Closes: #602 --- crytic_compile/platform/foundry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crytic_compile/platform/foundry.py b/crytic_compile/platform/foundry.py index 29e5e876..4ede54a0 100755 --- a/crytic_compile/platform/foundry.py +++ b/crytic_compile/platform/foundry.py @@ -79,8 +79,8 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None: if foundry_config: compilation_command += [ "--skip", - f"*/{foundry_config.tests_path}/**", - f"*/{foundry_config.scripts_path}/**", + f"./{foundry_config.tests_path}/**", + f"./{foundry_config.scripts_path}/**", "--force", ] From 8b32a5beb7840111c1c104aabe5404b2f59b7b84 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 09:28:40 +0000 Subject: [PATCH 03/27] chore(deps): bump actions/download-artifact from 4 to 5 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d1f67dbb..ea306d82 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,7 +39,7 @@ jobs: - build-release steps: - name: fetch dists - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: crytic-compile-dists path: dist/ From b29f650349d8292f5ab0d5b56e21fe54ebf2c43c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 11:25:31 +0000 Subject: [PATCH 04/27] chore(deps): bump actions/checkout from 4 to 5 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/black.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/darglint.yml | 2 +- .github/workflows/doc.yml | 2 +- .github/workflows/etherscan.yml | 2 +- .github/workflows/linter.yml | 2 +- .github/workflows/mypy.yml | 2 +- .github/workflows/publish.yml | 2 +- .github/workflows/pylint.yml | 2 +- .github/workflows/pytest.yml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 25cb38b8..e0739dec 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Python 3.8 uses: actions/setup-python@v5 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30954646..820c6eaa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: - python: 3.12 type: brownie steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up shell if: runner.os == 'Windows' run: | diff --git a/.github/workflows/darglint.yml b/.github/workflows/darglint.yml index 624b1d07..b1993e87 100644 --- a/.github/workflows/darglint.yml +++ b/.github/workflows/darglint.yml @@ -17,7 +17,7 @@ jobs: tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python 3.8 uses: actions/setup-python@v5 with: diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 35ff04cf..36670603 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup Pages uses: actions/configure-pages@v5 - uses: actions/setup-python@v5 diff --git a/.github/workflows/etherscan.yml b/.github/workflows/etherscan.yml index 680630c5..c6642d6c 100644 --- a/.github/workflows/etherscan.yml +++ b/.github/workflows/etherscan.yml @@ -24,7 +24,7 @@ jobs: os: ["ubuntu-latest", "windows-2022"] type: ["etherscan"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up shell if: runner.os == 'Windows' run: | diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index ff9fe507..532a6516 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Python 3.8 uses: actions/setup-python@v5 diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 80973bf3..4a4c925c 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Python 3.8 uses: actions/setup-python@v5 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d1f67dbb..abac7e1b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python uses: actions/setup-python@v5 diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 17a0b529..9a7441e3 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Python 3.8 uses: actions/setup-python@v5 diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index be6eea2f..83f8a216 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python 3.8 uses: actions/setup-python@v5 with: From ca3ecebb01454b38fd02bc9b102777634d50b0c7 Mon Sep 17 00:00:00 2001 From: Jayakumar2812 Date: Tue, 12 Aug 2025 18:07:12 +0530 Subject: [PATCH 05/27] added monad testnet --- crytic_compile/platform/etherscan.py | 1 + 1 file changed, 1 insertion(+) diff --git a/crytic_compile/platform/etherscan.py b/crytic_compile/platform/etherscan.py index 72f67def..90773c4a 100644 --- a/crytic_compile/platform/etherscan.py +++ b/crytic_compile/platform/etherscan.py @@ -112,6 +112,7 @@ "abstract": ("2741", "abscan.org"), "sepolia.abstract": ("11124", "sepolia.abscan.org"), "berachain": ("80094", "berascan.com"), + "testnet.monad": ("10143", "testnet.monadscan.com"), } SUPPORTED_NETWORK = {**SUPPORTED_NETWORK_V1, **SUPPORTED_NETWORK_V2} From ad64797f5d8cef6ea0f12fad307618efcf7c9789 Mon Sep 17 00:00:00 2001 From: Jayakumar2812 Date: Wed, 13 Aug 2025 10:07:55 +0530 Subject: [PATCH 06/27] added other networks from the github pr comments --- crytic_compile/platform/etherscan.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crytic_compile/platform/etherscan.py b/crytic_compile/platform/etherscan.py index 90773c4a..a6424de8 100644 --- a/crytic_compile/platform/etherscan.py +++ b/crytic_compile/platform/etherscan.py @@ -71,7 +71,7 @@ "avax": ("43114", "snowscan.xyz"), "testnet.avax": ("43113", "testnet.snowscan.xyz"), "bttc": ("199", "bttcscan.com"), - "testnet.bttc": ("1028", "testnet.bttcscan.com"), + "testnet.bttc": ("1029", "testnet.bttcscan.com"), "celo": ("42220", "celoscan.io"), "alfajores.celo": ("44787", "alfajores.celoscan.io"), "cronos": ("25", "cronoscan.com"), @@ -113,6 +113,16 @@ "sepolia.abstract": ("11124", "sepolia.abscan.org"), "berachain": ("80094", "berascan.com"), "testnet.monad": ("10143", "testnet.monadscan.com"), + "560048": ("560048", "hoodi.etherscan.io"), + "43521": ("43521", "testnet.memecorescan.io"), + "80069": ("80069", "testnet.berascan.com"), + "1923": ("1923", "swellchainscan.io"), + "1924": ("1924", "sepolia.swellchainscan.io"), + "999": ("999", "hyperevmscan.io"), + "747474": ("747474", "katanascan.com"), + "1329": ("1329", "seiscan.io"), + "1328": ("1328", "testnet.seiscan.io"), + } SUPPORTED_NETWORK = {**SUPPORTED_NETWORK_V1, **SUPPORTED_NETWORK_V2} From 6d228656aedbf35f5d9016bcada658e5ca5c6f43 Mon Sep 17 00:00:00 2001 From: Jayakumar2812 Date: Wed, 13 Aug 2025 17:48:19 +0530 Subject: [PATCH 07/27] added friendly names for new chains --- crytic_compile/platform/etherscan.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/crytic_compile/platform/etherscan.py b/crytic_compile/platform/etherscan.py index a6424de8..9a7a1d11 100644 --- a/crytic_compile/platform/etherscan.py +++ b/crytic_compile/platform/etherscan.py @@ -113,15 +113,15 @@ "sepolia.abstract": ("11124", "sepolia.abscan.org"), "berachain": ("80094", "berascan.com"), "testnet.monad": ("10143", "testnet.monadscan.com"), - "560048": ("560048", "hoodi.etherscan.io"), - "43521": ("43521", "testnet.memecorescan.io"), - "80069": ("80069", "testnet.berascan.com"), - "1923": ("1923", "swellchainscan.io"), - "1924": ("1924", "sepolia.swellchainscan.io"), - "999": ("999", "hyperevmscan.io"), - "747474": ("747474", "katanascan.com"), - "1329": ("1329", "seiscan.io"), - "1328": ("1328", "testnet.seiscan.io"), + "hoodi": ("560048", "hoodi.etherscan.io"), + "memecore": ("43521", "testnet.memecorescan.io"), + "testnet.berachain": ("80069", "testnet.berascan.com"), + "swellchain": ("1923", "swellchainscan.io"), + "testnet.swellchain": ("1924", "sepolia.swellchainscan.io"), + "hyperevm": ("999", "hyperevmscan.io"), + "katana": ("747474", "katanascan.com"), + "sei": ("1329", "seiscan.io"), + "testnet.sei": ("1328", "testnet.seiscan.io"), } From 85ed3ec17406722a9f093d5deadc8d68050cef90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= <2642849+elopez@users.noreply.github.com> Date: Mon, 18 Aug 2025 01:11:26 -0300 Subject: [PATCH 08/27] Fix linting --- crytic_compile/platform/etherscan.py | 1 - 1 file changed, 1 deletion(-) diff --git a/crytic_compile/platform/etherscan.py b/crytic_compile/platform/etherscan.py index 9a7a1d11..cf51cab8 100644 --- a/crytic_compile/platform/etherscan.py +++ b/crytic_compile/platform/etherscan.py @@ -122,7 +122,6 @@ "katana": ("747474", "katanascan.com"), "sei": ("1329", "seiscan.io"), "testnet.sei": ("1328", "testnet.seiscan.io"), - } SUPPORTED_NETWORK = {**SUPPORTED_NETWORK_V1, **SUPPORTED_NETWORK_V2} From 4a58063ba208d76b92bd610fe2e4d3be4794f112 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 04:16:27 +0000 Subject: [PATCH 09/27] chore(deps): bump sigstore/gh-action-sigstore-python from 3.0.0 to 3.0.1 --- updated-dependencies: - dependency-name: sigstore/gh-action-sigstore-python dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4da713b8..8a4b2d16 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -48,7 +48,7 @@ jobs: uses: pypa/gh-action-pypi-publish@v1.12.4 - name: sign - uses: sigstore/gh-action-sigstore-python@v3.0.0 + uses: sigstore/gh-action-sigstore-python@v3.0.1 with: inputs: ./dist/*.tar.gz ./dist/*.whl release-signing-artifacts: true From fcb9af3dcaf6b1409b95a30fa718a93d470e7f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Mon, 18 Aug 2025 00:42:01 -0300 Subject: [PATCH 10/27] platform: foundry: auto-detect `out` directory --- crytic_compile/cryticparser/defaults.py | 2 +- crytic_compile/platform/abstract_platform.py | 1 + crytic_compile/platform/foundry.py | 25 ++++++++++++-------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/crytic_compile/cryticparser/defaults.py b/crytic_compile/cryticparser/defaults.py index 9635f365..f6719149 100755 --- a/crytic_compile/cryticparser/defaults.py +++ b/crytic_compile/cryticparser/defaults.py @@ -44,7 +44,7 @@ "hardhat_cache_directory": None, "hardhat_artifacts_directory": None, "foundry_ignore_compile": False, - "foundry_out_directory": "out", + "foundry_out_directory": None, "foundry_compile_all": False, "export_dir": "crytic-export", "compile_libraries": None, diff --git a/crytic_compile/platform/abstract_platform.py b/crytic_compile/platform/abstract_platform.py index b369e155..500dd58f 100644 --- a/crytic_compile/platform/abstract_platform.py +++ b/crytic_compile/platform/abstract_platform.py @@ -42,6 +42,7 @@ class PlatformConfig: tests_path: str = "test" libs_path: List[str] = field(default_factory=lambda: ["lib"]) scripts_path: str = "script" + out_path: str = "out" class AbstractPlatform(metaclass=abc.ABCMeta): diff --git a/crytic_compile/platform/foundry.py b/crytic_compile/platform/foundry.py index 4ede54a0..2feb4aea 100755 --- a/crytic_compile/platform/foundry.py +++ b/crytic_compile/platform/foundry.py @@ -53,7 +53,7 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None: "ignore_compile", False ) - out_directory = kwargs.get("foundry_out_directory", "out") + foundry_config = None if ignore_compile: LOGGER.info( @@ -74,21 +74,25 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None: compile_all = kwargs.get("foundry_compile_all", False) - if not targeted_build and not compile_all: - foundry_config = self.config(self._project_root) - if foundry_config: - compilation_command += [ - "--skip", - f"./{foundry_config.tests_path}/**", - f"./{foundry_config.scripts_path}/**", - "--force", - ] + foundry_config = self.config(self._project_root) + + if not targeted_build and not compile_all and foundry_config: + compilation_command += [ + "--skip", + f"./{foundry_config.tests_path}/**", + f"./{foundry_config.scripts_path}/**", + "--force", + ] run( compilation_command, cwd=self._project_root, ) + out_directory_detected = foundry_config.out_path if foundry_config else "out" + out_directory_config = kwargs.get("foundry_out_directory", None) + out_directory = out_directory_config if out_directory_config else out_directory_detected + build_directory = Path( self._project_root, out_directory, @@ -195,6 +199,7 @@ def config(working_dir: Union[str, Path]) -> Optional[PlatformConfig]: result.tests_path = json_config.get("test") result.libs_path = json_config.get("libs") result.scripts_path = json_config.get("script") + result.out_path = json_config.get("out") return result From b491c24782504b5843b0bf5192e0186e2e3d3541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Mon, 18 Aug 2025 01:05:41 -0300 Subject: [PATCH 11/27] tests: foundry: improve and fix test `--no-commit` is now the default behavior and the flag has been removed. This also adds a new case to test with an `out` directory that is different than the default. --- scripts/ci_test_foundry.sh | 39 +++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/scripts/ci_test_foundry.sh b/scripts/ci_test_foundry.sh index 6e240e4a..cb718ecb 100755 --- a/scripts/ci_test_foundry.sh +++ b/scripts/ci_test_foundry.sh @@ -1,13 +1,14 @@ #!/usr/bin/env bash - ### Test foundry integration +set -Eeuxo pipefail -cd /tmp || exit 255 +## test 1 - same folder +cd /tmp || exit 255 mkdir forge_test cd forge_test || exit 255 -forge init --no-commit +forge init crytic-compile . if [ $? -ne 0 ] @@ -16,11 +17,35 @@ then exit 255 fi -mkdir /tmp/forge_test/test_2 -rsync -a --exclude='test_2' ./ /tmp/forge_test/test_2/ -crytic-compile ./test_2 + +## test 2 - same folder, different out dir + +cd /tmp || exit 255 +mkdir forge_test2 +cd forge_test2 || exit 255 +forge init + +sed -i 's/^out\s*=.*$/out = "foobar"/' foundry.toml + +crytic-compile . if [ $? -ne 0 ] then echo "foundry test 2 failed" exit 255 -fi \ No newline at end of file +fi + +## test 3 - different folder + +cd /tmp || exit 255 +mkdir forge_test3 +cd forge_test3 || exit 255 +forge init + +cd /tmp || exit 255 + +crytic-compile ./forge_test3 +if [ $? -ne 0 ] +then + echo "foundry test 3 failed" + exit 255 +fi From 348f6099c90e26a13606afbf8b92682e19dc35ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 16:24:34 +0000 Subject: [PATCH 12/27] chore(deps): bump actions/upload-pages-artifact from 3 to 4 Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-pages-artifact/releases) - [Commits](https://github.com/actions/upload-pages-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-pages-artifact dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 36670603..934fc680 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -37,7 +37,7 @@ jobs: - run: pip install -e ".[doc]" - run: pdoc -o html/ crytic_compile - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v4 with: # Upload the doc path: './html/' From f5a99c5a952e453b7d23010e78a07133668afb44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 26 Aug 2025 20:29:57 -0300 Subject: [PATCH 13/27] tests: scripts: make scripts fail on unexpected errors --- scripts/ci_darglint.sh | 5 ++-- scripts/ci_test_brownie.sh | 5 ++-- scripts/ci_test_buidler.sh | 4 ++-- scripts/ci_test_dapp.sh | 10 ++++---- scripts/ci_test_embark.sh | 4 ++-- scripts/ci_test_etherlime.sh | 4 ++-- scripts/ci_test_etherscan.sh | 33 ++++++++------------------- scripts/ci_test_foundry.sh | 9 +++----- scripts/ci_test_hardhat.sh | 1 + scripts/ci_test_hardhat_multi_file.sh | 1 + scripts/ci_test_monorepo.sh | 1 + scripts/ci_test_solc.sh | 1 + scripts/ci_test_solc_multi_file.sh | 1 + scripts/ci_test_standard.sh | 18 ++++----------- scripts/ci_test_truffle.sh | 4 ++-- scripts/ci_test_vyper.sh | 1 + scripts/ci_test_waffle.sh | 5 ++-- 17 files changed, 41 insertions(+), 66 deletions(-) diff --git a/scripts/ci_darglint.sh b/scripts/ci_darglint.sh index 6d98fcc8..f340f967 100755 --- a/scripts/ci_darglint.sh +++ b/scripts/ci_darglint.sh @@ -1,10 +1,9 @@ #!/usr/bin/env bash +set -euo pipefail pip install darglint -darglint . - -if [ $? -ne 0 ] +if ! darglint . then echo "Darglint failed. Please fix the above issues" exit 255 diff --git a/scripts/ci_test_brownie.sh b/scripts/ci_test_brownie.sh index ebfd9413..4a201443 100755 --- a/scripts/ci_test_brownie.sh +++ b/scripts/ci_test_brownie.sh @@ -1,12 +1,11 @@ #!/usr/bin/env bash +set -euo pipefail pip install eth-brownie brownie bake token cd token || exit 255 -crytic-compile . --compile-force-framework Brownie - -if [ $? -ne 0 ] +if ! crytic-compile . --compile-force-framework Brownie then echo "Brownie test failed" exit 255 diff --git a/scripts/ci_test_buidler.sh b/scripts/ci_test_buidler.sh index e37c8a15..225f70c6 100755 --- a/scripts/ci_test_buidler.sh +++ b/scripts/ci_test_buidler.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail ### Test buidler integration @@ -6,8 +7,7 @@ cd tests/buidler || exit 255 npm install --save-dev @nomiclabs/buidler -crytic-compile . -if [ $? -ne 0 ] +if ! crytic-compile . then echo "buidler test failed" exit 255 diff --git a/scripts/ci_test_dapp.sh b/scripts/ci_test_dapp.sh index bc258178..935c165f 100755 --- a/scripts/ci_test_dapp.sh +++ b/scripts/ci_test_dapp.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail ### Test dapp integration @@ -24,8 +25,7 @@ dapp init PROJECT="$PWD" echo "::group::Dapp + cwd target" -crytic-compile . --compile-remove-metadata -if [ $? -ne 0 ] +if ! crytic-compile . --compile-remove-metadata then echo "dapp test failed" exit 255 @@ -35,8 +35,7 @@ echo "::endgroup::" cd /tmp || exit 255 echo "::group::Dapp + different target" -crytic-compile "$PROJECT" --compile-remove-metadata -if [ $? -ne 0 ] +if ! crytic-compile "$PROJECT" --compile-remove-metadata then echo "dapp test with different target failed" exit 255 @@ -45,8 +44,7 @@ echo "::endgroup::" echo "::group::Dapp + different target + ignore compile" -crytic-compile "$PROJECT" --compile-remove-metadata --ignore-compile -if [ $? -ne 0 ] +if ! crytic-compile "$PROJECT" --compile-remove-metadata --ignore-compile then echo "dapp test with different target + ignore compile failed" exit 255 diff --git a/scripts/ci_test_embark.sh b/scripts/ci_test_embark.sh index e6756be6..ac0d6b42 100755 --- a/scripts/ci_test_embark.sh +++ b/scripts/ci_test_embark.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail ### Test embark integration @@ -13,9 +14,8 @@ npm install -g embark@4.2.0 embark demo cd /tmp/embark_demo || exit 255 npm install -crytic-compile . --embark-overwrite-config --compile-remove-metadata -if [ $? -ne 0 ] +if ! crytic-compile . --embark-overwrite-config --compile-remove-metadata then echo "Embark test failed" exit 255 diff --git a/scripts/ci_test_etherlime.sh b/scripts/ci_test_etherlime.sh index fc151802..10328111 100755 --- a/scripts/ci_test_etherlime.sh +++ b/scripts/ci_test_etherlime.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail ### Test etherlime integration @@ -7,9 +8,8 @@ cd "$DIR" || exit 255 npm i -g etherlime etherlime init -crytic-compile . --compile-remove-metadata -if [ $? -ne 0 ] +if ! crytic-compile . --compile-remove-metadata then echo "Etherlime test failed" exit 255 diff --git a/scripts/ci_test_etherscan.sh b/scripts/ci_test_etherscan.sh index 631b1f90..5e6b5a1b 100755 --- a/scripts/ci_test_etherscan.sh +++ b/scripts/ci_test_etherscan.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail ### Test etherscan integration @@ -14,9 +15,7 @@ if [ "$ETHERSCAN_API_KEY" = "" ]; then fi echo "::group::Etherscan mainnet" -crytic-compile 0x7F37f78cBD74481E593F9C737776F7113d76B315 --compile-remove-metadata --etherscan-apikey "$ETHERSCAN_API_KEY" - -if [ $? -ne 0 ] +if ! crytic-compile 0x7F37f78cBD74481E593F9C737776F7113d76B315 --compile-remove-metadata --etherscan-apikey "$ETHERSCAN_API_KEY" then echo "Etherscan mainnet test failed" exit 255 @@ -26,9 +25,7 @@ echo "::endgroup::" # From crytic/slither#1154 # Try without an explicit API key argument, to verify reading `ETHERSCAN_API_KEY` from env works fine echo "::group::Etherscan #3" -crytic-compile 0xcfc1E0968CA08aEe88CbF664D4A1f8B881d90f37 --compile-remove-metadata - -if [ $? -ne 0 ] +if ! crytic-compile 0xcfc1E0968CA08aEe88CbF664D4A1f8B881d90f37 --compile-remove-metadata then echo "Etherscan #3 test failed" exit 255 @@ -37,9 +34,7 @@ echo "::endgroup::" # From crytic/crytic-compile#415 echo "::group::Etherscan #4" -crytic-compile 0x19c7d0fbf906c282dedb5543d098f43dfe9f856f --compile-remove-metadata --etherscan-apikey "$ETHERSCAN_API_KEY" - -if [ $? -ne 0 ] +if ! crytic-compile 0x19c7d0fbf906c282dedb5543d098f43dfe9f856f --compile-remove-metadata --etherscan-apikey "$ETHERSCAN_API_KEY" then echo "Etherscan #4 test failed" exit 255 @@ -48,9 +43,7 @@ echo "::endgroup::" # From crytic/crytic-compile#150 echo "::group::Etherscan #5" -crytic-compile 0x2a311e451491091d2a1d3c43f4f5744bdb4e773a --compile-remove-metadata --etherscan-apikey "$ETHERSCAN_API_KEY" - -if [ $? -ne 0 ] +if ! crytic-compile 0x2a311e451491091d2a1d3c43f4f5744bdb4e773a --compile-remove-metadata --etherscan-apikey "$ETHERSCAN_API_KEY" then echo "Etherscan #5 test failed" case "$(uname -sr)" in @@ -66,9 +59,7 @@ echo "::endgroup::" # From crytic/crytic-compile#151 echo "::group::Etherscan #6" -crytic-compile 0x4c808e3c011514d5016536af11218eec537eb6f5 --compile-remove-metadata --etherscan-apikey "$ETHERSCAN_API_KEY" - -if [ $? -ne 0 ] +if ! crytic-compile 0x4c808e3c011514d5016536af11218eec537eb6f5 --compile-remove-metadata --etherscan-apikey "$ETHERSCAN_API_KEY" then echo "Etherscan #6 test failed" exit 255 @@ -77,9 +68,7 @@ echo "::endgroup::" # via-ir test for crytic/crytic-compile#517 echo "::group::Etherscan #7" -crytic-compile 0x9AB6b21cDF116f611110b048987E58894786C244 --compile-remove-metadata --etherscan-apikey "$ETHERSCAN_API_KEY" - -if [ $? -ne 0 ] +if ! crytic-compile 0x9AB6b21cDF116f611110b048987E58894786C244 --compile-remove-metadata --etherscan-apikey "$ETHERSCAN_API_KEY" then echo "Etherscan #7 test failed" exit 255 @@ -88,9 +77,7 @@ echo "::endgroup::" # From crytic/crytic-compile#544 echo "::group::Etherscan #8" -crytic-compile 0x9AB6b21cDF116f611110b048987E58894786C244 --etherscan-apikey "$ETHERSCAN_API_KEY" - -if [ $? -ne 0 ] +if ! crytic-compile 0x9AB6b21cDF116f611110b048987E58894786C244 --etherscan-apikey "$ETHERSCAN_API_KEY" then echo "Etherscan #8 test failed" exit 255 @@ -105,9 +92,7 @@ if [ ! -f crytic_compile.config.json ]; then fi # TODO: Globbing at crytic_compile.py:720 to run with '.' -crytic-compile 'contracts/InterestRates/InterestRatePositionManager.f.sol' --config-file crytic_compile.config.json - -if [ $? -ne 0 ] +if ! crytic-compile 'contracts/InterestRates/InterestRatePositionManager.f.sol' --config-file crytic_compile.config.json then echo "crytic-compile command failed" exit 255 diff --git a/scripts/ci_test_foundry.sh b/scripts/ci_test_foundry.sh index cb718ecb..682a36db 100755 --- a/scripts/ci_test_foundry.sh +++ b/scripts/ci_test_foundry.sh @@ -10,8 +10,7 @@ mkdir forge_test cd forge_test || exit 255 forge init -crytic-compile . -if [ $? -ne 0 ] +if ! crytic-compile . then echo "foundry test 1 failed" exit 255 @@ -27,8 +26,7 @@ forge init sed -i 's/^out\s*=.*$/out = "foobar"/' foundry.toml -crytic-compile . -if [ $? -ne 0 ] +if ! crytic-compile . then echo "foundry test 2 failed" exit 255 @@ -43,8 +41,7 @@ forge init cd /tmp || exit 255 -crytic-compile ./forge_test3 -if [ $? -ne 0 ] +if ! crytic-compile ./forge_test3 then echo "foundry test 3 failed" exit 255 diff --git a/scripts/ci_test_hardhat.sh b/scripts/ci_test_hardhat.sh index 28f74b80..7d21dee6 100755 --- a/scripts/ci_test_hardhat.sh +++ b/scripts/ci_test_hardhat.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail echo "Testing hardhat integration of $(realpath "$(which crytic-compile)")" diff --git a/scripts/ci_test_hardhat_multi_file.sh b/scripts/ci_test_hardhat_multi_file.sh index 074be214..81995a6c 100755 --- a/scripts/ci_test_hardhat_multi_file.sh +++ b/scripts/ci_test_hardhat_multi_file.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail DIR=$(mktemp -d) diff --git a/scripts/ci_test_monorepo.sh b/scripts/ci_test_monorepo.sh index 10ca98cd..16aa5e0c 100755 --- a/scripts/ci_test_monorepo.sh +++ b/scripts/ci_test_monorepo.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail echo "Testing monorepo integration of $(realpath "$(which crytic-compile)")" diff --git a/scripts/ci_test_solc.sh b/scripts/ci_test_solc.sh index 3d04c394..60785266 100755 --- a/scripts/ci_test_solc.sh +++ b/scripts/ci_test_solc.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail DIR=$(mktemp -d) diff --git a/scripts/ci_test_solc_multi_file.sh b/scripts/ci_test_solc_multi_file.sh index 55624e90..582b1167 100755 --- a/scripts/ci_test_solc_multi_file.sh +++ b/scripts/ci_test_solc_multi_file.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail DIR=$(mktemp -d) diff --git a/scripts/ci_test_standard.sh b/scripts/ci_test_standard.sh index 281087f4..54358033 100755 --- a/scripts/ci_test_standard.sh +++ b/scripts/ci_test_standard.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail DIR=$(mktemp -d) @@ -8,34 +9,25 @@ cd "$DIR" || exit 255 solc-select use 0.8.0 --always-install -crytic-compile contract_with_toplevel.sol --export-format archive - -if [ $? -ne 0 ] +if ! crytic-compile contract_with_toplevel.sol --export-format archive then echo "Standard test failed" exit 255 fi -crytic-compile crytic-export/contract_with_toplevel.sol_export_archive.json - -if [ $? -ne 0 ] +if ! crytic-compile crytic-export/contract_with_toplevel.sol_export_archive.json then echo "Standard test failed" exit 255 fi - -crytic-compile contract_with_toplevel.sol --export-zip test.zip - -if [ $? -ne 0 ] +if ! crytic-compile contract_with_toplevel.sol --export-zip test.zip then echo "Standard test failed" exit 255 fi -crytic-compile test.zip - -if [ $? -ne 0 ] +if ! crytic-compile test.zip then echo "Standard test failed" exit 255 diff --git a/scripts/ci_test_truffle.sh b/scripts/ci_test_truffle.sh index 816fbab3..03f47268 100755 --- a/scripts/ci_test_truffle.sh +++ b/scripts/ci_test_truffle.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail ### Test truffle integration @@ -7,9 +8,8 @@ cd "$DIR" || exit 255 npm install -g truffle truffle unbox metacoin -crytic-compile . --compile-remove-metadata -if [ $? -ne 0 ] +if ! crytic-compile . --compile-remove-metadata then echo "Truffle test failed" exit 255 diff --git a/scripts/ci_test_vyper.sh b/scripts/ci_test_vyper.sh index 6afe62da..7ee64904 100755 --- a/scripts/ci_test_vyper.sh +++ b/scripts/ci_test_vyper.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail ### Test vyper integration diff --git a/scripts/ci_test_waffle.sh b/scripts/ci_test_waffle.sh index a27436e4..34f53a44 100755 --- a/scripts/ci_test_waffle.sh +++ b/scripts/ci_test_waffle.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail ### Test waffle integration @@ -15,9 +16,7 @@ echo 'contract Test { cd .. -crytic-compile . --compile-remove-metadata --compile-force-framework Waffle - -if [ $? -ne 0 ] +if ! crytic-compile . --compile-remove-metadata --compile-force-framework Waffle then echo "Waffle test failed" exit 255 From fb307cbcb9c18f73d8f7b572856d419e56032245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 26 Aug 2025 20:33:40 -0300 Subject: [PATCH 14/27] ci: add Python 3.13 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 820c6eaa..247ddaff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "windows-2022"] - python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.12"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11", "3.12"]') }} + python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.13"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]') }} type: ["brownie", "buidler", "dapp", "embark", "hardhat", "solc", "truffle", "waffle", "foundry", "standard", "vyper", "solc_multi_file", "hardhat_multi_file"] exclude: # Currently broken, tries to pull git:// which is blocked by GH From 41a378f61d142a3696dc4f543c2ecf18c4a83f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 26 Aug 2025 20:34:14 -0300 Subject: [PATCH 15/27] ci: re-enable brownie on modern Python --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 247ddaff..7ca59731 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,15 +33,6 @@ jobs: # Explore foundry support in windows - os: windows-2022 type: foundry - # brownie does not install correctly with Python 3.10 - - python: 3.10 - type: brownie - # brownie does not install correctly with Python 3.11 - - python: 3.11 - type: brownie - # brownie does not install correctly with Python 3.12 - - python: 3.12 - type: brownie steps: - uses: actions/checkout@v5 - name: Set up shell From ac3b68aa0f00e1b5030c2b5cdf9b2b2dbbf94f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 26 Aug 2025 20:53:58 -0300 Subject: [PATCH 16/27] ci: upgrade Windows runners --- .github/workflows/ci.yml | 6 +++--- .github/workflows/etherscan.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ca59731..5fcd283f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,17 +21,17 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "windows-2022"] + os: ["ubuntu-latest", "windows-2025"] python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.13"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]') }} type: ["brownie", "buidler", "dapp", "embark", "hardhat", "solc", "truffle", "waffle", "foundry", "standard", "vyper", "solc_multi_file", "hardhat_multi_file"] exclude: # Currently broken, tries to pull git:// which is blocked by GH - type: embark # Requires nix - - os: windows-2022 + - os: windows-2025 type: dapp # Explore foundry support in windows - - os: windows-2022 + - os: windows-2025 type: foundry steps: - uses: actions/checkout@v5 diff --git a/.github/workflows/etherscan.yml b/.github/workflows/etherscan.yml index c6642d6c..7d90c825 100644 --- a/.github/workflows/etherscan.yml +++ b/.github/workflows/etherscan.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: ["ubuntu-latest", "windows-2022"] + os: ["ubuntu-latest", "windows-2025"] type: ["etherscan"] steps: - uses: actions/checkout@v5 From deae85d21dd04ed839d0724dbc3f043dfa0393f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 26 Aug 2025 20:44:54 -0300 Subject: [PATCH 17/27] tests: scripts: use older NodeJS for buidler --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5fcd283f..92d915c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,10 @@ jobs: os: ["ubuntu-latest", "windows-2025"] python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.13"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]') }} type: ["brownie", "buidler", "dapp", "embark", "hardhat", "solc", "truffle", "waffle", "foundry", "standard", "vyper", "solc_multi_file", "hardhat_multi_file"] + include: + # buidler requires older NodeJS + - type: buidler + node-version: 12 exclude: # Currently broken, tries to pull git:// which is blocked by GH - type: embark @@ -43,7 +47,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v4 with: - node-version: 18.15 + node-version: ${{ matrix.node-version || '18.15' }} - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v5 with: From 0a5aa752797eae7d6895069bd512fc3c2864bbc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 26 Aug 2025 20:45:13 -0300 Subject: [PATCH 18/27] tests: scripts: update setuptools for brownie --- scripts/ci_test_brownie.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/ci_test_brownie.sh b/scripts/ci_test_brownie.sh index 4a201443..b28c9174 100755 --- a/scripts/ci_test_brownie.sh +++ b/scripts/ci_test_brownie.sh @@ -1,6 +1,9 @@ #!/usr/bin/env bash set -euo pipefail +# https://github.com/eth-brownie/brownie/pull/1873#issuecomment-2927669459 +pip install -U setuptools + pip install eth-brownie brownie bake token cd token || exit 255 From d670c5a2f51e0e71c2e69444c04d8a5cb2779af0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 23:05:00 +0000 Subject: [PATCH 19/27] chore(deps): bump pypa/gh-action-pypi-publish from 1.12.4 to 1.13.0 Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.12.4 to 1.13.0. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.12.4...v1.13.0) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-version: 1.13.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8a4b2d16..33d33fb5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,7 +45,7 @@ jobs: path: dist/ - name: publish - uses: pypa/gh-action-pypi-publish@v1.12.4 + uses: pypa/gh-action-pypi-publish@v1.13.0 - name: sign uses: sigstore/gh-action-sigstore-python@v3.0.1 From 32dd172cdbe15fc44da5c683cdadf6a0da1a63c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 23:05:08 +0000 Subject: [PATCH 20/27] chore(deps): bump actions/setup-python from 5 to 6 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/black.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/darglint.yml | 2 +- .github/workflows/doc.yml | 2 +- .github/workflows/etherscan.yml | 2 +- .github/workflows/linter.yml | 2 +- .github/workflows/mypy.yml | 2 +- .github/workflows/publish.yml | 2 +- .github/workflows/pylint.yml | 2 +- .github/workflows/pytest.yml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index e0739dec..32838fde 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@v5 - name: Set up Python 3.8 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.8 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 820c6eaa..3e1bb689 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: with: node-version: 18.15 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python }} - name: Install dependencies diff --git a/.github/workflows/darglint.yml b/.github/workflows/darglint.yml index b1993e87..f97a3932 100644 --- a/.github/workflows/darglint.yml +++ b/.github/workflows/darglint.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v5 - name: Set up Python 3.8 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.8 - name: Run Tests diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 36670603..4619d469 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -31,7 +31,7 @@ jobs: uses: actions/checkout@v5 - name: Setup Pages uses: actions/configure-pages@v5 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: '3.8' - run: pip install -e ".[doc]" diff --git a/.github/workflows/etherscan.yml b/.github/workflows/etherscan.yml index c6642d6c..281c4626 100644 --- a/.github/workflows/etherscan.yml +++ b/.github/workflows/etherscan.yml @@ -31,7 +31,7 @@ jobs: echo 'C:\msys64\mingw64\bin' >> "$GITHUB_PATH" echo 'C:\msys64\usr\bin' >> "$GITHUB_PATH" - name: Set up Python 3.8 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.8 - name: Install dependencies diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 532a6516..805f6377 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@v5 - name: Set up Python 3.8 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.8 diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 4a4c925c..6a456010 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@v5 - name: Set up Python 3.8 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.8 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8a4b2d16..42ab49e6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.x' diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 9a7441e3..3977f932 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@v5 - name: Set up Python 3.8 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.8 diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 83f8a216..ca930085 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -28,7 +28,7 @@ jobs: steps: - uses: actions/checkout@v5 - name: Set up Python 3.8 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.8 cache: "pip" From f63f752787eb367ead1a659cee9755b9b37ae613 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 23:05:11 +0000 Subject: [PATCH 21/27] chore(deps): bump actions/setup-node from 4 to 5 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 820c6eaa..2631510d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: echo 'C:\msys64\mingw64\bin' >> "$GITHUB_PATH" echo 'C:\msys64\usr\bin' >> "$GITHUB_PATH" - name: Set up Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: 18.15 - name: Set up Python ${{ matrix.python }} From d057a07b2c1a98de0dc79d29e1b06ff438af028b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Oct 2025 23:04:51 +0000 Subject: [PATCH 22/27] chore(deps): bump actions/setup-node from 5 to 6 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93d9f64d..2c47d87a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: echo 'C:\msys64\mingw64\bin' >> "$GITHUB_PATH" echo 'C:\msys64\usr\bin' >> "$GITHUB_PATH" - name: Set up Node - uses: actions/setup-node@v5 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version || '18.15' }} - name: Set up Python ${{ matrix.python }} From c8429007c12c9294fe38c1974b337e7a7232768c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 23:33:46 +0000 Subject: [PATCH 23/27] chore(deps): bump sigstore/gh-action-sigstore-python from 3.0.1 to 3.1.0 Bumps [sigstore/gh-action-sigstore-python](https://github.com/sigstore/gh-action-sigstore-python) from 3.0.1 to 3.1.0. - [Release notes](https://github.com/sigstore/gh-action-sigstore-python/releases) - [Changelog](https://github.com/sigstore/gh-action-sigstore-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/sigstore/gh-action-sigstore-python/compare/v3.0.1...v3.1.0) --- updated-dependencies: - dependency-name: sigstore/gh-action-sigstore-python dependency-version: 3.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8bb682bd..46b5a49f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -48,7 +48,7 @@ jobs: uses: pypa/gh-action-pypi-publish@v1.13.0 - name: sign - uses: sigstore/gh-action-sigstore-python@v3.0.1 + uses: sigstore/gh-action-sigstore-python@v3.1.0 with: inputs: ./dist/*.tar.gz ./dist/*.whl release-signing-artifacts: true From 0248bbcb9ff3feac39f8dc3a1fef99bb1c15efff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 23:33:54 +0000 Subject: [PATCH 24/27] chore(deps): bump actions/upload-artifact from 4 to 5 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8bb682bd..537ea11a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,7 +24,7 @@ jobs: python -m build - name: Upload distributions - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: crytic-compile-dists path: dist/ From c04478250c8d49812efc5bcf9655db8a67efcdb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 23:34:46 +0000 Subject: [PATCH 25/27] chore(deps): bump actions/download-artifact from 5 to 6 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8bb682bd..6ed838f4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,7 +39,7 @@ jobs: - build-release steps: - name: fetch dists - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: crytic-compile-dists path: dist/ From 47074945943823812da143d32edfa71c7581465f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Fri, 14 Nov 2025 09:31:07 -0300 Subject: [PATCH 26/27] Bump version to 0.3.11 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d0bd5049..2088f598 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ description="Util to facilitate smart contracts compilation.", url="https://github.com/crytic/crytic-compile", author="Trail of Bits", - version="0.3.10", + version="0.3.11", packages=find_packages(), # Python 3.12.0 on Windows suffers from https://github.com/python/cpython/issues/109590 # breaking some of our integrations. The issue is fixed in 3.12.1 From a6ae5cbc266cf508c3d42167d8a3a543bd07a5f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Fri, 14 Nov 2025 09:56:15 -0300 Subject: [PATCH 27/27] Update etherscan platforms --- crytic_compile/platform/etherscan.py | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/crytic_compile/platform/etherscan.py b/crytic_compile/platform/etherscan.py index cf51cab8..245c1a51 100644 --- a/crytic_compile/platform/etherscan.py +++ b/crytic_compile/platform/etherscan.py @@ -49,12 +49,11 @@ "mainnet": ("1", "etherscan.io"), "sepolia": ("11155111", "sepolia.etherscan.io"), "holesky": ("17000", "holesky.etherscan.io"), + "hoodi": ("560048", "hoodi.etherscan.io"), "bsc": ("56", "bscscan.com"), "testnet.bsc": ("97", "testnet.bscscan.com"), "poly": ("137", "polygonscan.com"), "amoy.poly": ("80002", "amoy.polygonscan.com"), - "polyzk": ("1101", "zkevm.polygonscan.com"), - "cardona.polyzk": ("2442", "cardona-zkevm.polygonscan.com"), "base": ("8453", "basescan.org"), "sepolia.base": ("84532", "sepolia.basescan.org"), "arbi": ("42161", "arbiscan.io"), @@ -62,8 +61,6 @@ "sepolia.arbi": ("421614", "sepolia.arbiscan.io"), "linea": ("59144", "lineascan.build"), "sepolia.linea": ("59141", "sepolia.lineascan.build"), - "ftm": ("250", "ftmscan.com"), - "testnet.ftm": ("4002", "testnet.ftmscan.com"), "blast": ("81457", "blastscan.io"), "sepolia.blast": ("168587773", "sepolia.blastscan.io"), "optim": ("10", "optimistic.etherscan.io"), @@ -73,15 +70,13 @@ "bttc": ("199", "bttcscan.com"), "testnet.bttc": ("1029", "testnet.bttcscan.com"), "celo": ("42220", "celoscan.io"), - "alfajores.celo": ("44787", "alfajores.celoscan.io"), - "cronos": ("25", "cronoscan.com"), + "sepolia.celo": ("11142220", "sepolia.celoscan.io"), "frax": ("252", "fraxscan.com"), - "holesky.frax": ("2522", "holesky.fraxscan.com"), + "hoodi.frax": ("2523", "hoodi.fraxscan.com"), "gno": ("100", "gnosisscan.io"), - "kroma": ("255", "kromascan.com"), - "sepolia.kroma": ("2358", "sepolia.kromascan.com"), "mantle": ("5000", "mantlescan.xyz"), "sepolia.mantle": ("5003", "sepolia.mantlescan.xyz"), + "memecore": ("43521", "testnet.memecorescan.io"), "moonbeam": ("1284", "moonbeam.moonscan.io"), "moonriver": ("1285", "moonriver.moonscan.io"), "moonbase": ("1287", "moonbase.moonscan.io"), @@ -90,13 +85,9 @@ "scroll": ("534352", "scrollscan.com"), "sepolia.scroll": ("534351", "sepolia.scrollscan.com"), "taiko": ("167000", "taikoscan.io"), - "hekla.taiko": ("167009", "hekla.taikoscan.io"), - "wemix": ("1111", "wemixscan.com"), - "testnet.wemix": ("1112", "testnet.wemixscan.com"), + "hoodi.taiko": ("167013", "hoodi.taikoscan.io"), "era.zksync": ("324", "era.zksync.network"), "sepoliaera.zksync": ("300", "sepolia-era.zksync.network"), - "xai": ("660279", "xaiscan.io"), - "sepolia.xai": ("37714555429", "sepolia.xaiscan.io"), "xdc": ("50", "xdcscan.com"), "testnet.xdc": ("51", "testnet.xdcscan.com"), "apechain": ("33139", "apescan.io"), @@ -106,20 +97,19 @@ "sophon": ("50104", "sophscan.xyz"), "testnet.sophon": ("531050104", "testnet.sophscan.xyz"), "sonic": ("146", "sonicscan.org"), - "testnet.sonic": ("57054", "testnet.sonicscan.org"), + "testnet.sonic": ("14601", "testnet.sonicscan.org"), "unichain": ("130", "uniscan.xyz"), "sepolia.unichain": ("1301", "sepolia.uniscan.xyz"), "abstract": ("2741", "abscan.org"), "sepolia.abstract": ("11124", "sepolia.abscan.org"), "berachain": ("80094", "berascan.com"), - "testnet.monad": ("10143", "testnet.monadscan.com"), - "hoodi": ("560048", "hoodi.etherscan.io"), - "memecore": ("43521", "testnet.memecorescan.io"), "testnet.berachain": ("80069", "testnet.berascan.com"), "swellchain": ("1923", "swellchainscan.io"), "testnet.swellchain": ("1924", "sepolia.swellchainscan.io"), + "testnet.monad": ("10143", "testnet.monadscan.com"), "hyperevm": ("999", "hyperevmscan.io"), "katana": ("747474", "katanascan.com"), + "bokuto.katana": ("737373", "bokuto.katanascan.com"), "sei": ("1329", "seiscan.io"), "testnet.sei": ("1328", "testnet.seiscan.io"), }