-
Notifications
You must be signed in to change notification settings - Fork 6
Replace utils CommonTransactionParams with macro #241
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
base: main
Are you sure you want to change the base?
Conversation
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 replaces the CommonTransactionParams
struct with a macro-based approach to generate transaction parameter structures. Instead of each transaction parameter struct containing a nested common_params
field, the common transaction parameters are now included directly as individual fields in each struct.
Key changes:
- Removes
CommonTransactionParams
struct and related imports - Introduces a
create_transaction_params!
macro to generate transaction parameter structures - Flattens parameter structures by moving common fields directly into each transaction parameter struct
- Updates all transaction parameter usages throughout the codebase to access fields directly
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
crates/algokit_utils/src/transactions/common.rs |
Defines the create_transaction_params! macro and removes CommonTransactionParams struct |
crates/algokit_utils/src/transactions/*.rs |
Updates all transaction parameter structs to use the macro and flatten common fields |
crates/algokit_utils/src/transactions/composer.rs |
Refactors field access methods to work with flattened structures |
Test files | Updates all test code to use direct field access instead of common_params |
Comments suppressed due to low confidence (2)
crates/algokit_utils/src/transactions/composer.rs:1
- This line has been incorrectly modified. The original code set
static_fee
toexpected_fee - 1
, but now it's settingmax_fee
. This changes the test behavior from testing static fee limits to max fee limits.
use crate::{
crates/algokit_utils/src/transactions/app_call.rs:1
- This line appears to be setting
static_fee
without the proper struct context. The surrounding code suggests this should be part of anAppCallParams
struct initialization, but the struct field mappings may be incorrect.
use super::composer::ComposerError;
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Proposed Changes