Skip to content

Commit

Permalink
Merge pull request #558 from crytic/dev
Browse files Browse the repository at this point in the history
sync master <> dev
  • Loading branch information
0xalpharush authored Apr 7, 2024
2 parents b5c538a + 88f80b0 commit 20df04f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 8 additions & 0 deletions crytic_compile/cryticparser/cryticparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
5 changes: 5 additions & 0 deletions crytic_compile/platform/etherscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
}


Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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]] = {}
Expand Down

0 comments on commit 20df04f

Please sign in to comment.