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' 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]] = {}