algokit-utils 2.2.1b1__py3-none-any.whl → 2.2.2__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/application_client.py +43 -56
- algokit_utils/deploy.py +20 -6
- algokit_utils/logic_error.py +1 -2
- algokit_utils/models.py +108 -7
- {algokit_utils-2.2.1b1.dist-info → algokit_utils-2.2.2.dist-info}/METADATA +1 -1
- {algokit_utils-2.2.1b1.dist-info → algokit_utils-2.2.2.dist-info}/RECORD +8 -8
- {algokit_utils-2.2.1b1.dist-info → algokit_utils-2.2.2.dist-info}/WHEEL +1 -1
- {algokit_utils-2.2.1b1.dist-info → algokit_utils-2.2.2.dist-info}/LICENSE +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import base64
|
|
2
2
|
import copy
|
|
3
|
+
import dataclasses
|
|
3
4
|
import json
|
|
4
5
|
import logging
|
|
5
6
|
import re
|
|
@@ -58,7 +59,6 @@ if typing.TYPE_CHECKING:
|
|
|
58
59
|
from algosdk.v2client.algod import AlgodClient
|
|
59
60
|
from algosdk.v2client.indexer import IndexerClient
|
|
60
61
|
|
|
61
|
-
|
|
62
62
|
logger = logging.getLogger(__name__)
|
|
63
63
|
|
|
64
64
|
|
|
@@ -86,7 +86,7 @@ class ApplicationClient:
|
|
|
86
86
|
"""A class that wraps an ARC-0032 app spec and provides high productivity methods to deploy and call the app"""
|
|
87
87
|
|
|
88
88
|
@overload
|
|
89
|
-
def __init__(
|
|
89
|
+
def __init__(
|
|
90
90
|
self,
|
|
91
91
|
algod_client: "AlgodClient",
|
|
92
92
|
app_spec: au_spec.ApplicationSpecification | Path,
|
|
@@ -96,11 +96,10 @@ class ApplicationClient:
|
|
|
96
96
|
sender: str | None = None,
|
|
97
97
|
suggested_params: transaction.SuggestedParams | None = None,
|
|
98
98
|
template_values: au_deploy.TemplateValueMapping | None = None,
|
|
99
|
-
):
|
|
100
|
-
...
|
|
99
|
+
): ...
|
|
101
100
|
|
|
102
101
|
@overload
|
|
103
|
-
def __init__(
|
|
102
|
+
def __init__(
|
|
104
103
|
self,
|
|
105
104
|
algod_client: "AlgodClient",
|
|
106
105
|
app_spec: au_spec.ApplicationSpecification | Path,
|
|
@@ -113,8 +112,7 @@ class ApplicationClient:
|
|
|
113
112
|
suggested_params: transaction.SuggestedParams | None = None,
|
|
114
113
|
template_values: au_deploy.TemplateValueMapping | None = None,
|
|
115
114
|
app_name: str | None = None,
|
|
116
|
-
):
|
|
117
|
-
...
|
|
115
|
+
): ...
|
|
118
116
|
|
|
119
117
|
def __init__( # noqa: PLR0913
|
|
120
118
|
self,
|
|
@@ -253,7 +251,7 @@ class ApplicationClient:
|
|
|
253
251
|
target.signer, target.sender = target.get_signer_sender(
|
|
254
252
|
AccountTransactionSigner(signer.private_key) if isinstance(signer, Account) else signer, sender
|
|
255
253
|
)
|
|
256
|
-
target.template_values = self.template_values
|
|
254
|
+
target.template_values = {**self.template_values, **(template_values or {})}
|
|
257
255
|
|
|
258
256
|
def deploy( # noqa: PLR0913
|
|
259
257
|
self,
|
|
@@ -327,7 +325,7 @@ class ApplicationClient:
|
|
|
327
325
|
)
|
|
328
326
|
|
|
329
327
|
# make a copy and prepare variables
|
|
330
|
-
template_values = self.template_values
|
|
328
|
+
template_values = {**self.template_values, **(template_values or {})}
|
|
331
329
|
au_deploy.add_deploy_template_variables(template_values, allow_update=allow_update, allow_delete=allow_delete)
|
|
332
330
|
|
|
333
331
|
existing_app_metadata_or_reference = self._load_app_reference()
|
|
@@ -377,7 +375,7 @@ class ApplicationClient:
|
|
|
377
375
|
) -> None:
|
|
378
376
|
"""Adds a signed transaction with application id == 0 and the schema and source of client's app_spec to atc"""
|
|
379
377
|
approval_program, clear_program = self._check_is_compiled()
|
|
380
|
-
transaction_parameters = _convert_transaction_parameters(transaction_parameters)
|
|
378
|
+
transaction_parameters = _convert_transaction_parameters(CreateCallParameters, transaction_parameters)
|
|
381
379
|
|
|
382
380
|
extra_pages = transaction_parameters.extra_pages or num_extra_program_pages(
|
|
383
381
|
approval_program.raw_binary, clear_program.raw_binary
|
|
@@ -390,7 +388,7 @@ class ApplicationClient:
|
|
|
390
388
|
abi_args=abi_kwargs,
|
|
391
389
|
on_complete=transaction_parameters.on_complete or transaction.OnComplete.NoOpOC,
|
|
392
390
|
call_config=au_spec.CallConfig.CREATE,
|
|
393
|
-
parameters=transaction_parameters,
|
|
391
|
+
parameters=_convert_transaction_parameters(TransactionParameters, transaction_parameters),
|
|
394
392
|
approval_program=approval_program.raw_binary,
|
|
395
393
|
clear_program=clear_program.raw_binary,
|
|
396
394
|
global_schema=self.app_spec.global_state_schema,
|
|
@@ -403,8 +401,7 @@ class ApplicationClient:
|
|
|
403
401
|
self,
|
|
404
402
|
call_abi_method: Literal[False],
|
|
405
403
|
transaction_parameters: CreateCallParameters | CreateCallParametersDict | None = ...,
|
|
406
|
-
) -> TransactionResponse:
|
|
407
|
-
...
|
|
404
|
+
) -> TransactionResponse: ...
|
|
408
405
|
|
|
409
406
|
@overload
|
|
410
407
|
def create(
|
|
@@ -412,8 +409,7 @@ class ApplicationClient:
|
|
|
412
409
|
call_abi_method: ABIMethod | Literal[True],
|
|
413
410
|
transaction_parameters: CreateCallParameters | CreateCallParametersDict | None = ...,
|
|
414
411
|
**abi_kwargs: ABIArgType,
|
|
415
|
-
) -> ABITransactionResponse:
|
|
416
|
-
...
|
|
412
|
+
) -> ABITransactionResponse: ...
|
|
417
413
|
|
|
418
414
|
@overload
|
|
419
415
|
def create(
|
|
@@ -421,8 +417,7 @@ class ApplicationClient:
|
|
|
421
417
|
call_abi_method: ABIMethod | bool | None = ...,
|
|
422
418
|
transaction_parameters: CreateCallParameters | CreateCallParametersDict | None = ...,
|
|
423
419
|
**abi_kwargs: ABIArgType,
|
|
424
|
-
) -> TransactionResponse | ABITransactionResponse:
|
|
425
|
-
...
|
|
420
|
+
) -> TransactionResponse | ABITransactionResponse: ...
|
|
426
421
|
|
|
427
422
|
def create(
|
|
428
423
|
self,
|
|
@@ -471,16 +466,14 @@ class ApplicationClient:
|
|
|
471
466
|
call_abi_method: ABIMethod | Literal[True],
|
|
472
467
|
transaction_parameters: TransactionParameters | TransactionParametersDict | None = ...,
|
|
473
468
|
**abi_kwargs: ABIArgType,
|
|
474
|
-
) -> ABITransactionResponse:
|
|
475
|
-
...
|
|
469
|
+
) -> ABITransactionResponse: ...
|
|
476
470
|
|
|
477
471
|
@overload
|
|
478
472
|
def update(
|
|
479
473
|
self,
|
|
480
474
|
call_abi_method: Literal[False],
|
|
481
475
|
transaction_parameters: TransactionParameters | TransactionParametersDict | None = ...,
|
|
482
|
-
) -> TransactionResponse:
|
|
483
|
-
...
|
|
476
|
+
) -> TransactionResponse: ...
|
|
484
477
|
|
|
485
478
|
@overload
|
|
486
479
|
def update(
|
|
@@ -488,8 +481,7 @@ class ApplicationClient:
|
|
|
488
481
|
call_abi_method: ABIMethod | bool | None = ...,
|
|
489
482
|
transaction_parameters: TransactionParameters | TransactionParametersDict | None = ...,
|
|
490
483
|
**abi_kwargs: ABIArgType,
|
|
491
|
-
) -> TransactionResponse | ABITransactionResponse:
|
|
492
|
-
...
|
|
484
|
+
) -> TransactionResponse | ABITransactionResponse: ...
|
|
493
485
|
|
|
494
486
|
def update(
|
|
495
487
|
self,
|
|
@@ -532,16 +524,14 @@ class ApplicationClient:
|
|
|
532
524
|
call_abi_method: ABIMethod | Literal[True],
|
|
533
525
|
transaction_parameters: TransactionParameters | TransactionParametersDict | None = ...,
|
|
534
526
|
**abi_kwargs: ABIArgType,
|
|
535
|
-
) -> ABITransactionResponse:
|
|
536
|
-
...
|
|
527
|
+
) -> ABITransactionResponse: ...
|
|
537
528
|
|
|
538
529
|
@overload
|
|
539
530
|
def delete(
|
|
540
531
|
self,
|
|
541
532
|
call_abi_method: Literal[False],
|
|
542
533
|
transaction_parameters: TransactionParameters | TransactionParametersDict | None = ...,
|
|
543
|
-
) -> TransactionResponse:
|
|
544
|
-
...
|
|
534
|
+
) -> TransactionResponse: ...
|
|
545
535
|
|
|
546
536
|
@overload
|
|
547
537
|
def delete(
|
|
@@ -549,8 +539,7 @@ class ApplicationClient:
|
|
|
549
539
|
call_abi_method: ABIMethod | bool | None = ...,
|
|
550
540
|
transaction_parameters: TransactionParameters | TransactionParametersDict | None = ...,
|
|
551
541
|
**abi_kwargs: ABIArgType,
|
|
552
|
-
) -> TransactionResponse | ABITransactionResponse:
|
|
553
|
-
...
|
|
542
|
+
) -> TransactionResponse | ABITransactionResponse: ...
|
|
554
543
|
|
|
555
544
|
def delete(
|
|
556
545
|
self,
|
|
@@ -578,12 +567,12 @@ class ApplicationClient:
|
|
|
578
567
|
**abi_kwargs: ABIArgType,
|
|
579
568
|
) -> None:
|
|
580
569
|
"""Adds a signed transaction with specified parameters to atc"""
|
|
581
|
-
_parameters = _convert_transaction_parameters(transaction_parameters)
|
|
570
|
+
_parameters = _convert_transaction_parameters(OnCompleteCallParameters, transaction_parameters)
|
|
582
571
|
self.add_method_call(
|
|
583
572
|
atc,
|
|
584
573
|
abi_method=call_abi_method,
|
|
585
574
|
abi_args=abi_kwargs,
|
|
586
|
-
parameters=
|
|
575
|
+
parameters=_convert_transaction_parameters(TransactionParameters, transaction_parameters),
|
|
587
576
|
on_complete=_parameters.on_complete or transaction.OnComplete.NoOpOC,
|
|
588
577
|
)
|
|
589
578
|
|
|
@@ -593,16 +582,14 @@ class ApplicationClient:
|
|
|
593
582
|
call_abi_method: ABIMethod | Literal[True],
|
|
594
583
|
transaction_parameters: OnCompleteCallParameters | OnCompleteCallParametersDict | None = ...,
|
|
595
584
|
**abi_kwargs: ABIArgType,
|
|
596
|
-
) -> ABITransactionResponse:
|
|
597
|
-
...
|
|
585
|
+
) -> ABITransactionResponse: ...
|
|
598
586
|
|
|
599
587
|
@overload
|
|
600
588
|
def call(
|
|
601
589
|
self,
|
|
602
590
|
call_abi_method: Literal[False],
|
|
603
591
|
transaction_parameters: OnCompleteCallParameters | OnCompleteCallParametersDict | None = ...,
|
|
604
|
-
) -> TransactionResponse:
|
|
605
|
-
...
|
|
592
|
+
) -> TransactionResponse: ...
|
|
606
593
|
|
|
607
594
|
@overload
|
|
608
595
|
def call(
|
|
@@ -610,8 +597,7 @@ class ApplicationClient:
|
|
|
610
597
|
call_abi_method: ABIMethod | bool | None = ...,
|
|
611
598
|
transaction_parameters: OnCompleteCallParameters | OnCompleteCallParametersDict | None = ...,
|
|
612
599
|
**abi_kwargs: ABIArgType,
|
|
613
|
-
) -> TransactionResponse | ABITransactionResponse:
|
|
614
|
-
...
|
|
600
|
+
) -> TransactionResponse | ABITransactionResponse: ...
|
|
615
601
|
|
|
616
602
|
def call(
|
|
617
603
|
self,
|
|
@@ -621,7 +607,7 @@ class ApplicationClient:
|
|
|
621
607
|
) -> TransactionResponse | ABITransactionResponse:
|
|
622
608
|
"""Submits a signed transaction with specified parameters"""
|
|
623
609
|
atc = AtomicTransactionComposer()
|
|
624
|
-
_parameters = _convert_transaction_parameters(transaction_parameters)
|
|
610
|
+
_parameters = _convert_transaction_parameters(OnCompleteCallParameters, transaction_parameters)
|
|
625
611
|
self.compose_call(
|
|
626
612
|
atc,
|
|
627
613
|
call_abi_method=call_abi_method,
|
|
@@ -667,16 +653,14 @@ class ApplicationClient:
|
|
|
667
653
|
call_abi_method: ABIMethod | Literal[True] = ...,
|
|
668
654
|
transaction_parameters: TransactionParameters | TransactionParametersDict | None = None,
|
|
669
655
|
**abi_kwargs: ABIArgType,
|
|
670
|
-
) -> ABITransactionResponse:
|
|
671
|
-
...
|
|
656
|
+
) -> ABITransactionResponse: ...
|
|
672
657
|
|
|
673
658
|
@overload
|
|
674
659
|
def opt_in(
|
|
675
660
|
self,
|
|
676
661
|
call_abi_method: Literal[False] = ...,
|
|
677
662
|
transaction_parameters: TransactionParameters | TransactionParametersDict | None = None,
|
|
678
|
-
) -> TransactionResponse:
|
|
679
|
-
...
|
|
663
|
+
) -> TransactionResponse: ...
|
|
680
664
|
|
|
681
665
|
@overload
|
|
682
666
|
def opt_in(
|
|
@@ -684,8 +668,7 @@ class ApplicationClient:
|
|
|
684
668
|
call_abi_method: ABIMethod | bool | None = ...,
|
|
685
669
|
transaction_parameters: TransactionParameters | TransactionParametersDict | None = ...,
|
|
686
670
|
**abi_kwargs: ABIArgType,
|
|
687
|
-
) -> TransactionResponse | ABITransactionResponse:
|
|
688
|
-
...
|
|
671
|
+
) -> TransactionResponse | ABITransactionResponse: ...
|
|
689
672
|
|
|
690
673
|
def opt_in(
|
|
691
674
|
self,
|
|
@@ -726,16 +709,14 @@ class ApplicationClient:
|
|
|
726
709
|
call_abi_method: ABIMethod | Literal[True],
|
|
727
710
|
transaction_parameters: TransactionParameters | TransactionParametersDict | None = ...,
|
|
728
711
|
**abi_kwargs: ABIArgType,
|
|
729
|
-
) -> ABITransactionResponse:
|
|
730
|
-
...
|
|
712
|
+
) -> ABITransactionResponse: ...
|
|
731
713
|
|
|
732
714
|
@overload
|
|
733
715
|
def close_out(
|
|
734
716
|
self,
|
|
735
717
|
call_abi_method: Literal[False],
|
|
736
718
|
transaction_parameters: TransactionParameters | TransactionParametersDict | None = ...,
|
|
737
|
-
) -> TransactionResponse:
|
|
738
|
-
...
|
|
719
|
+
) -> TransactionResponse: ...
|
|
739
720
|
|
|
740
721
|
@overload
|
|
741
722
|
def close_out(
|
|
@@ -743,8 +724,7 @@ class ApplicationClient:
|
|
|
743
724
|
call_abi_method: ABIMethod | bool | None = ...,
|
|
744
725
|
transaction_parameters: TransactionParameters | TransactionParametersDict | None = ...,
|
|
745
726
|
**abi_kwargs: ABIArgType,
|
|
746
|
-
) -> TransactionResponse | ABITransactionResponse:
|
|
747
|
-
...
|
|
727
|
+
) -> TransactionResponse | ABITransactionResponse: ...
|
|
748
728
|
|
|
749
729
|
def close_out(
|
|
750
730
|
self,
|
|
@@ -1023,7 +1003,7 @@ class ApplicationClient:
|
|
|
1023
1003
|
if app_id is None:
|
|
1024
1004
|
self._load_reference_and_check_app_id()
|
|
1025
1005
|
app_id = self.app_id
|
|
1026
|
-
parameters = _convert_transaction_parameters(parameters)
|
|
1006
|
+
parameters = _convert_transaction_parameters(TransactionParameters, parameters)
|
|
1027
1007
|
method = self._resolve_method(abi_method, abi_args, on_complete, call_config)
|
|
1028
1008
|
sp = parameters.suggested_params or self.suggested_params or self.algod_client.suggested_params()
|
|
1029
1009
|
signer, sender = self.resolve_signer_sender(parameters.signer, parameters.sender)
|
|
@@ -1337,11 +1317,18 @@ def _create_simulate_traces(simulate: SimulateAtomicTransactionResponse) -> list
|
|
|
1337
1317
|
return traces
|
|
1338
1318
|
|
|
1339
1319
|
|
|
1320
|
+
_TParams = typing.TypeVar("_TParams", TransactionParameters, OnCompleteCallParameters, CreateCallParameters)
|
|
1321
|
+
|
|
1322
|
+
|
|
1340
1323
|
def _convert_transaction_parameters(
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1324
|
+
cls: type[_TParams],
|
|
1325
|
+
args: object | None,
|
|
1326
|
+
) -> _TParams:
|
|
1327
|
+
if args is None:
|
|
1328
|
+
return cls()
|
|
1329
|
+
args_dict = args.__dict__ if not isinstance(args, dict) else (args or {})
|
|
1330
|
+
_args = {f.name: args_dict[f.name] for f in dataclasses.fields(cls) if f.name in args_dict}
|
|
1331
|
+
return cls(**_args)
|
|
1345
1332
|
|
|
1346
1333
|
|
|
1347
1334
|
def get_sender_from_signer(signer: TransactionSigner | None) -> str | None:
|
|
@@ -1390,7 +1377,7 @@ def _parse_result(
|
|
|
1390
1377
|
)
|
|
1391
1378
|
continue
|
|
1392
1379
|
|
|
1393
|
-
logs = tx_info
|
|
1380
|
+
logs = tx_info.get("logs", [])
|
|
1394
1381
|
|
|
1395
1382
|
# Look for the last returned value in the log
|
|
1396
1383
|
if not logs:
|
algokit_utils/deploy.py
CHANGED
|
@@ -23,6 +23,7 @@ from algokit_utils.models import (
|
|
|
23
23
|
ABIMethod,
|
|
24
24
|
Account,
|
|
25
25
|
CreateCallParameters,
|
|
26
|
+
TransactionParameters,
|
|
26
27
|
TransactionResponse,
|
|
27
28
|
)
|
|
28
29
|
|
|
@@ -724,7 +725,7 @@ class Deployer:
|
|
|
724
725
|
def _create_app(self) -> DeployResponse:
|
|
725
726
|
assert self.app_client.existing_deployments
|
|
726
727
|
|
|
727
|
-
method, abi_args, parameters =
|
|
728
|
+
method, abi_args, parameters = _convert_create_deploy_args(
|
|
728
729
|
self.create_args, self.new_app_metadata, self.signer, self.sender
|
|
729
730
|
)
|
|
730
731
|
create_response = self.app_client.create(
|
|
@@ -751,7 +752,7 @@ class Deployer:
|
|
|
751
752
|
f"{self.new_app_metadata.name} ({self.new_app_metadata.version}) in {self.creator} account."
|
|
752
753
|
)
|
|
753
754
|
atc = AtomicTransactionComposer()
|
|
754
|
-
create_method, create_abi_args, create_parameters =
|
|
755
|
+
create_method, create_abi_args, create_parameters = _convert_create_deploy_args(
|
|
755
756
|
self.create_args, self.new_app_metadata, self.signer, self.sender
|
|
756
757
|
)
|
|
757
758
|
self.app_client.compose_create(
|
|
@@ -850,11 +851,10 @@ def _convert_deploy_args(
|
|
|
850
851
|
note: AppDeployMetaData,
|
|
851
852
|
signer: TransactionSigner | None,
|
|
852
853
|
sender: str | None,
|
|
853
|
-
) -> tuple[ABIMethod | bool | None, ABIArgsDict,
|
|
854
|
+
) -> tuple[ABIMethod | bool | None, ABIArgsDict, TransactionParameters]:
|
|
854
855
|
args = _args.__dict__ if isinstance(_args, DeployCallArgs) else (_args or {})
|
|
855
856
|
|
|
856
|
-
|
|
857
|
-
parameters = CreateCallParameters(
|
|
857
|
+
parameters = TransactionParameters(
|
|
858
858
|
note=note.encode(),
|
|
859
859
|
signer=signer,
|
|
860
860
|
sender=sender,
|
|
@@ -865,11 +865,25 @@ def _convert_deploy_args(
|
|
|
865
865
|
foreign_apps=args.get("foreign_apps"),
|
|
866
866
|
boxes=args.get("boxes"),
|
|
867
867
|
rekey_to=args.get("rekey_to"),
|
|
868
|
+
)
|
|
869
|
+
|
|
870
|
+
return args.get("method"), args.get("args") or {}, parameters
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
def _convert_create_deploy_args(
|
|
874
|
+
_args: DeployCallArgs | DeployCallArgsDict | None,
|
|
875
|
+
note: AppDeployMetaData,
|
|
876
|
+
signer: TransactionSigner | None,
|
|
877
|
+
sender: str | None,
|
|
878
|
+
) -> tuple[ABIMethod | bool | None, ABIArgsDict, CreateCallParameters]:
|
|
879
|
+
method, args, parameters = _convert_deploy_args(_args, note, signer, sender)
|
|
880
|
+
create_parameters = CreateCallParameters(
|
|
881
|
+
**parameters.__dict__,
|
|
868
882
|
extra_pages=args.get("extra_pages"),
|
|
869
883
|
on_complete=args.get("on_complete"),
|
|
870
884
|
)
|
|
871
885
|
|
|
872
|
-
return
|
|
886
|
+
return method, args, create_parameters
|
|
873
887
|
|
|
874
888
|
|
|
875
889
|
def get_app_id_from_tx_id(algod_client: "AlgodClient", tx_id: str) -> int:
|
algokit_utils/logic_error.py
CHANGED
|
@@ -11,8 +11,7 @@ __all__ = [
|
|
|
11
11
|
]
|
|
12
12
|
|
|
13
13
|
LOGIC_ERROR = (
|
|
14
|
-
".*transaction (?P<transaction_id>[A-Z0-9]+): "
|
|
15
|
-
"logic eval error: (?P<message>.*). Details: pc=(?P<pc>[0-9]+), opcodes=.*"
|
|
14
|
+
".*transaction (?P<transaction_id>[A-Z0-9]+): logic eval error: (?P<message>.*). Details: .*pc=(?P<pc>[0-9]+).*"
|
|
16
15
|
)
|
|
17
16
|
|
|
18
17
|
|
algokit_utils/models.py
CHANGED
|
@@ -121,8 +121,7 @@ ABIArgsDict = dict[str, ABIArgType]
|
|
|
121
121
|
|
|
122
122
|
|
|
123
123
|
class ABIReturnSubroutine(Protocol):
|
|
124
|
-
def method_spec(self) -> Method:
|
|
125
|
-
...
|
|
124
|
+
def method_spec(self) -> Method: ...
|
|
126
125
|
|
|
127
126
|
|
|
128
127
|
ABIMethod: TypeAlias = ABIReturnSubroutine | Method | str
|
|
@@ -156,25 +155,86 @@ class TransactionParameters:
|
|
|
156
155
|
|
|
157
156
|
# CreateTransactionParameters is used by algokit-client-generator clients
|
|
158
157
|
@dataclasses.dataclass(kw_only=True)
|
|
159
|
-
class CreateTransactionParameters
|
|
158
|
+
class CreateTransactionParameters:
|
|
160
159
|
"""Additional parameters that can be included in a transaction when calling a create method"""
|
|
161
160
|
|
|
161
|
+
signer: TransactionSigner | None = None
|
|
162
|
+
"""Signer to use when signing this transaction"""
|
|
163
|
+
sender: str | None = None
|
|
164
|
+
"""Sender of this transaction"""
|
|
165
|
+
suggested_params: transaction.SuggestedParams | None = None
|
|
166
|
+
"""SuggestedParams to use for this transaction"""
|
|
167
|
+
note: bytes | str | None = None
|
|
168
|
+
"""Note for this transaction"""
|
|
169
|
+
lease: bytes | str | None = None
|
|
170
|
+
"""Lease value for this transaction"""
|
|
171
|
+
boxes: Sequence[tuple[int, bytes | bytearray | str | int]] | None = None
|
|
172
|
+
"""Box references to include in transaction. A sequence of (app id, box key) tuples"""
|
|
173
|
+
accounts: list[str] | None = None
|
|
174
|
+
"""Accounts to include in transaction"""
|
|
175
|
+
foreign_apps: list[int] | None = None
|
|
176
|
+
"""List of foreign apps (by app id) to include in transaction"""
|
|
177
|
+
foreign_assets: list[int] | None = None
|
|
178
|
+
"""List of foreign assets (by asset id) to include in transaction"""
|
|
179
|
+
rekey_to: str | None = None
|
|
180
|
+
"""Address to rekey to"""
|
|
162
181
|
extra_pages: int | None = None
|
|
163
182
|
|
|
164
183
|
|
|
165
184
|
@dataclasses.dataclass(kw_only=True)
|
|
166
|
-
class OnCompleteCallParameters
|
|
185
|
+
class OnCompleteCallParameters:
|
|
167
186
|
"""Additional parameters that can be included in a transaction when using the
|
|
168
187
|
ApplicationClient.call/compose_call methods"""
|
|
169
188
|
|
|
189
|
+
signer: TransactionSigner | None = None
|
|
190
|
+
"""Signer to use when signing this transaction"""
|
|
191
|
+
sender: str | None = None
|
|
192
|
+
"""Sender of this transaction"""
|
|
193
|
+
suggested_params: transaction.SuggestedParams | None = None
|
|
194
|
+
"""SuggestedParams to use for this transaction"""
|
|
195
|
+
note: bytes | str | None = None
|
|
196
|
+
"""Note for this transaction"""
|
|
197
|
+
lease: bytes | str | None = None
|
|
198
|
+
"""Lease value for this transaction"""
|
|
199
|
+
boxes: Sequence[tuple[int, bytes | bytearray | str | int]] | None = None
|
|
200
|
+
"""Box references to include in transaction. A sequence of (app id, box key) tuples"""
|
|
201
|
+
accounts: list[str] | None = None
|
|
202
|
+
"""Accounts to include in transaction"""
|
|
203
|
+
foreign_apps: list[int] | None = None
|
|
204
|
+
"""List of foreign apps (by app id) to include in transaction"""
|
|
205
|
+
foreign_assets: list[int] | None = None
|
|
206
|
+
"""List of foreign assets (by asset id) to include in transaction"""
|
|
207
|
+
rekey_to: str | None = None
|
|
208
|
+
"""Address to rekey to"""
|
|
170
209
|
on_complete: transaction.OnComplete | None = None
|
|
171
210
|
|
|
172
211
|
|
|
173
212
|
@dataclasses.dataclass(kw_only=True)
|
|
174
|
-
class CreateCallParameters
|
|
213
|
+
class CreateCallParameters:
|
|
175
214
|
"""Additional parameters that can be included in a transaction when using the
|
|
176
215
|
ApplicationClient.create/compose_create methods"""
|
|
177
216
|
|
|
217
|
+
signer: TransactionSigner | None = None
|
|
218
|
+
"""Signer to use when signing this transaction"""
|
|
219
|
+
sender: str | None = None
|
|
220
|
+
"""Sender of this transaction"""
|
|
221
|
+
suggested_params: transaction.SuggestedParams | None = None
|
|
222
|
+
"""SuggestedParams to use for this transaction"""
|
|
223
|
+
note: bytes | str | None = None
|
|
224
|
+
"""Note for this transaction"""
|
|
225
|
+
lease: bytes | str | None = None
|
|
226
|
+
"""Lease value for this transaction"""
|
|
227
|
+
boxes: Sequence[tuple[int, bytes | bytearray | str | int]] | None = None
|
|
228
|
+
"""Box references to include in transaction. A sequence of (app id, box key) tuples"""
|
|
229
|
+
accounts: list[str] | None = None
|
|
230
|
+
"""Accounts to include in transaction"""
|
|
231
|
+
foreign_apps: list[int] | None = None
|
|
232
|
+
"""List of foreign apps (by app id) to include in transaction"""
|
|
233
|
+
foreign_assets: list[int] | None = None
|
|
234
|
+
"""List of foreign assets (by asset id) to include in transaction"""
|
|
235
|
+
rekey_to: str | None = None
|
|
236
|
+
"""Address to rekey to"""
|
|
237
|
+
on_complete: transaction.OnComplete | None = None
|
|
178
238
|
extra_pages: int | None = None
|
|
179
239
|
|
|
180
240
|
|
|
@@ -203,17 +263,58 @@ class TransactionParametersDict(TypedDict, total=False):
|
|
|
203
263
|
"""Address to rekey to"""
|
|
204
264
|
|
|
205
265
|
|
|
206
|
-
class OnCompleteCallParametersDict(TypedDict,
|
|
266
|
+
class OnCompleteCallParametersDict(TypedDict, total=False):
|
|
207
267
|
"""Additional parameters that can be included in a transaction when using the
|
|
208
268
|
ApplicationClient.call/compose_call methods"""
|
|
209
269
|
|
|
270
|
+
signer: TransactionSigner
|
|
271
|
+
"""Signer to use when signing this transaction"""
|
|
272
|
+
sender: str
|
|
273
|
+
"""Sender of this transaction"""
|
|
274
|
+
suggested_params: transaction.SuggestedParams
|
|
275
|
+
"""SuggestedParams to use for this transaction"""
|
|
276
|
+
note: bytes | str
|
|
277
|
+
"""Note for this transaction"""
|
|
278
|
+
lease: bytes | str
|
|
279
|
+
"""Lease value for this transaction"""
|
|
280
|
+
boxes: Sequence[tuple[int, bytes | bytearray | str | int]]
|
|
281
|
+
"""Box references to include in transaction. A sequence of (app id, box key) tuples"""
|
|
282
|
+
accounts: list[str]
|
|
283
|
+
"""Accounts to include in transaction"""
|
|
284
|
+
foreign_apps: list[int]
|
|
285
|
+
"""List of foreign apps (by app id) to include in transaction"""
|
|
286
|
+
foreign_assets: list[int]
|
|
287
|
+
"""List of foreign assets (by asset id) to include in transaction"""
|
|
288
|
+
rekey_to: str
|
|
289
|
+
"""Address to rekey to"""
|
|
210
290
|
on_complete: transaction.OnComplete
|
|
211
291
|
|
|
212
292
|
|
|
213
|
-
class CreateCallParametersDict(TypedDict,
|
|
293
|
+
class CreateCallParametersDict(TypedDict, total=False):
|
|
214
294
|
"""Additional parameters that can be included in a transaction when using the
|
|
215
295
|
ApplicationClient.create/compose_create methods"""
|
|
216
296
|
|
|
297
|
+
signer: TransactionSigner
|
|
298
|
+
"""Signer to use when signing this transaction"""
|
|
299
|
+
sender: str
|
|
300
|
+
"""Sender of this transaction"""
|
|
301
|
+
suggested_params: transaction.SuggestedParams
|
|
302
|
+
"""SuggestedParams to use for this transaction"""
|
|
303
|
+
note: bytes | str
|
|
304
|
+
"""Note for this transaction"""
|
|
305
|
+
lease: bytes | str
|
|
306
|
+
"""Lease value for this transaction"""
|
|
307
|
+
boxes: Sequence[tuple[int, bytes | bytearray | str | int]]
|
|
308
|
+
"""Box references to include in transaction. A sequence of (app id, box key) tuples"""
|
|
309
|
+
accounts: list[str]
|
|
310
|
+
"""Accounts to include in transaction"""
|
|
311
|
+
foreign_apps: list[int]
|
|
312
|
+
"""List of foreign apps (by app id) to include in transaction"""
|
|
313
|
+
foreign_assets: list[int]
|
|
314
|
+
"""List of foreign assets (by asset id) to include in transaction"""
|
|
315
|
+
rekey_to: str
|
|
316
|
+
"""Address to rekey to"""
|
|
317
|
+
on_complete: transaction.OnComplete
|
|
217
318
|
extra_pages: int
|
|
218
319
|
|
|
219
320
|
|
|
@@ -3,18 +3,18 @@ algokit_utils/_debugging.py,sha256=4UC5NZGqxF32y742TUB34rX9kWaObXCCPOs-lbkQjGQ,1
|
|
|
3
3
|
algokit_utils/_ensure_funded.py,sha256=ZdEdUB43QGIQrg7cSSgNrDmWaLSUhli9x9I6juwKfgo,6786
|
|
4
4
|
algokit_utils/_transfer.py,sha256=CyXGOR_Zy-2crQhk-78uUbB8Sj_ZeTzxPwOAHU7wwno,5947
|
|
5
5
|
algokit_utils/account.py,sha256=UIuOQZe28pQxjEP9TzhtYlOU20tUdzzS-nIIZM9Bp6Y,7364
|
|
6
|
-
algokit_utils/application_client.py,sha256=
|
|
6
|
+
algokit_utils/application_client.py,sha256=qylA2aI4Ecs532bIs6fyc6FgLnWey9PBzZBZW_jnYtk,59092
|
|
7
7
|
algokit_utils/application_specification.py,sha256=XusOe7VrGPun2UoNspC9Ei202NzPkxRNx5USXiABuXc,7466
|
|
8
8
|
algokit_utils/asset.py,sha256=jsc7T1dH9HZA3Yve2gRLObwUlK6xLDoQz0NxLLnqaGs,7216
|
|
9
9
|
algokit_utils/common.py,sha256=K6-3_9dv2clDn0WMYb8AWE_N46kWWIXglZIPfHIowDs,812
|
|
10
10
|
algokit_utils/config.py,sha256=oY3o1kPzVPRiQH--f4HzrMMNPojT078CSudqS9WQaEc,4279
|
|
11
|
-
algokit_utils/deploy.py,sha256=
|
|
11
|
+
algokit_utils/deploy.py,sha256=BxIFPtZd1lO8o_JmQQDIKk0O93E_bE-ZzglEWXwbefw,35110
|
|
12
12
|
algokit_utils/dispenser_api.py,sha256=BpwEhKDig6qz54wbO-htG8hmLxFIrvdzXpESUb7Y1zw,5584
|
|
13
|
-
algokit_utils/logic_error.py,sha256=
|
|
14
|
-
algokit_utils/models.py,sha256=
|
|
13
|
+
algokit_utils/logic_error.py,sha256=YeE70qHZ6WBeoKCXqnto3uBg8R4ODXiNZkLmfEmASQo,2617
|
|
14
|
+
algokit_utils/models.py,sha256=iJUiV6eLq5N_FKki4X5ll5rYQslU_wSPiSTtl61Z1CI,12803
|
|
15
15
|
algokit_utils/network_clients.py,sha256=sj5y_g5uclddWCEyUCptA-KjWuAtLV06hZH4QIGM1yE,5313
|
|
16
16
|
algokit_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
algokit_utils-2.2.
|
|
18
|
-
algokit_utils-2.2.
|
|
19
|
-
algokit_utils-2.2.
|
|
20
|
-
algokit_utils-2.2.
|
|
17
|
+
algokit_utils-2.2.2.dist-info/LICENSE,sha256=J5i7U1Q9Q2c7saUzlvFRmrCCFhQyXb5Juz_LO5omNUw,1076
|
|
18
|
+
algokit_utils-2.2.2.dist-info/METADATA,sha256=LLKiX-AIS9covi0QfnzbS3g1emuJWDPkXKHE91ewEao,2205
|
|
19
|
+
algokit_utils-2.2.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
20
|
+
algokit_utils-2.2.2.dist-info/RECORD,,
|
|
File without changes
|