algokit-utils 4.0.1b3__py3-none-any.whl → 4.0.2b1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of algokit-utils might be problematic. Click here for more details.

@@ -32,7 +32,7 @@ _DEFAULT_ACCOUNT_MINIMUM_BALANCE = 1_000_000_000
32
32
 
33
33
 
34
34
  @deprecated(
35
- "Use `algorand.account.from_mnemonic()` instead. Example: " "`account = algorand.account.from_mnemonic(mnemonic)`"
35
+ "Use `algorand.account.from_mnemonic()` instead. Example: `account = algorand.account.from_mnemonic(mnemonic)`"
36
36
  )
37
37
  def get_account_from_mnemonic(mnemonic: str) -> Account:
38
38
  """Convert a mnemonic (25 word passphrase) into an Account"""
@@ -127,7 +127,7 @@ def get_dispenser_account(client: "AlgodClient") -> Account:
127
127
 
128
128
 
129
129
  @deprecated(
130
- "Use `algorand.account.from_kmd()` instead. Example: " "`account = algorand.account.from_kmd(name, predicate)`"
130
+ "Use `algorand.account.from_kmd()` instead. Example: `account = algorand.account.from_kmd(name, predicate)`"
131
131
  )
132
132
  def get_kmd_wallet_account(
133
133
  client: "AlgodClient",
@@ -243,9 +243,7 @@ class ApplicationClient:
243
243
  """Creates a copy of this ApplicationClient, using the new signer, sender and app_id values if provided.
244
244
  Will also substitute provided template_values into the associated app_spec in the copy"""
245
245
  new_client: ApplicationClient = copy.copy(self)
246
- new_client._prepare( # noqa: SLF001
247
- new_client, signer=signer, sender=sender, app_id=app_id, template_values=template_values
248
- )
246
+ new_client._prepare(new_client, signer=signer, sender=sender, app_id=app_id, template_values=template_values)
249
247
  return new_client
250
248
 
251
249
  def _prepare(
@@ -641,8 +641,7 @@ class Deployer:
641
641
  elif self.on_update == OnUpdate.ReplaceApp:
642
642
  if self.existing_app_metadata_or_reference.updatable is False:
643
643
  logger.warning(
644
- "App is not updatable and on_update=ReplaceApp, "
645
- "will attempt to create new app and delete old app"
644
+ "App is not updatable and on_update=ReplaceApp, will attempt to create new app and delete old app"
646
645
  )
647
646
  else:
648
647
  logger.warning(
@@ -2047,7 +2047,7 @@ class AppClient:
2047
2047
  if not value:
2048
2048
  raise ValueError(
2049
2049
  f"Key '{default_value.data}' not found in {default_value.source} "
2050
- f"storage for argument {method_arg.name or f'arg{i+1}'}"
2050
+ f"storage for argument {method_arg.name or f'arg{i + 1}'}"
2051
2051
  )
2052
2052
 
2053
2053
  if value.value_raw:
@@ -2065,7 +2065,7 @@ class AppClient:
2065
2065
  elif not algosdk.abi.is_abi_transaction_type(method_arg.type):
2066
2066
  raise ValueError(
2067
2067
  f"No value provided for required argument "
2068
- f"{method_arg.name or f'arg{i+1}'} in call to method {method.name}"
2068
+ f"{method_arg.name or f'arg{i + 1}'} in call to method {method.name}"
2069
2069
  )
2070
2070
  elif arg_value is None and default_value is None:
2071
2071
  # At this point only allow explicit None values if no default value was identified
@@ -239,7 +239,7 @@ class AppDeployer:
239
239
  suppress_log = send_params.get("suppress_log") or False
240
240
 
241
241
  config.logger.info(
242
- f"Idempotently deploying app \"{deployment.metadata.name}\" from creator "
242
+ f'Idempotently deploying app "{deployment.metadata.name}" from creator '
243
243
  f"{deployment.create_params.sender} using {len(deployment.create_params.approval_program)} bytes of "
244
244
  f"{'teal code' if isinstance(deployment.create_params.approval_program, str) else 'AVM bytecode'} and "
245
245
  f"{len(deployment.create_params.clear_state_program)} bytes of "
@@ -623,8 +623,7 @@ class AppDeployer:
623
623
 
624
624
  if deployment.on_update in (OnUpdate.Fail, "fail") or deployment.on_update is None:
625
625
  raise ValueError(
626
- "Update detected and on_update=Fail, stopping deployment. "
627
- "Try a different on_update value to not fail."
626
+ "Update detected and on_update=Fail, stopping deployment. Try a different on_update value to not fail."
628
627
  )
629
628
 
630
629
  if deployment.on_update in (OnUpdate.AppendApp, "append"):
@@ -1122,13 +1122,12 @@ class AppFactory:
1122
1122
  results.append(decoded_value)
1123
1123
  else:
1124
1124
  raise ValueError(
1125
- f"Cannot provide default value from source={default_value.source} "
1126
- "for a contract creation call."
1125
+ f"Cannot provide default value from source={default_value.source} for a contract creation call."
1127
1126
  )
1128
1127
  else:
1129
1128
  param_name = param.name or f"arg{i + 1}"
1130
1129
  raise ValueError(
1131
- f"No value provided for required argument {param_name} " f"in call to method {method.name}"
1130
+ f"No value provided for required argument {param_name} in call to method {method.name}"
1132
1131
  )
1133
1132
 
1134
1133
  return results
@@ -17,7 +17,7 @@ from algosdk.atomic_transaction_composer import (
17
17
  TransactionSigner,
18
18
  TransactionWithSigner,
19
19
  )
20
- from algosdk.transaction import ApplicationCallTxn, OnComplete, SuggestedParams
20
+ from algosdk.transaction import OnComplete, SuggestedParams
21
21
  from algosdk.v2client.algod import AlgodClient
22
22
  from algosdk.v2client.models.simulate_request import SimulateRequest
23
23
  from typing_extensions import deprecated
@@ -1833,8 +1833,7 @@ class TransactionComposer:
1833
1833
  group = self.build().transactions
1834
1834
 
1835
1835
  if not params:
1836
- has_app_call = any(isinstance(txn.txn, ApplicationCallTxn) for txn in group)
1837
- params = SendParams() if has_app_call else SendParams()
1836
+ params = SendParams()
1838
1837
 
1839
1838
  cover_app_call_inner_transaction_fees = params.get("cover_app_call_inner_transaction_fees")
1840
1839
  populate_app_call_resources = params.get("populate_app_call_resources")
@@ -650,8 +650,7 @@ class AlgorandClientTransactionSender:
650
650
  return self._send(
651
651
  lambda c: c.add_asset_opt_in,
652
652
  pre_log=lambda params, transaction: (
653
- f"Opting in {params.sender} to asset with ID {params.asset_id} via transaction "
654
- f"{transaction.get_txid()}"
653
+ f"Opting in {params.sender} to asset with ID {params.asset_id} via transaction {transaction.get_txid()}"
655
654
  ),
656
655
  )(params, send_params)
657
656
 
@@ -714,7 +713,7 @@ class AlgorandClientTransactionSender:
714
713
  )
715
714
  except Exception as e:
716
715
  raise ValueError(
717
- f"Account {params.sender} is not opted-in to Asset {params.asset_id}; " "can't opt-out."
716
+ f"Account {params.sender} is not opted-in to Asset {params.asset_id}; can't opt-out."
718
717
  ) from e
719
718
 
720
719
  if not hasattr(params, "creator"):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: algokit-utils
3
- Version: 4.0.1b3
3
+ Version: 4.0.2b1
4
4
  Summary: Utilities for Algorand development for use by AlgoKit
5
5
  License: MIT
6
6
  Author: Algorand Foundation
@@ -3,12 +3,12 @@ algokit_utils/_debugging.py,sha256=nAiC10WXiZsvc0RPWOrMLpjJQZT_ItgcMl7D9Z4DfYc,1
3
3
  algokit_utils/_legacy_v2/__init__.py,sha256=WcRE30axWjGnBB09bJCeTw9NT-2_jDN_CVJITFcIDc8,4689
4
4
  algokit_utils/_legacy_v2/_ensure_funded.py,sha256=k52b56CfWttPiu2gy09HIEiXl0eIz5WKQy-iuhxpSQg,6909
5
5
  algokit_utils/_legacy_v2/_transfer.py,sha256=nMHm3jXKJLLjOLqjMK_B3bFsslDCx45EPJ5yt7Ex-8k,6464
6
- algokit_utils/_legacy_v2/account.py,sha256=mv5GjHlIPKNr3dx1FI1aAYFiJqeVpCbf0mTUXeYu0UU,8314
7
- algokit_utils/_legacy_v2/application_client.py,sha256=Gb7WldXLi0V92YfeU19HP1rJ-L4Rmz2Lxm2q45tQJ2s,59610
6
+ algokit_utils/_legacy_v2/account.py,sha256=9rLtA67cDLJZozCbeMzQS0aZPHXh-z5MxTKEUcbzDtw,8308
7
+ algokit_utils/_legacy_v2/application_client.py,sha256=nSTnT98WRWhxo4xjtQACJW7hmIwhb9EMzyhkUcX50CM,59572
8
8
  algokit_utils/_legacy_v2/application_specification.py,sha256=wp2Y9ou2_F-bSFbDnm6AEhFexybmD7-fAT0CuWtO26g,521
9
9
  algokit_utils/_legacy_v2/asset.py,sha256=vuSmqwEp2W6bpLB34_fUkzZ8VnLDXC__d-rqI4bmkDM,7574
10
10
  algokit_utils/_legacy_v2/common.py,sha256=lB6zHUDJSjYiZ41hvcG0P5TZk_t-n2Iy0OXuQcJosm0,823
11
- algokit_utils/_legacy_v2/deploy.py,sha256=uoRaUTIYzLZdUucW3DOIbD3qwa9CvLgo1GSJ1Ibfmsw,32778
11
+ algokit_utils/_legacy_v2/deploy.py,sha256=RMQ3AG5cNRzcYHzpFM9fQJo2f4dQeFDBKPIvx4K2e6Q,32755
12
12
  algokit_utils/_legacy_v2/logic_error.py,sha256=pmaMTuvbOD7PHukSY4epzJRptSivc4O0vFZdW_zzZ38,345
13
13
  algokit_utils/_legacy_v2/models.py,sha256=hH7aO50E4po4EgxXI9zdX5HTthn1HLfSLvkuPfgAATc,7403
14
14
  algokit_utils/_legacy_v2/network_clients.py,sha256=z_zm1da9CVBG2TOAnXeYkHBh6a8HtXsSdNrlEizc8J0,5928
@@ -21,9 +21,9 @@ algokit_utils/application_client.py,sha256=5UIxXIBjukjRyjZPCeXmaNlAftbb3TziV7EfB
21
21
  algokit_utils/application_specification.py,sha256=wV0H088IudMqlxsW-gsZIfJyKA4e-zVwxJ-cR__ouBA,1379
22
22
  algokit_utils/applications/__init__.py,sha256=NGjhpBeExsQZOAYCT2QUFag1xuKoFiX-Ux5SR2GNzd8,452
23
23
  algokit_utils/applications/abi.py,sha256=OjTdn4szJPPeC8XmosdDYtkIIVgQSWAnqz2DHw5OH9g,10117
24
- algokit_utils/applications/app_client.py,sha256=wM3tH0-oW6uQG_W0RLiL3iULnvAPpNM-O9BiPw5wfiU,88470
25
- algokit_utils/applications/app_deployer.py,sha256=kAypS20VM-yAwosCcYdMwTmXntGOt_6EN_i5nIYN5rw,30627
26
- algokit_utils/applications/app_factory.py,sha256=PPJnR-fs1hNkEMlIqwY7jx63hPnOkdyiIK6l4-A3d10,45383
24
+ algokit_utils/applications/app_client.py,sha256=WKedIu3CDamBW8dAAR5IBYCXkesvETkof1dwIqKHaNE,88474
25
+ algokit_utils/applications/app_deployer.py,sha256=-6pCs61PdFMMrnDIpXOuaIlr6TgDkvsB6vwbOZhOiZ0,30606
26
+ algokit_utils/applications/app_factory.py,sha256=jVAzoK1J9S-BTGHA5BLxT-cl0pWhPdf222W4fYpFihE,45352
27
27
  algokit_utils/applications/app_manager.py,sha256=8bboIswlwBQhPIqilSBMaxd83yHjIpkloezmtgcAdZY,22301
28
28
  algokit_utils/applications/app_spec/__init__.py,sha256=HtjAhAqHNFml9WbRKGmhJnwyJeW8AztPRO_BriQ84vs,140
29
29
  algokit_utils/applications/app_spec/arc32.py,sha256=8MMGUopPzkWq48rl5sYbc2Awf-RKnxSX8F0P0UibK5M,7523
@@ -61,10 +61,10 @@ algokit_utils/protocols/account.py,sha256=CowaVY7ErBP84TWBHNvBjkZy18whPb8HIlMZtJ
61
61
  algokit_utils/protocols/typed_clients.py,sha256=UrQrHbN2SvS8pEFJ8JQodvouoWeBrQOQGZGyBQx1KLM,3322
62
62
  algokit_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
63
  algokit_utils/transactions/__init__.py,sha256=7fYF3m6DyOGzbV36MT5svo0wSkj9AIz496kWgIWSAlk,225
64
- algokit_utils/transactions/transaction_composer.py,sha256=66_vY6DNs4gDhLRAamtzzo7oeLM8nxS9QKwZY_tidYc,104138
64
+ algokit_utils/transactions/transaction_composer.py,sha256=eK-6l2W1CkbKID1ezi-zCs_TxA2i5ZTm3YTl8sT2Zfw,103995
65
65
  algokit_utils/transactions/transaction_creator.py,sha256=cuP6Xm-fhGoCc2FNSbLiEg3iQRwW38rfdTzsqPyEcpM,29053
66
- algokit_utils/transactions/transaction_sender.py,sha256=foK_2S-gUl9D7xkWG3lD526qIKz5mVibHNKVREQCgoA,50079
67
- algokit_utils-4.0.1b3.dist-info/LICENSE,sha256=J5i7U1Q9Q2c7saUzlvFRmrCCFhQyXb5Juz_LO5omNUw,1076
68
- algokit_utils-4.0.1b3.dist-info/METADATA,sha256=Wuty91rhnlGVlhzljvqS9TzoCJu5vJTVJ2eniZGacQ0,2421
69
- algokit_utils-4.0.1b3.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
70
- algokit_utils-4.0.1b3.dist-info/RECORD,,
66
+ algokit_utils/transactions/transaction_sender.py,sha256=4u2FON3YM4_DKPde6gSkZFAH1wp7FC8E65HpQ803RNo,50056
67
+ algokit_utils-4.0.2b1.dist-info/LICENSE,sha256=J5i7U1Q9Q2c7saUzlvFRmrCCFhQyXb5Juz_LO5omNUw,1076
68
+ algokit_utils-4.0.2b1.dist-info/METADATA,sha256=_voF9wDpeJ2vIPFXZixsmX6V8F2bFDthSwR4NLOKQ-o,2421
69
+ algokit_utils-4.0.2b1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
70
+ algokit_utils-4.0.2b1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.2
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any