Skip to content

Commit

Permalink
chore: removing models.py folders in favour of granular modules in ro…
Browse files Browse the repository at this point in the history
…ot models namespace
  • Loading branch information
aorumbayev committed Oct 24, 2024
1 parent b698dba commit 30e3f7d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 40 deletions.
6 changes: 4 additions & 2 deletions src/algokit_utils/applications/app_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,16 @@ def replace_teal_template_deploy_time_control_params(teal_template_code: str, pa
if params.get("updatable") is not None:
if UPDATABLE_TEMPLATE_NAME not in teal_template_code:
raise ValueError(
f"Deploy-time updatability control requested for app deployment, but {UPDATABLE_TEMPLATE_NAME} not present in TEAL code"
f"Deploy-time updatability control requested for app deployment, but {UPDATABLE_TEMPLATE_NAME} "
"not present in TEAL code"
)
teal_template_code = teal_template_code.replace(UPDATABLE_TEMPLATE_NAME, str(int(params["updatable"])))

if params.get("deletable") is not None:
if DELETABLE_TEMPLATE_NAME not in teal_template_code:
raise ValueError(
f"Deploy-time deletability control requested for app deployment, but {DELETABLE_TEMPLATE_NAME} not present in TEAL code"
f"Deploy-time deletability control requested for app deployment, but {DELETABLE_TEMPLATE_NAME} "
"not present in TEAL code"
)
teal_template_code = teal_template_code.replace(DELETABLE_TEMPLATE_NAME, str(int(params["deletable"])))

Expand Down
35 changes: 0 additions & 35 deletions src/algokit_utils/applications/models.py

This file was deleted.

Empty file removed src/algokit_utils/assets/models.py
Empty file.
Empty file.
6 changes: 3 additions & 3 deletions src/algokit_utils/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ class Account:

def __post_init__(self) -> None:
if not self.address:
self.address = algosdk.account.address_from_private_key(self.private_key) # type: ignore[no-untyped-call]
self.address = algosdk.account.address_from_private_key(self.private_key)

@property
def public_key(self) -> bytes:
"""The public key for this account"""
public_key = algosdk.encoding.decode_address(self.address) # type: ignore[no-untyped-call]
public_key = algosdk.encoding.decode_address(self.address)
assert isinstance(public_key, bytes)
return public_key

Expand All @@ -31,5 +31,5 @@ def signer(self) -> AccountTransactionSigner:

@staticmethod
def new_account() -> "Account":
private_key, address = algosdk.account.generate_account() # type: ignore[no-untyped-call]
private_key, address = algosdk.account.generate_account()
return Account(private_key=private_key)

0 comments on commit 30e3f7d

Please sign in to comment.