Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
0xalpharush committed Jan 11, 2024
1 parent 1889d94 commit e55843f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crytic_compile/platform/foundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,21 @@ def is_supported(target: str, **kwargs: str) -> bool:
return os.path.isfile(os.path.join(target, "foundry.toml"))

@staticmethod
def config(target: str) -> Optional[PlatformConfig]:
def config(working_dir: str) -> Optional[PlatformConfig]:
"""Return configuration data that should be passed to solc, such as remappings.
Args:
target (str): path to the target
working_dir (str): path to the working_dir
Returns:
Optional[PlatformConfig]: Platform configuration data such as optimization, remappings...
"""
result = PlatformConfig()
LOGGER.info("'forge config --json' running")
json_config = json.loads(
subprocess.run(["forge", "config", "--json"], stdout=subprocess.PIPE, check=True).stdout
subprocess.run(
["forge", "config", "--json"], cwd=working_dir, stdout=subprocess.PIPE, check=True
).stdout
)

# Solc configurations
Expand Down

0 comments on commit e55843f

Please sign in to comment.