-
Notifications
You must be signed in to change notification settings - Fork 6
feat: app client #236
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
feat: app client #236
Conversation
50eb3d9
to
7defe32
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the AppClient for Algorand smart contract applications, providing a comprehensive client interface for interacting with ARC-56 compliant apps. The AppClient offers fluent APIs for transactions, state access, and app lifecycle management.
- Implements a full-featured AppClient with support for ARC-56 specifications
- Provides fluent APIs for transaction building, sending, and state access
- Adds configuration system with event emission capabilities for debugging and tracing
- Extends composer functionality with simulation support
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
crates/algokit_utils/src/applications/app_client/mod.rs |
Core AppClient implementation with network resolution and basic operations |
crates/algokit_utils/src/applications/app_client/sender.rs |
Transaction sending functionality with debugging support |
crates/algokit_utils/src/applications/app_client/transaction_builder.rs |
Transaction building utilities for various app operations |
crates/algokit_utils/src/applications/app_client/params_builder.rs |
Parameter building with ABI method resolution and default value handling |
crates/algokit_utils/src/applications/app_client/state_accessor.rs |
Structured state access for global, local, and box storage |
crates/algokit_utils/src/applications/app_client/types.rs |
Type definitions for AppClient parameters and configurations |
crates/algokit_utils/src/config.rs |
Global configuration system with async event emission |
crates/algokit_utils/src/transactions/composer.rs |
Extended composer with simulation capabilities |
crates/algokit_utils/tests/applications/app_client.rs |
Comprehensive test suite for AppClient functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
crates/algokit_utils/src/applications/app_client/params_builder.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/abi_integration.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/state_accessor.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/abi_integration.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/params_builder.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/params_builder.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/params_builder.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/params_builder.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/params_builder.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/params_builder.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/transaction_builder.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/transaction_builder.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/transaction_builder.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/transaction_builder.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/transaction_builder.rs
Outdated
Show resolved
Hide resolved
6a166c7
to
6d27d07
Compare
crates/algokit_utils/src/applications/app_client/abi_integration.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/abi_integration.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/abi_integration.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/abi_integration.rs
Outdated
Show resolved
Hide resolved
1be959c
to
fb7ee7f
Compare
@PatrickDinh i used your pr algorandfoundation/algokit-utils-ts#430 as a reference and added similar native struct support to abi crate which allowed removal of various helpers in the app client implementation, the abi handling should be more refined at this point feel free to take another look also pushed additional tests into app factory implementation as well -> #248, there is a few nested struct tests that i still need to add but ill do it after app factory pr is merged as using the factory as a fixture could simplify directly reusing existing nested struct tests from ts and py utils repos |
For context here, Pat's PR with further refinements merged, final steps missing is merge conflicts against main branch + final batch of tests |
@PatrickDinh @joe-p pushed additional batch of tests and added tweaks for more explicit lifetime names along with use of async trait for state accessor. Feel free to check again, i think at this point it will be simpler to merge this first then get the app factory merged as a follow up to this PR. I will rebase the app factory tomorrow and update factory related tests to ensure its not duplicating tests from this pr |
crates/algokit_utils/tests/applications/app_client/default_values.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/tests/applications/app_client/default_values.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/error_transformation.rs
Outdated
Show resolved
Hide resolved
@aorumbayev I noticed that compared to the TS version, we are missing the methods to get the app client from the client manager, maybe it's worth to keep track and do it in another PR.
|
those are in the app factory PR |
1f36156
to
6ccfab0
Compare
6ccfab0
to
17887bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some areas that we can reduce duplication, but other than that LGTM
crates/algokit_utils/src/applications/app_client/compilation.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/src/applications/app_client/compilation.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/tests/applications/app_client/client_management.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/tests/applications/app_client/client_management.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/tests/applications/app_client/compilation.rs
Outdated
Show resolved
Hide resolved
crates/algokit_utils/tests/applications/app_client/compilation.rs
Outdated
Show resolved
Hide resolved
🎉 This PR is included in version 1.0.0-alpha.65 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Proposed Changes
App Client implementation
Further notes
App Factory PR is to follow shortly against this branch to simplify review