Skip to content

Commit

Permalink
Merge pull request #11 from moonstream-to/fix-foundry-abi-load
Browse files Browse the repository at this point in the history
Added a try block around ABI loading for Foundry projects
  • Loading branch information
zomglings authored Mar 8, 2024
2 parents 86d875b + d59a702 commit 6b18bdb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions inspector_facet/abi.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ def foundry_project_abis(project_dir: str, build_dirname: None) -> Dict[str, Lis
with open(filepath, "r") as ifp:
contract_artifact = json.load(ifp)

contract_abi = contract_artifact.get("abi", [])

abis[contract_name] = contract_abi
try:
contract_abi = contract_artifact.get("abi", [])
abis[contract_name] = contract_abi
except Exception:
continue

return abis

Expand Down
2 changes: 1 addition & 1 deletion inspector_facet/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0
0.3.1

0 comments on commit 6b18bdb

Please sign in to comment.