Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/integration
Browse files Browse the repository at this point in the history
  • Loading branch information
truemiller committed Feb 20, 2024
2 parents ba29003 + 6ddc144 commit 6283a19
Show file tree
Hide file tree
Showing 11 changed files with 427 additions and 88 deletions.
11 changes: 10 additions & 1 deletion backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"""Operate app entrypoint."""


import os
from pathlib import Path

from aea_ledger_ethereum.ethereum import EthereumCrypto
Expand All @@ -35,6 +36,10 @@
from typing_extensions import Annotated
from uvicorn.main import run as uvicorn

DEFAULT_HARDHAT_KEY = (
"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
).encode()


class App(Resource):
"""App resource."""
Expand Down Expand Up @@ -63,7 +68,11 @@ def make(self) -> None:
self._keys.mkdir(exist_ok=True)
if not self._key.exists():
# TODO: Add support for multiple master keys
self._key.write_bytes(EthereumCrypto().private_key.encode())
self._key.write_bytes(
DEFAULT_HARDHAT_KEY
if os.environ.get("DEV", "false") == "true"
else EthereumCrypto().private_key.encode()
)

@property
def json(self) -> None:
Expand Down
Loading

0 comments on commit 6283a19

Please sign in to comment.