algokit-utils 3.0.0b5__py3-none-any.whl → 3.0.0b7__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.
- algokit_utils/_legacy_v2/application_client.py +1 -0
- algokit_utils/applications/abi.py +3 -0
- algokit_utils/applications/app_deployer.py +40 -6
- algokit_utils/clients/client_manager.py +1 -0
- algokit_utils/config.py +54 -60
- algokit_utils/models/transaction.py +1 -1
- algokit_utils/transactions/transaction_composer.py +14 -10
- {algokit_utils-3.0.0b5.dist-info → algokit_utils-3.0.0b7.dist-info}/METADATA +2 -2
- {algokit_utils-3.0.0b5.dist-info → algokit_utils-3.0.0b7.dist-info}/RECORD +11 -11
- {algokit_utils-3.0.0b5.dist-info → algokit_utils-3.0.0b7.dist-info}/LICENSE +0 -0
- {algokit_utils-3.0.0b5.dist-info → algokit_utils-3.0.0b7.dist-info}/WHEEL +0 -0
|
@@ -74,6 +74,7 @@ __all__ = [
|
|
|
74
74
|
representing an ABI method name or signature"""
|
|
75
75
|
|
|
76
76
|
|
|
77
|
+
@deprecated("Use 'algokit_utils.calculate_extra_program_pages' instead.")
|
|
77
78
|
def num_extra_program_pages(approval: bytes, clear: bytes) -> int:
|
|
78
79
|
"""Calculate minimum number of extra_pages required for provided approval and clear programs"""
|
|
79
80
|
|
|
@@ -51,12 +51,14 @@ class ABIReturn:
|
|
|
51
51
|
:ivar value: The decoded return value from the method call
|
|
52
52
|
:ivar method: The ABI method definition
|
|
53
53
|
:ivar decode_error: The exception that occurred during decoding, if any
|
|
54
|
+
:ivar tx_info: The transaction info for the method call from raw algosdk `ABIResult`
|
|
54
55
|
"""
|
|
55
56
|
|
|
56
57
|
raw_value: bytes | None = None
|
|
57
58
|
value: ABIValue | None = None
|
|
58
59
|
method: AlgorandABIMethod | None = None
|
|
59
60
|
decode_error: Exception | None = None
|
|
61
|
+
tx_info: dict[str, Any] | None = None
|
|
60
62
|
|
|
61
63
|
def __init__(self, result: ABIResult) -> None:
|
|
62
64
|
self.decode_error = result.decode_error
|
|
@@ -64,6 +66,7 @@ class ABIReturn:
|
|
|
64
66
|
self.raw_value = result.raw_value
|
|
65
67
|
self.value = result.return_value
|
|
66
68
|
self.method = result.method
|
|
69
|
+
self.tx_info = result.tx_info
|
|
67
70
|
|
|
68
71
|
@property
|
|
69
72
|
def is_success(self) -> bool:
|
|
@@ -21,6 +21,7 @@ from algokit_utils.transactions.transaction_composer import (
|
|
|
21
21
|
AppUpdateMethodCallParams,
|
|
22
22
|
AppUpdateParams,
|
|
23
23
|
TransactionComposer,
|
|
24
|
+
calculate_extra_program_pages,
|
|
24
25
|
)
|
|
25
26
|
from algokit_utils.transactions.transaction_sender import (
|
|
26
27
|
AlgorandClientTransactionSender,
|
|
@@ -169,7 +170,7 @@ class AppDeployer:
|
|
|
169
170
|
f"{'teal code' if isinstance(deployment.create_params.approval_program, str) else 'AVM bytecode'} and "
|
|
170
171
|
f"{len(deployment.create_params.clear_state_program)} bytes of "
|
|
171
172
|
f"{'teal code' if isinstance(deployment.create_params.clear_state_program, str) else 'AVM bytecode'}",
|
|
172
|
-
|
|
173
|
+
extra={"suppress_log": suppress_log},
|
|
173
174
|
)
|
|
174
175
|
note = TransactionComposer.arc2_note(
|
|
175
176
|
{
|
|
@@ -242,9 +243,13 @@ class AppDeployer:
|
|
|
242
243
|
|
|
243
244
|
existing_approval = base64.b64encode(existing_app_record.approval_program).decode()
|
|
244
245
|
existing_clear = base64.b64encode(existing_app_record.clear_state_program).decode()
|
|
246
|
+
existing_extra_pages = calculate_extra_program_pages(
|
|
247
|
+
existing_app_record.approval_program, existing_app_record.clear_state_program
|
|
248
|
+
)
|
|
245
249
|
|
|
246
250
|
new_approval = base64.b64encode(approval_program).decode()
|
|
247
251
|
new_clear = base64.b64encode(clear_program).decode()
|
|
252
|
+
new_extra_pages = calculate_extra_program_pages(approval_program, clear_program)
|
|
248
253
|
|
|
249
254
|
is_update = new_approval != existing_approval or new_clear != existing_clear
|
|
250
255
|
is_schema_break = (
|
|
@@ -256,6 +261,7 @@ class AppDeployer:
|
|
|
256
261
|
< (deployment.create_params.schema.get("local_byte_slices", 0) if deployment.create_params.schema else 0)
|
|
257
262
|
or existing_app_record.global_byte_slices
|
|
258
263
|
< (deployment.create_params.schema.get("global_byte_slices", 0) if deployment.create_params.schema else 0)
|
|
264
|
+
or existing_extra_pages < new_extra_pages
|
|
259
265
|
)
|
|
260
266
|
|
|
261
267
|
if is_schema_break:
|
|
@@ -269,8 +275,8 @@ class AppDeployer:
|
|
|
269
275
|
"local_byte_slices": existing_app_record.local_byte_slices,
|
|
270
276
|
},
|
|
271
277
|
"to": deployment.create_params.schema,
|
|
278
|
+
"suppress_log": suppress_log,
|
|
272
279
|
},
|
|
273
|
-
suppress_log=suppress_log,
|
|
274
280
|
)
|
|
275
281
|
|
|
276
282
|
return self._handle_schema_break(
|
|
@@ -288,7 +294,7 @@ class AppDeployer:
|
|
|
288
294
|
clear_program=clear_program,
|
|
289
295
|
)
|
|
290
296
|
|
|
291
|
-
logger.debug("No detected changes in app, nothing to do.",
|
|
297
|
+
logger.debug("No detected changes in app, nothing to do.", extra={"suppress_log": suppress_log})
|
|
292
298
|
return AppDeployResult(
|
|
293
299
|
app=existing_app,
|
|
294
300
|
operation_performed=OperationPerformed.Nothing,
|
|
@@ -340,6 +346,12 @@ class AppDeployer:
|
|
|
340
346
|
)
|
|
341
347
|
|
|
342
348
|
self._update_app_lookup(deployment.create_params.sender, app_metadata)
|
|
349
|
+
logger.debug(
|
|
350
|
+
f"Sent transaction ID {create_result.app_id} (AppCreate) from {deployment.create_params.sender}",
|
|
351
|
+
extra={
|
|
352
|
+
"suppress_log": deployment.send_params.get("suppress_log") or False if deployment.send_params else False
|
|
353
|
+
},
|
|
354
|
+
)
|
|
343
355
|
|
|
344
356
|
return AppDeployResult(
|
|
345
357
|
app=app_metadata,
|
|
@@ -412,6 +424,13 @@ class AppDeployer:
|
|
|
412
424
|
deleted=False,
|
|
413
425
|
)
|
|
414
426
|
self._update_app_lookup(deployment.create_params.sender, app_metadata)
|
|
427
|
+
logger.debug(
|
|
428
|
+
f"Group transaction sent: Replaced app {existing_app.app_id} with new app {app_id} from "
|
|
429
|
+
f"{deployment.create_params.sender} (Composer group count: {composer.count()})",
|
|
430
|
+
extra={
|
|
431
|
+
"suppress_log": deployment.send_params.get("suppress_log") or False if deployment.send_params else False
|
|
432
|
+
},
|
|
433
|
+
)
|
|
415
434
|
|
|
416
435
|
return AppDeployResult(
|
|
417
436
|
app=app_metadata,
|
|
@@ -464,6 +483,12 @@ class AppDeployer:
|
|
|
464
483
|
)
|
|
465
484
|
|
|
466
485
|
self._update_app_lookup(deployment.create_params.sender, app_metadata)
|
|
486
|
+
logger.debug(
|
|
487
|
+
f"Sent transaction ID {existing_app.app_id} (AppUpdate) from {deployment.create_params.sender}",
|
|
488
|
+
extra={
|
|
489
|
+
"suppress_log": deployment.send_params.get("suppress_log") or False if deployment.send_params else False
|
|
490
|
+
},
|
|
491
|
+
)
|
|
467
492
|
|
|
468
493
|
return AppDeployResult(
|
|
469
494
|
app=app_metadata,
|
|
@@ -491,7 +516,10 @@ class AppDeployer:
|
|
|
491
516
|
if existing_app.deletable:
|
|
492
517
|
return self._replace_app(deployment, existing_app, approval_program, clear_program)
|
|
493
518
|
else:
|
|
494
|
-
raise ValueError(
|
|
519
|
+
raise ValueError(
|
|
520
|
+
f"App is {'not' if not existing_app.deletable else ''} deletable and onSchemaBreak=ReplaceApp, "
|
|
521
|
+
"cannot delete and recreate app"
|
|
522
|
+
)
|
|
495
523
|
|
|
496
524
|
def _handle_update(
|
|
497
525
|
self,
|
|
@@ -512,13 +540,19 @@ class AppDeployer:
|
|
|
512
540
|
if existing_app.updatable:
|
|
513
541
|
return self._update_app(deployment, existing_app, approval_program, clear_program)
|
|
514
542
|
else:
|
|
515
|
-
raise ValueError(
|
|
543
|
+
raise ValueError(
|
|
544
|
+
f"App is {'not' if not existing_app.updatable else ''} updatable and onUpdate=UpdateApp, "
|
|
545
|
+
"cannot update app"
|
|
546
|
+
)
|
|
516
547
|
|
|
517
548
|
if deployment.on_update in (OnUpdate.ReplaceApp, "replace"):
|
|
518
549
|
if existing_app.deletable:
|
|
519
550
|
return self._replace_app(deployment, existing_app, approval_program, clear_program)
|
|
520
551
|
else:
|
|
521
|
-
raise ValueError(
|
|
552
|
+
raise ValueError(
|
|
553
|
+
f"App is {'not' if not existing_app.deletable else ''} deletable and onUpdate=ReplaceApp, "
|
|
554
|
+
"cannot delete and recreate app"
|
|
555
|
+
)
|
|
522
556
|
|
|
523
557
|
raise ValueError(f"Unsupported onUpdate value: {deployment.on_update}")
|
|
524
558
|
|
algokit_utils/config.py
CHANGED
|
@@ -2,71 +2,58 @@ import logging
|
|
|
2
2
|
import os
|
|
3
3
|
from collections.abc import Callable
|
|
4
4
|
from pathlib import Path
|
|
5
|
-
from typing import Any
|
|
6
5
|
|
|
7
6
|
# Environment variable to override the project root
|
|
8
7
|
ALGOKIT_PROJECT_ROOT = os.getenv("ALGOKIT_PROJECT_ROOT")
|
|
9
8
|
ALGOKIT_CONFIG_FILENAME = ".algokit.toml"
|
|
10
9
|
|
|
11
10
|
|
|
12
|
-
class AlgoKitLogger:
|
|
13
|
-
def __init__(self
|
|
14
|
-
|
|
15
|
-
self._setup_logger()
|
|
16
|
-
|
|
17
|
-
def _setup_logger(self) -> None:
|
|
18
|
-
formatter = logging.Formatter("%(levelname)s: %(message)s")
|
|
19
|
-
handler = logging.StreamHandler()
|
|
20
|
-
handler.setFormatter(formatter)
|
|
21
|
-
self._logger.addHandler(handler)
|
|
22
|
-
self._logger.setLevel(logging.INFO)
|
|
23
|
-
|
|
24
|
-
def _get_logger(self, *, suppress_log: bool = False) -> logging.Logger:
|
|
25
|
-
if suppress_log:
|
|
26
|
-
null_logger = logging.getLogger("null")
|
|
27
|
-
null_logger.addHandler(logging.NullHandler())
|
|
28
|
-
return null_logger
|
|
29
|
-
return self._logger
|
|
30
|
-
|
|
31
|
-
def error(self, message: str, *args: Any, suppress_log: bool = False, **kwargs: Any) -> None:
|
|
32
|
-
"""Log an error message, optionally suppressing output"""
|
|
33
|
-
self._get_logger(suppress_log=suppress_log).error(message, *args, **kwargs)
|
|
11
|
+
class AlgoKitLogger(logging.Logger):
|
|
12
|
+
def __init__(self, name: str = "algokit-utils-py", level: int = logging.NOTSET):
|
|
13
|
+
super().__init__(name, level)
|
|
34
14
|
|
|
35
|
-
def
|
|
36
|
-
"""
|
|
37
|
-
|
|
15
|
+
def _log(self, level: int, msg: object, args, exc_info=None, extra=None, stack_info=False, stacklevel=1) -> None: # type: ignore[no-untyped-def] # noqa: FBT002, ANN001
|
|
16
|
+
"""
|
|
17
|
+
Overrides the base _log method to allow suppressing individual log calls.
|
|
18
|
+
When a caller passes suppress_log=True in the extra keyword, the log call is ignored.
|
|
19
|
+
"""
|
|
38
20
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
21
|
+
# Check if the 'suppress_log' flag is provided in the extra dictionary.
|
|
22
|
+
if extra and extra.get("suppress_log", False):
|
|
23
|
+
return
|
|
24
|
+
# Call the parent _log
|
|
25
|
+
super()._log(level, msg, args, exc_info, extra, stack_info, stacklevel)
|
|
42
26
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
@classmethod
|
|
28
|
+
def get_null_logger(cls) -> logging.Logger:
|
|
29
|
+
"""Return a logger that does nothing (a null logger)."""
|
|
30
|
+
null_logger = logging.getLogger("null")
|
|
31
|
+
null_logger.handlers.clear()
|
|
32
|
+
null_logger.addHandler(logging.NullHandler())
|
|
33
|
+
null_logger.propagate = False
|
|
34
|
+
return null_logger
|
|
46
35
|
|
|
47
|
-
def debug(self, message: str, *args: Any, suppress_log: bool = False, **kwargs: Any) -> None:
|
|
48
|
-
"""Log a debug message, optionally suppressing output"""
|
|
49
|
-
self._get_logger(suppress_log=suppress_log).debug(message, *args, **kwargs)
|
|
50
36
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
self._get_logger(suppress_log=suppress_log).debug(message, *args, **kwargs)
|
|
37
|
+
# Set our custom logger class as the default.
|
|
38
|
+
logging.setLoggerClass(AlgoKitLogger)
|
|
54
39
|
|
|
55
40
|
|
|
56
41
|
class UpdatableConfig:
|
|
57
|
-
"""
|
|
42
|
+
"""
|
|
43
|
+
Class to manage and update configuration settings for the AlgoKit project.
|
|
58
44
|
|
|
59
45
|
Attributes:
|
|
60
46
|
debug (bool): Indicates whether debug mode is enabled.
|
|
61
47
|
project_root (Path | None): The path to the project root directory.
|
|
62
48
|
trace_all (bool): Indicates whether to trace all operations.
|
|
63
|
-
trace_buffer_size_mb (int): The size of the trace buffer in megabytes.
|
|
49
|
+
trace_buffer_size_mb (int | float): The size of the trace buffer in megabytes.
|
|
64
50
|
max_search_depth (int): The maximum depth to search for a specific file.
|
|
65
|
-
populate_app_call_resources (bool):
|
|
51
|
+
populate_app_call_resources (bool): Whether to populate app call resources.
|
|
52
|
+
logger (logging.Logger): The logger instance to use. Defaults to an AlgoKitLogger instance.
|
|
66
53
|
"""
|
|
67
54
|
|
|
68
55
|
def __init__(self) -> None:
|
|
69
|
-
self._logger = AlgoKitLogger()
|
|
56
|
+
self._logger: logging.Logger = AlgoKitLogger()
|
|
70
57
|
self._debug: bool = False
|
|
71
58
|
self._project_root: Path | None = None
|
|
72
59
|
self._trace_all: bool = False
|
|
@@ -76,17 +63,20 @@ class UpdatableConfig:
|
|
|
76
63
|
self._configure_project_root()
|
|
77
64
|
|
|
78
65
|
def _configure_project_root(self) -> None:
|
|
79
|
-
"""
|
|
66
|
+
"""
|
|
67
|
+
Configures the project root by searching for a specific file within a depth limit.
|
|
68
|
+
"""
|
|
80
69
|
current_path = Path(__file__).resolve()
|
|
81
70
|
for _ in range(self._max_search_depth):
|
|
82
|
-
self.
|
|
71
|
+
self._logger.debug(f"Searching in: {current_path}")
|
|
83
72
|
if (current_path / ALGOKIT_CONFIG_FILENAME).exists():
|
|
84
73
|
self._project_root = current_path
|
|
85
74
|
break
|
|
86
75
|
current_path = current_path.parent
|
|
87
76
|
|
|
88
77
|
@property
|
|
89
|
-
def logger(self) ->
|
|
78
|
+
def logger(self) -> logging.Logger:
|
|
79
|
+
"""Returns the logger instance."""
|
|
90
80
|
return self._logger
|
|
91
81
|
|
|
92
82
|
@property
|
|
@@ -101,7 +91,7 @@ class UpdatableConfig:
|
|
|
101
91
|
|
|
102
92
|
@property
|
|
103
93
|
def trace_all(self) -> bool:
|
|
104
|
-
"""Indicates whether
|
|
94
|
+
"""Indicates whether simulation traces for all operations should be stored."""
|
|
105
95
|
return self._trace_all
|
|
106
96
|
|
|
107
97
|
@property
|
|
@@ -111,10 +101,13 @@ class UpdatableConfig:
|
|
|
111
101
|
|
|
112
102
|
@property
|
|
113
103
|
def populate_app_call_resource(self) -> bool:
|
|
104
|
+
"""Indicates whether or not to populate app call resources."""
|
|
114
105
|
return self._populate_app_call_resources
|
|
115
106
|
|
|
116
107
|
def with_debug(self, func: Callable[[], str | None]) -> None:
|
|
117
|
-
"""
|
|
108
|
+
"""
|
|
109
|
+
Executes a function with debug mode temporarily enabled.
|
|
110
|
+
"""
|
|
118
111
|
original_debug = self._debug
|
|
119
112
|
try:
|
|
120
113
|
self._debug = True
|
|
@@ -131,26 +124,27 @@ class UpdatableConfig:
|
|
|
131
124
|
trace_buffer_size_mb: float = 256,
|
|
132
125
|
max_search_depth: int = 10,
|
|
133
126
|
populate_app_call_resources: bool = False,
|
|
127
|
+
logger: logging.Logger | None = None,
|
|
134
128
|
) -> None:
|
|
135
129
|
"""
|
|
136
130
|
Configures various settings for the application.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
:param
|
|
144
|
-
:param
|
|
145
|
-
:param trace_all: Indicates whether to trace all operations. Defaults to False. Which implies that
|
|
146
|
-
only the operations that are failed will be traced by default.
|
|
147
|
-
:param trace_buffer_size_mb: The size of the trace buffer in megabytes. Defaults to 256
|
|
148
|
-
:param max_search_depth: The maximum depth to search for a specific file. Defaults to 10
|
|
149
|
-
:param populate_app_call_resources: Indicates whether to populate app call resources. Defaults to False
|
|
131
|
+
|
|
132
|
+
:param debug: Whether debug mode is enabled.
|
|
133
|
+
:param project_root: The path to the project root directory.
|
|
134
|
+
:param trace_all: Whether to trace all operations. Defaults to False.
|
|
135
|
+
:param trace_buffer_size_mb: The trace buffer size in megabytes. Defaults to 256.
|
|
136
|
+
:param max_search_depth: The maximum depth to search for a specific file. Defaults to 10.
|
|
137
|
+
:param populate_app_call_resources: Whether to populate app call resources. Defaults to False.
|
|
138
|
+
:param logger: A custom logger to use. Defaults to AlgoKitLogger instance.
|
|
150
139
|
"""
|
|
140
|
+
if logger is not None:
|
|
141
|
+
self._logger = logger
|
|
151
142
|
|
|
152
143
|
if debug is not None:
|
|
153
144
|
self._debug = debug
|
|
145
|
+
# Update logger's level so debug messages are processed only when debug is True.
|
|
146
|
+
self._logger.setLevel(logging.DEBUG)
|
|
147
|
+
|
|
154
148
|
if project_root is not None:
|
|
155
149
|
self._project_root = project_root.resolve(strict=True)
|
|
156
150
|
elif debug is not None and ALGOKIT_PROJECT_ROOT:
|
|
@@ -45,7 +45,7 @@ TransactionNote = bytes | TransactionNoteData | Arc2TransactionNote
|
|
|
45
45
|
TxnTypeT = TypeVar("TxnTypeT", bound=algosdk.transaction.Transaction)
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
class TransactionWrapper
|
|
48
|
+
class TransactionWrapper:
|
|
49
49
|
"""Wrapper around algosdk.transaction.Transaction with optional property validators"""
|
|
50
50
|
|
|
51
51
|
def __init__(self, transaction: algosdk.transaction.Transaction) -> None:
|
|
@@ -68,6 +68,7 @@ __all__ = [
|
|
|
68
68
|
"TransactionComposer",
|
|
69
69
|
"TransactionComposerBuildResult",
|
|
70
70
|
"TxnParams",
|
|
71
|
+
"calculate_extra_program_pages",
|
|
71
72
|
"populate_app_call_resources",
|
|
72
73
|
"prepare_group_for_sending",
|
|
73
74
|
"send_atomic_transaction_composer",
|
|
@@ -797,7 +798,7 @@ def _find_available_transaction_index(
|
|
|
797
798
|
return next((i for i, txn in enumerate(txns) if check_transaction(txn)), -1)
|
|
798
799
|
|
|
799
800
|
|
|
800
|
-
def
|
|
801
|
+
def calculate_extra_program_pages(approval: bytes | None, clear: bytes | None) -> int:
|
|
801
802
|
"""Calculate minimum number of extra_pages required for provided approval and clear programs"""
|
|
802
803
|
total = len(approval or b"") + len(clear or b"")
|
|
803
804
|
return max(0, (total - 1) // algosdk.constants.APP_PAGE_MAX_SIZE)
|
|
@@ -1226,11 +1227,11 @@ def send_atomic_transaction_composer( # noqa: C901, PLR0912
|
|
|
1226
1227
|
if not suppress_log:
|
|
1227
1228
|
logger.info(
|
|
1228
1229
|
f"Sending group of {len(transactions_to_send)} transactions ({group_id})",
|
|
1229
|
-
|
|
1230
|
+
extra={"suppress_log": suppress_log or False},
|
|
1230
1231
|
)
|
|
1231
1232
|
logger.debug(
|
|
1232
1233
|
f"Transaction IDs ({group_id}): {[t.get_txid() for t in transactions_to_send]}",
|
|
1233
|
-
|
|
1234
|
+
extra={"suppress_log": suppress_log or False},
|
|
1234
1235
|
)
|
|
1235
1236
|
|
|
1236
1237
|
# Simulate if debug enabled
|
|
@@ -1250,12 +1251,12 @@ def send_atomic_transaction_composer( # noqa: C901, PLR0912
|
|
|
1250
1251
|
if len(transactions_to_send) > 1:
|
|
1251
1252
|
logger.info(
|
|
1252
1253
|
f"Group transaction ({group_id}) sent with {len(transactions_to_send)} transactions",
|
|
1253
|
-
|
|
1254
|
+
extra={"suppress_log": suppress_log or False},
|
|
1254
1255
|
)
|
|
1255
1256
|
else:
|
|
1256
1257
|
logger.info(
|
|
1257
1258
|
f"Sent transaction ID {transactions_to_send[0].get_txid()}",
|
|
1258
|
-
|
|
1259
|
+
extra={"suppress_log": suppress_log or False},
|
|
1259
1260
|
)
|
|
1260
1261
|
|
|
1261
1262
|
# Get confirmations if not skipping
|
|
@@ -1277,8 +1278,9 @@ def send_atomic_transaction_composer( # noqa: C901, PLR0912
|
|
|
1277
1278
|
if config.debug:
|
|
1278
1279
|
logger.error(
|
|
1279
1280
|
"Received error executing Atomic Transaction Composer and debug flag enabled; "
|
|
1280
|
-
"attempting simulation to get more information",
|
|
1281
|
-
|
|
1281
|
+
"attempting simulation to get more information ",
|
|
1282
|
+
extra={"suppress_log": suppress_log or False},
|
|
1283
|
+
exc_info=e,
|
|
1282
1284
|
)
|
|
1283
1285
|
|
|
1284
1286
|
simulate = None
|
|
@@ -1312,7 +1314,8 @@ def send_atomic_transaction_composer( # noqa: C901, PLR0912
|
|
|
1312
1314
|
|
|
1313
1315
|
logger.error(
|
|
1314
1316
|
"Received error executing Atomic Transaction Composer, for more information enable the debug flag",
|
|
1315
|
-
|
|
1317
|
+
extra={"suppress_log": suppress_log or False},
|
|
1318
|
+
exc_info=e,
|
|
1316
1319
|
)
|
|
1317
1320
|
raise e
|
|
1318
1321
|
|
|
@@ -1984,7 +1987,7 @@ class TransactionComposer:
|
|
|
1984
1987
|
if app_id == 0:
|
|
1985
1988
|
extra_pages = getattr(params, "extra_program_pages", None)
|
|
1986
1989
|
if extra_pages is None and approval_program is not None:
|
|
1987
|
-
extra_pages =
|
|
1990
|
+
extra_pages = calculate_extra_program_pages(approval_program, clear_program)
|
|
1988
1991
|
|
|
1989
1992
|
txn_params = {
|
|
1990
1993
|
"app_id": app_id,
|
|
@@ -2121,7 +2124,8 @@ class TransactionComposer:
|
|
|
2121
2124
|
num_uints=params.schema.get("local_ints", 0),
|
|
2122
2125
|
num_byte_slices=params.schema.get("local_byte_slices", 0),
|
|
2123
2126
|
),
|
|
2124
|
-
"extra_pages": params.extra_program_pages
|
|
2127
|
+
"extra_pages": params.extra_program_pages
|
|
2128
|
+
or calculate_extra_program_pages(approval_program, clear_program),
|
|
2125
2129
|
}
|
|
2126
2130
|
|
|
2127
2131
|
return self._common_txn_build_step(lambda x: algosdk.transaction.ApplicationCallTxn(**x), params, txn_params)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: algokit-utils
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0b7
|
|
4
4
|
Summary: Utilities for Algorand development for use by AlgoKit
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Algorand Foundation
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
-
Requires-Dist: httpx (>=0.
|
|
15
|
+
Requires-Dist: httpx (>=0.23.1,<0.24.0)
|
|
16
16
|
Requires-Dist: py-algorand-sdk (>=2.4.0,<3.0.0)
|
|
17
17
|
Requires-Dist: typing-extensions (>=4.6.0)
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
@@ -4,7 +4,7 @@ algokit_utils/_legacy_v2/__init__.py,sha256=WcRE30axWjGnBB09bJCeTw9NT-2_jDN_CVJI
|
|
|
4
4
|
algokit_utils/_legacy_v2/_ensure_funded.py,sha256=tw4ZEcqsKBHbSCH9gPz3V2onGaj1kyv6BM9V59fLgCU,6931
|
|
5
5
|
algokit_utils/_legacy_v2/_transfer.py,sha256=FRut71CU8kDn4-FqMepwZGjFPhPtQg5Wv5_kdtVqK-8,6256
|
|
6
6
|
algokit_utils/_legacy_v2/account.py,sha256=_4pxTKO6y9XK4CkUb1M9Du_XVXKeU1MWXHx54KPVbMk,8240
|
|
7
|
-
algokit_utils/_legacy_v2/application_client.py,sha256=
|
|
7
|
+
algokit_utils/_legacy_v2/application_client.py,sha256=Gb7WldXLi0V92YfeU19HP1rJ-L4Rmz2Lxm2q45tQJ2s,59610
|
|
8
8
|
algokit_utils/_legacy_v2/application_specification.py,sha256=wp2Y9ou2_F-bSFbDnm6AEhFexybmD7-fAT0CuWtO26g,521
|
|
9
9
|
algokit_utils/_legacy_v2/asset.py,sha256=b4GEzsPuHAbb330ZjoyY3lol0SisQGwJiOpnXvuXvJI,7594
|
|
10
10
|
algokit_utils/_legacy_v2/common.py,sha256=lB6zHUDJSjYiZ41hvcG0P5TZk_t-n2Iy0OXuQcJosm0,823
|
|
@@ -20,9 +20,9 @@ algokit_utils/algorand.py,sha256=Gtx3vspZmSxUrNWmh09NFQB24G4v4CEogYuRX_9o5Xw,105
|
|
|
20
20
|
algokit_utils/application_client.py,sha256=5UIxXIBjukjRyjZPCeXmaNlAftbb3TziV7EfBolW79k,337
|
|
21
21
|
algokit_utils/application_specification.py,sha256=-ZM13Qv-AcLmwudJCq8xGPoWLvAvKBICgAdHeFozKbY,1416
|
|
22
22
|
algokit_utils/applications/__init__.py,sha256=NGjhpBeExsQZOAYCT2QUFag1xuKoFiX-Ux5SR2GNzd8,452
|
|
23
|
-
algokit_utils/applications/abi.py,sha256=
|
|
23
|
+
algokit_utils/applications/abi.py,sha256=IhrEUdg2kDzR4iU5_FzUDjlMIHO7Rfe-ibJ6z9CMUq8,10260
|
|
24
24
|
algokit_utils/applications/app_client.py,sha256=oAwe9_6-ETWJIdXNScDvUiVYN8JNP4kplSnr3qCQPVY,84979
|
|
25
|
-
algokit_utils/applications/app_deployer.py,sha256=
|
|
25
|
+
algokit_utils/applications/app_deployer.py,sha256=MD7RIvh6Z6dFr9sx8dP5nP1DzSEbwz-vX-Exz_CwoN4,24740
|
|
26
26
|
algokit_utils/applications/app_factory.py,sha256=wljyXuXWaMc3KJkDeACJ5XVEfIsVxeSXqdGTJ9p3tJQ,33425
|
|
27
27
|
algokit_utils/applications/app_manager.py,sha256=EA1uRtmvPVAdKi1I5HSCpHjIDgLN7eZcEPT0Cj3C7fU,17661
|
|
28
28
|
algokit_utils/applications/app_spec/__init__.py,sha256=HtjAhAqHNFml9WbRKGmhJnwyJeW8AztPRO_BriQ84vs,140
|
|
@@ -38,10 +38,10 @@ algokit_utils/beta/algorand_client.py,sha256=xDFvsMSha0Ki42BGvKvfScQWT_W9y4GeP_R
|
|
|
38
38
|
algokit_utils/beta/client_manager.py,sha256=xDFvsMSha0Ki42BGvKvfScQWT_W9y4GeP_RWXjc3vnE,213
|
|
39
39
|
algokit_utils/beta/composer.py,sha256=xDFvsMSha0Ki42BGvKvfScQWT_W9y4GeP_RWXjc3vnE,213
|
|
40
40
|
algokit_utils/clients/__init__.py,sha256=qUuKBvfLnw4z6ZU9x7mc-mLjfnnXC9UcvtoeU33ZLJ8,136
|
|
41
|
-
algokit_utils/clients/client_manager.py,sha256=
|
|
41
|
+
algokit_utils/clients/client_manager.py,sha256=zRbDDQMo1QocTvtgDVQnDXT8sPPwwcdM8rhJ5k27FZM,25581
|
|
42
42
|
algokit_utils/clients/dispenser_api_client.py,sha256=lx6II3beCt7YiKO2TrW6UbsRVirf3NoWMJi8HD_W5nI,6045
|
|
43
43
|
algokit_utils/common.py,sha256=5wl83vWw91RYdEC4hTTufqaptKiFtgjKLIyONDmRSH0,300
|
|
44
|
-
algokit_utils/config.py,sha256=
|
|
44
|
+
algokit_utils/config.py,sha256=SFqfR_JKlx-pCOps1xF646oZqtIcRS2AtasiYne63E4,6051
|
|
45
45
|
algokit_utils/deploy.py,sha256=UUtSDI6JcBUuto62FuirhUlDcjZwQyLkiERgDMx8P7A,330
|
|
46
46
|
algokit_utils/dispenser_api.py,sha256=-EO4Dq3q_v4kSMey43kXJfoX8uCBPJpjEMTlLI7xn_I,324
|
|
47
47
|
algokit_utils/errors/__init__.py,sha256=CmuiLVjzMAOYxPaIIwmYCNArsso_RtS2ssFoNdp5CMs,61
|
|
@@ -54,17 +54,17 @@ algokit_utils/models/application.py,sha256=lM2_g5kZ18k_zyVzcbGvkvqHzksfb2sgRqowJ
|
|
|
54
54
|
algokit_utils/models/network.py,sha256=3QNcZ9jVmckv3CCxrD2Y1jiwBdBGdaaziiRgOpsqhwI,904
|
|
55
55
|
algokit_utils/models/simulate.py,sha256=F9OSEfA9QGFGe5po24h8IGLor5z1ogu5Cwm3l6cHnAs,236
|
|
56
56
|
algokit_utils/models/state.py,sha256=N6jsjZiZsz-Rn1ZDnBRvVv1En-lUrh97JuaaDRZtCkg,1478
|
|
57
|
-
algokit_utils/models/transaction.py,sha256=
|
|
57
|
+
algokit_utils/models/transaction.py,sha256=2JJLDbbbKEWaXkfx3rtcSjsQNVH6f8kyhY1iFBVW-Uc,3019
|
|
58
58
|
algokit_utils/network_clients.py,sha256=Nd096NpRM7z9iLLdLSC9HV9jl_8Y7sT9ft54mqfyxLA,251
|
|
59
59
|
algokit_utils/protocols/__init__.py,sha256=yD7ZxPEiERQ5ecJuz7BSM9uz1_GhamIaQWCnuVikgro,126
|
|
60
60
|
algokit_utils/protocols/account.py,sha256=CowaVY7ErBP84TWBHNvBjkZy18whPb8HIlMZtJRLh4w,624
|
|
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=
|
|
64
|
+
algokit_utils/transactions/transaction_composer.py,sha256=QA5j3l-UhnaCoohN9Pri8t_bPJrOrZh3ogYQf4FwDm0,95183
|
|
65
65
|
algokit_utils/transactions/transaction_creator.py,sha256=A1YHeGC2EkR2V0HPYJiXVOAEIrfjBW2KVyYgi3exm4E,6167
|
|
66
66
|
algokit_utils/transactions/transaction_sender.py,sha256=uQmHElJgUIxLXfdklMNoabjQQzUku8CFP82wwhfr44E,22769
|
|
67
|
-
algokit_utils-3.0.
|
|
68
|
-
algokit_utils-3.0.
|
|
69
|
-
algokit_utils-3.0.
|
|
70
|
-
algokit_utils-3.0.
|
|
67
|
+
algokit_utils-3.0.0b7.dist-info/LICENSE,sha256=J5i7U1Q9Q2c7saUzlvFRmrCCFhQyXb5Juz_LO5omNUw,1076
|
|
68
|
+
algokit_utils-3.0.0b7.dist-info/METADATA,sha256=3dnyhhb2GQYO2_jC_wNVrmbHWoCQBIk2wxyEb5F34r0,2420
|
|
69
|
+
algokit_utils-3.0.0b7.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
70
|
+
algokit_utils-3.0.0b7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|