Skip to content

Commit

Permalink
feat: default hardhat config
Browse files Browse the repository at this point in the history
  • Loading branch information
banteg authored and iamdefinitelyahuman committed Apr 7, 2021
1 parent 3cef407 commit 1c9a5cd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions brownie/network/rpc/hardhat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import sys
import warnings
from pathlib import Path
from subprocess import DEVNULL, PIPE
from typing import Dict, List, Optional

Expand Down Expand Up @@ -38,6 +39,12 @@ def launch(cmd: str, **kwargs: Dict) -> None:
print(f"\nLaunching '{' '.join(cmd_list)}'...")
out = DEVNULL if sys.platform == "win32" else PIPE

# required so hardhat considers the folder to be a hardhat project
# once hardhat network releases, we should be able to remove
hardhat_config = Path("hardhat.config.js")
if not hardhat_config.exists():
hardhat_config.touch()

return psutil.Popen(cmd_list, stdin=DEVNULL, stdout=out, stderr=out)


Expand Down

0 comments on commit 1c9a5cd

Please sign in to comment.