Skip to content

refactor: refinements to support client generator v3 #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
120a446
chore: initial methods for typed client generator
aorumbayev Jan 4, 2025
5dce8f1
fix: fixing arc2 note generation in AppDeployer
aorumbayev Jan 8, 2025
ca217a4
fix: changing CompiledTeal compiled to str from bytes; patching _buil…
aorumbayev Jan 8, 2025
70da852
refactor: adding usage of collections.abc.Sequence for args params
aorumbayev Jan 9, 2025
ee55c4f
refactor: expose algorand client protocol; expand to cover latest int…
aorumbayev Jan 10, 2025
cca6caa
refactor: patch compile_teal_template behaviour around deployment_met…
aorumbayev Jan 13, 2025
ba690db
refactor: using generics for abi_return type in AppFactoryCreateMetho…
aorumbayev Jan 13, 2025
f3b47af
refactor: making deploy arg types in app factory rely on generic (for…
aorumbayev Jan 15, 2025
293156c
refactor: further leveraging generics to match ts behaviour, the abi_…
aorumbayev Jan 16, 2025
4552101
fix: proper use of type vars for client manager typed class getters
aorumbayev Jan 16, 2025
8b856d1
refactor: make all bare properties on app client send/createTxn/param…
aorumbayev Jan 17, 2025
4b8467a
refactor: add error handler for simulate responses
aorumbayev Jan 18, 2025
a91deda
fix: proper handling of default args from hints
aorumbayev Jan 18, 2025
adf7a51
fix: proper handling of getting abi args with default values (when no…
aorumbayev Jan 18, 2025
5350426
fix: typo in generics inheritance
aorumbayev Jan 18, 2025
ae45db5
refactor: ensure send calls from AppClient for methods parse output t…
aorumbayev Jan 19, 2025
1fec296
fix: skip snake case conversion for struct field in arc56
aorumbayev Jan 19, 2025
99b3b28
fix: group id generation for log during send atc
aorumbayev Jan 19, 2025
94a805c
fix: exposing AppMethodCallTransactionArgument for typed client
aorumbayev Jan 19, 2025
e04630a
fix: fixing params creation in factory
aorumbayev Jan 20, 2025
9ac267d
fix: safer global state decoding
aorumbayev Jan 20, 2025
a99f2b9
refactor: parametrize indent in to_json methods of arc classes
aorumbayev Jan 20, 2025
f341c32
fix: typo in get_map decoding
aorumbayev Jan 20, 2025
9fd3d10
fix: box key decoding
aorumbayev Jan 20, 2025
dd56bcb
refactor: contravariant typevars for typed factory protocol
aorumbayev Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/algokit_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from algokit_utils.applications.app_manager import DELETABLE_TEMPLATE_NAME, UPDATABLE_TEMPLATE_NAME
from algokit_utils.errors.logic_error import LogicError
from algokit_utils.clients.algorand_client import AlgorandClient
from algokit_utils.protocols import AlgorandClientProtocol

# Common managers/clients that are frequently used entry points
from algokit_utils.accounts.account_manager import AccountManager
Expand Down Expand Up @@ -138,6 +139,7 @@
"AlgorandClient",
"DELETABLE_TEMPLATE_NAME",
"UPDATABLE_TEMPLATE_NAME",
"AlgorandClientProtocol",
# Common managers/clients
"AccountManager",
"AppClient",
Expand Down
2 changes: 1 addition & 1 deletion src/algokit_utils/_debugging.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _build_avm_sourcemap(
source_map = compiled_teal.source_map.__dict__
teal_content = compiled_teal.teal
elif isinstance(compiled_teal, CompiledTeal):
program_hash = base64.b64encode(checksum(compiled_teal.compiled)).decode()
program_hash = base64.b64encode(checksum(compiled_teal.compiled_base64_to_bytes)).decode()
source_map = compiled_teal.source_map.__dict__ if compiled_teal.source_map else {}
teal_content = compiled_teal.teal
else:
Expand Down
5 changes: 3 additions & 2 deletions src/algokit_utils/applications/abi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
ABIStruct: TypeAlias = dict[str, list[dict[str, "ABIValue"]]]
Arc56ReturnValueType: TypeAlias = ABIValue | ABIStruct | None


ABIType: TypeAlias = algosdk.abi.ABIType
ABIArgumentType: TypeAlias = algosdk.abi.ABIType | algosdk.abi.ABITransactionType | algosdk.abi.ABIReferenceType

Expand Down Expand Up @@ -56,13 +57,13 @@ def is_success(self) -> bool:

def get_arc56_value(
self, method: Arc56Method | AlgorandABIMethod, structs: dict[str, list[StructField]]
) -> ABIValue | ABIStruct | None:
) -> Arc56ReturnValueType:
return get_arc56_value(self, method, structs)


def get_arc56_value(
abi_return: ABIReturn, method: Arc56Method | AlgorandABIMethod, structs: dict[str, list[StructField]]
) -> ABIValue | ABIStruct | None:
) -> Arc56ReturnValueType:
if isinstance(method, AlgorandABIMethod):
type_str = method.returns.type
struct = None # AlgorandABIMethod doesn't have struct info
Expand Down
Loading
Loading