From 603218d7c7af4e70d40e88cc27d2e78cf4ee33c2 Mon Sep 17 00:00:00 2001 From: Simone Date: Thu, 28 Mar 2024 15:29:48 +0100 Subject: [PATCH 1/2] Add Blast support --- crytic_compile/cryticparser/cryticparser.py | 8 ++++++++ crytic_compile/platform/etherscan.py | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/crytic_compile/cryticparser/cryticparser.py b/crytic_compile/cryticparser/cryticparser.py index d8b3da6a..1646a931 100755 --- a/crytic_compile/cryticparser/cryticparser.py +++ b/crytic_compile/cryticparser/cryticparser.py @@ -409,6 +409,14 @@ def _init_etherscan(parser: ArgumentParser) -> None: default=DEFAULTS_FLAG_IN_CONFIG["etherscan_api_key"], ) + group_etherscan.add_argument( + "--blast-apikey", + help="Blastscan API key.", + action="store", + dest="blast_api_key", + default=DEFAULTS_FLAG_IN_CONFIG["etherscan_api_key"], + ) + group_etherscan.add_argument( "--etherscan-export-directory", help="Directory in which to save the analyzed contracts.", diff --git a/crytic_compile/platform/etherscan.py b/crytic_compile/platform/etherscan.py index 6e4ae870..bcb24910 100644 --- a/crytic_compile/platform/etherscan.py +++ b/crytic_compile/platform/etherscan.py @@ -51,6 +51,7 @@ "base:": (".basescan.org", "basescan.org"), "gno:": (".gnosisscan.io", "gnosisscan.io"), "polyzk:": ("-zkevm.polygonscan.com", "zkevm.polygonscan.com"), + "blast:": (".blastscan.io", "blastscan.io"), } @@ -241,6 +242,7 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None: base_api_key = kwargs.get("base_api_key", None) gno_api_key = kwargs.get("gno_api_key", None) polyzk_api_key = kwargs.get("polyzk_api_key", None) + blast_api_key = kwargs.get("blast_api_key", None) export_dir = kwargs.get("export_dir", "crytic-export") export_dir = os.path.join( @@ -280,6 +282,9 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None: if polyzk_api_key and "zkevm" in etherscan_url: etherscan_url += f"&apikey={polyzk_api_key}" etherscan_bytecode_url += f"&apikey={polyzk_api_key}" + if blast_api_key and "blast" in etherscan_url: + etherscan_url += f"&apikey={blast_api_key}" + etherscan_bytecode_url += f"&apikey={blast_api_key}" source_code: str = "" result: Dict[str, Union[bool, str, int]] = {} From 632324fbebf82b77c9b714c657b714db39b86906 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 23:51:35 +0000 Subject: [PATCH 2/2] chore(deps): bump actions/configure-pages from 4 to 5 Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5. - [Release notes](https://github.com/actions/configure-pages/releases) - [Commits](https://github.com/actions/configure-pages/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/configure-pages 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 8b1a183d..35ff04cf 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -30,7 +30,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Pages - uses: actions/configure-pages@v4 + uses: actions/configure-pages@v5 - uses: actions/setup-python@v5 with: python-version: '3.8'