Skip to content

Commit

Permalink
(optionally) Ingest interactive account selection into Deployer
Browse files Browse the repository at this point in the history
  • Loading branch information
KPrasch committed Sep 27, 2023
1 parent 9b6ee71 commit 92541a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
5 changes: 4 additions & 1 deletion deployment/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from ape import chain, project
from ape.api import AccountAPI
from ape.cli import get_user_selected_account
from ape.contracts.base import (
ContractContainer,
ContractInstance
Expand Down Expand Up @@ -291,8 +292,10 @@ class Deployer:

__DEPLOYER_ACCOUNT: AccountAPI = None

def __init__(self, account: AccountAPI, params_path: Path, publish: bool):
def __init__(self, params_path: Path, publish: bool, account: typing.Optional[AccountAPI] = None):
self.constructor_parameters = ConstructorParameters.from_file(params_path)
if account is None:
account = get_user_selected_account()
self._set_deployer(account)
self.publish = publish

Expand Down
1 change: 0 additions & 1 deletion scripts/lynx/deploy_child.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/python3

from ape import project
from ape.cli import get_user_selected_account

from deployment.constants import (
ARTIFACTS_DIR,
Expand Down
1 change: 0 additions & 1 deletion scripts/lynx/deploy_root.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/python3

from ape import project
from ape.cli import get_user_selected_account

from deployment.constants import (
ARTIFACTS_DIR,
Expand Down

0 comments on commit 92541a7

Please sign in to comment.