Skip to content

Conversation

Trantorian1
Copy link

@Trantorian1 Trantorian1 commented Apr 30, 2025

Descripton to come...

Summary by CodeRabbit

  • Style
    • Reformatted code across numerous modules to consolidate multi-line statements, method chains, and error handling into single-line expressions for improved readability and compactness.
    • Simplified assertion macros, imports, error messages, and pattern matching to single-line formats without changing logic or behavior.
    • Updated GitHub Actions workflows: removed old workflows and introduced new modular, callable, and manually triggerable configurations to enhance CI/CD flexibility.
    • No changes to end-user functionality, features, or error handling; all updates are purely stylistic and infrastructure-related.

Copy link

coderabbitai bot commented Apr 30, 2025

"""

Walkthrough

This update is a comprehensive codebase-wide refactor focused on code formatting, style, and compactness. Across numerous modules—including contract test suites, cryptographic utilities, and build scripts—multi-line chained method calls, struct initializations, and macro invocations have been condensed into single-line expressions. Error handling branches, pattern matches, and assertions are similarly reformatted for brevity. Import statements are unified, and redundant line breaks are removed throughout. No changes are made to logic, control flow, error handling, or public API signatures; all modifications are purely stylistic, aimed at improving code readability and reducing vertical space.

Changes

File(s) Change Summary
b11r/src/block_build/block.rs, b11r/src/main.rs Reformatted chained method calls and struct initializations into single lines; no logic changes.
crypto-utils/src/curve/signer.rs Condensed multi-line array/struct initializations, trait impls, and tests into single lines; no logic changes.
openrpc-testgen-runner/src/main.rs Reformatted tracing subscriber initialization and error pattern matches for compactness; no logic changes.
openrpc-testgen/build.rs Simplified conditional expressions and macro calls to single lines; no logic or control flow changes.
openrpc-testgen/src/macros/*.rs Condensed macro bodies and error constructions to single lines; no macro logic or signature changes.
openrpc-testgen/src/suite_katana/, openrpc-testgen/src/suite_katana_no_/, openrpc-testgen/src/suite_openrpc/ Across all test suites: reformatted chained calls, struct initializations, assertions, and error handling to single lines; no logic, error handling, or control flow changes.
openrpc-testgen/src/suite_openrpc/suite_deploy/**/* Condensed multi-line method chains, error handling, and macro calls to single lines in deploy suite tests.
openrpc-testgen/src/suite_openrpc/test_* Reformatted variable assignments, assertions, error handling, and method calls for compactness; no logic changes.
.github/workflows/build.yaml, .github/workflows/fmt.yaml Deleted existing GitHub Actions workflows for build and formatting checks.
.github/workflows/pull-request-main-ci.yml Added a new GitHub Actions workflow for pull request CI with lint and build jobs chained sequentially.
.github/workflows/task-build.yaml Added a new reusable GitHub Actions workflow for building the project with caching and cargo-hack testing.
.github/workflows/task-lint-cargo.yaml Added a new reusable GitHub Actions workflow for Rust code formatting and linting using cargo fmt and clippy.
.github/workflows/task-lint-prettier.yaml Renamed and refactored Prettier formatting check workflow to a reusable lint-prettier task with manual triggers.

Possibly related PRs

  • Add build workflow. #82: This PR also replaces the existing GitHub Actions build workflow with a new reusable build workflow and integrates it into a new pull request CI workflow, directly related to the workflow changes here.

  • exit code. #188: Related to error handling and reporting in openrpc-testgen-runner/src/main.rs; this PR adds structured tracking of failed tests while the current PR simplifies formatting in the same area.

Suggested labels

enhancement

Poem

A rabbit hopped through lines of code,
Tidying chains where logic flowed.
Braces shrank and lines grew lean,
Compact and clear, the code pristine!
No logic lost, just space reclaimed—
The burrow’s neatness, proudly named.
🐇✨

"Hop, skip, and format—now the code is oh-so-flat!"
"""


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 24

🔭 Outside diff range comments (1)
openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_declare.rs (1)

53-57: ⚠️ Potential issue

Fix typo in assertion message.
The assertion reads "Exptected transaction hash to be {:?}, got {:?}". Correct the spelling to "Expected":

- format!(
-     "Exptected transaction hash to be {:?}, got {:?}",
-     declare_tx_hash, declaration_result.transaction_hash
- )
+ format!(
+     "Expected transaction hash to be {:?}, got {:?}",
+     declare_tx_hash, declaration_result.transaction_hash
+ )
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 48d4446 and 9422489.

📒 Files selected for processing (107)
  • b11r/src/block_build/block.rs (4 hunks)
  • b11r/src/main.rs (1 hunks)
  • crypto-utils/src/curve/signer.rs (13 hunks)
  • openrpc-testgen-runner/src/main.rs (6 hunks)
  • openrpc-testgen/build.rs (6 hunks)
  • openrpc-testgen/src/macros/assert_matches_result.rs (1 hunks)
  • openrpc-testgen/src/macros/assert_result.rs (1 hunks)
  • openrpc-testgen/src/suite_katana/mod.rs (7 hunks)
  • openrpc-testgen/src/suite_katana/test_concurrent_transactions_submissions.rs (1 hunks)
  • openrpc-testgen/src/suite_katana/test_declare_and_deploy_contract.rs (4 hunks)
  • openrpc-testgen/src/suite_katana/test_declaring_already_existing_class.rs (3 hunks)
  • openrpc-testgen/src/suite_katana/test_deploy_accout.rs (4 hunks)
  • openrpc-testgen/src/suite_katana/test_ensure_validator_have_valid_state.rs (2 hunks)
  • openrpc-testgen/src/suite_katana/test_estimate_fee.rs (1 hunks)
  • openrpc-testgen/src/suite_katana/test_send_txs_with_insufficient_fee.rs (1 hunks)
  • openrpc-testgen/src/suite_katana/test_send_txs_with_invalid_nonces.rs (3 hunks)
  • openrpc-testgen/src/suite_katana/test_send_txs_with_invalid_signature.rs (1 hunks)
  • openrpc-testgen/src/suite_katana/test_v3_transactions.rs (1 hunks)
  • openrpc-testgen/src/suite_katana_no_account_validation/mod.rs (19 hunks)
  • openrpc-testgen/src/suite_katana_no_fee/mod.rs (19 hunks)
  • openrpc-testgen/src/suite_katana_no_fee/test_deploy_account.rs (3 hunks)
  • openrpc-testgen/src/suite_katana_no_fee/test_send_txs_with_insufficient_fee.rs (3 hunks)
  • openrpc-testgen/src/suite_katana_no_mining/mod.rs (19 hunks)
  • openrpc-testgen/src/suite_katana_no_mining/test_block_traces.rs (3 hunks)
  • openrpc-testgen/src/suite_katana_no_mining/test_get_events_no_pending.rs (5 hunks)
  • openrpc-testgen/src/suite_katana_no_mining/test_get_events_with_pending.rs (6 hunks)
  • openrpc-testgen/src/suite_katana_no_mining/test_trace.rs (2 hunks)
  • openrpc-testgen/src/suite_openrpc/mod.rs (7 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/mod.rs (8 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/mod.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_call_contract.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_call_error_block_not_found.rs (2 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_call_error_contract_error.rs (2 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_call_error_contract_not_found.rs (2 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_estimate_message_fee.rs (2 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_get_storage_at.rs (5 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_get_storage_at_map.rs (5 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_get_txn_by_block_id_and_index_invoke_v1.rs (1 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_get_txn_by_block_id_and_index_invoke_v3.rs (1 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_get_txn_receipt_invoke.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_get_txn_status.rs (1 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_invoke_contract_v1.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_invoke_contract_v3.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_invoke_v3_trace.rs (8 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_simulate_invoke_v3_skip_fee.rs (12 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_simulate_invoke_v3_skip_validate_skip_fee.rs (11 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_trace_block_txn_invoke.rs (9 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/test_deploy_txn_v1.rs (2 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/test_deploy_txn_v1_invalid_class_hash.rs (1 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/test_deploy_txn_v3.rs (2 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/test_deploy_txn_v3_invalid_class_hash.rs (1 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/test_get_class_at.rs (5 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/test_get_class_hash_at.rs (4 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/test_get_txn_by_block_id_and_index_deploy_v1.rs (7 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/test_get_txn_by_block_id_and_index_deploy_v3.rs (9 hunks)
  • openrpc-testgen/src/suite_openrpc/suite_deploy/test_get_txn_receipt_deploy.rs (10 hunks)
  • openrpc-testgen/src/suite_openrpc/test_block_hash_and_number.rs (5 hunks)
  • openrpc-testgen/src/suite_openrpc/test_declare_txn_v2.rs (6 hunks)
  • openrpc-testgen/src/suite_openrpc/test_declare_txn_v3.rs (6 hunks)
  • openrpc-testgen/src/suite_openrpc/test_declare_v3_trace.rs (6 hunks)
  • openrpc-testgen/src/suite_openrpc/test_deploy_account_outside_execution.rs (4 hunks)
  • openrpc-testgen/src/suite_openrpc/test_deploy_account_trace.rs (11 hunks)
  • openrpc-testgen/src/suite_openrpc/test_deploy_account_v1.rs (9 hunks)
  • openrpc-testgen/src/suite_openrpc/test_deploy_account_v3.rs (12 hunks)
  • openrpc-testgen/src/suite_openrpc/test_erc20_transfer_outside_execution.rs (9 hunks)
  • openrpc-testgen/src/suite_openrpc/test_estimate_fee_fri.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/test_estimate_fee_wei.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_block_number.rs (5 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_block_txn_count.rs (5 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_block_with_receipts_declare.rs (15 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_block_with_receipts_deploy.rs (26 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_block_with_receipts_deploy_account.rs (17 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_block_with_receipts_invoke.rs (27 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_block_with_tx_hashes.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_block_with_txs.rs (2 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_chain_id.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_class.rs (6 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_events_declare.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_events_deploy.rs (10 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_events_deploy_account.rs (7 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_events_transfer.rs (6 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_nonce.rs (6 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_state_update.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_storage_class_proof.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_storage_contract_proof.rs (5 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_storage_contract_storage_proof.rs (7 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_declare.rs (7 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_deploy.rs (11 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_deploy_account.rs (7 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_error_txn_hash_not_found.rs (1 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_invoke.rs (5 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_transaction_status.rs (1 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_transaction_status_error_txn_hash_not_found.rs (1 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_txn_by_block_id_and_index_declare_v2.rs (7 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_txn_by_block_id_and_index_declare_v3.rs (9 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_txn_by_block_id_and_index_deploy_account_v1.rs (8 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_txn_by_block_id_and_index_deploy_account_v3.rs (10 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_txn_receipt_declare.rs (4 hunks)
  • openrpc-testgen/src/suite_openrpc/test_get_txn_receipt_deploy_account.rs (9 hunks)
  • openrpc-testgen/src/suite_openrpc/test_simulate_declare_v3_skip_fee.rs (7 hunks)
  • openrpc-testgen/src/suite_openrpc/test_simulate_declare_v3_skip_validate_skip_fee.rs (8 hunks)
  • openrpc-testgen/src/suite_openrpc/test_simulate_deploy_account_skip_fee_charge.rs (12 hunks)
  • openrpc-testgen/src/suite_openrpc/test_simulate_deploy_account_skip_validation_and_fee.rs (13 hunks)
  • openrpc-testgen/src/suite_openrpc/test_spec_version.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/test_syncing.rs (3 hunks)
  • openrpc-testgen/src/suite_openrpc/test_trace_block_txn_declare.rs (9 hunks)
  • openrpc-testgen/src/suite_openrpc/test_trace_block_txn_deploy_acc.rs (14 hunks)
⛔ Files not processed due to max files limit (23)
  • openrpc-testgen/src/utils/conversions/felts_to_biguint.rs
  • openrpc-testgen/src/utils/get_deployed_contract_address.rs
  • openrpc-testgen/src/utils/outside_execution.rs
  • openrpc-testgen/src/utils/random_single_owner_account.rs
  • openrpc-testgen/src/utils/starknet_hive.rs
  • openrpc-testgen/src/utils/v7/accounts/account/declaration.rs
  • openrpc-testgen/src/utils/v7/accounts/account/execution.rs
  • openrpc-testgen/src/utils/v7/accounts/account/mod.rs
  • openrpc-testgen/src/utils/v7/accounts/creation/helpers.rs
  • openrpc-testgen/src/utils/v7/accounts/creation/structs.rs
  • openrpc-testgen/src/utils/v7/accounts/deployment/deploy.rs
  • openrpc-testgen/src/utils/v7/accounts/deployment/helpers.rs
  • openrpc-testgen/src/utils/v7/accounts/deployment/structs.rs
  • openrpc-testgen/src/utils/v7/accounts/factory/mod.rs
  • openrpc-testgen/src/utils/v7/accounts/factory/open_zeppelin.rs
  • openrpc-testgen/src/utils/v7/accounts/single_owner.rs
  • openrpc-testgen/src/utils/v7/accounts/utils/mint.rs
  • openrpc-testgen/src/utils/v7/contract/declare_and_deploy.rs
  • openrpc-testgen/src/utils/v7/contract/factory.rs
  • openrpc-testgen/src/utils/v7/contract/helpers.rs
  • openrpc-testgen/src/utils/v7/contract/mod.rs
  • openrpc-testgen/src/utils/v7/endpoints/declare_contract.rs
  • openrpc-testgen/src/utils/v7/endpoints/deploy_contract.rs
🧰 Additional context used
🧬 Code Graph Analysis (13)
openrpc-testgen/src/suite_katana/test_estimate_fee.rs (1)
openrpc-testgen/src/utils/v7/endpoints/utils.rs (1)
  • wait_for_sent_transaction (150-258)
openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_invoke.rs (2)
openrpc-testgen/src/utils/v7/endpoints/utils.rs (1)
  • get_selector_from_name (78-89)
openrpc-testgen/src/utils/v7/accounts/account/execution.rs (6)
  • calls (497-499)
  • calls (559-561)
  • nonce (36-38)
  • nonce (71-73)
  • nonce (501-503)
  • nonce (563-565)
openrpc-testgen/src/suite_openrpc/test_get_chain_id.rs (3)
openrpc-testgen/src/utils/random_single_owner_account.rs (2)
  • provider (125-128)
  • chain_id (61-65)
openrpc-testgen/src/utils/v7/endpoints/mod.rs (2)
  • chain_id (137-137)
  • chain_id (479-481)
openrpc-testgen/src/utils/v7/endpoints/endpoints_functions.rs (1)
  • chain_id (1023-1030)
openrpc-testgen/src/suite_katana/test_declare_and_deploy_contract.rs (2)
openrpc-testgen/src/utils/v7/endpoints/declare_contract.rs (1)
  • prepare_contract_declaration_params (165-171)
openrpc-testgen/src/utils/v7/endpoints/utils.rs (1)
  • wait_for_sent_transaction (150-258)
openrpc-testgen/src/suite_openrpc/test_get_events_transfer.rs (1)
t8n/src/starknet/state/starknet_blocks.rs (1)
  • sequencer_address (241-243)
openrpc-testgen/src/suite_openrpc/suite_deploy/test_deploy_txn_v1.rs (2)
openrpc-testgen/src/utils/v7/accounts/account/mod.rs (4)
  • provider (122-122)
  • provider (525-527)
  • provider (544-546)
  • provider (563-565)
openrpc-testgen/src/utils/random_single_owner_account.rs (1)
  • provider (125-128)
openrpc-testgen/src/suite_openrpc/test_deploy_account_v1.rs (1)
openrpc-testgen/src/utils/v7/accounts/deployment/deploy.rs (2)
  • deploy_account_v1_from_request (148-156)
  • get_deploy_account_request (127-146)
openrpc-testgen/src/suite_katana_no_fee/test_deploy_account.rs (1)
openrpc-testgen/src/utils/v7/signers/key_pair.rs (1)
  • from_random (28-43)
openrpc-testgen/src/suite_openrpc/suite_deploy/test_get_txn_by_block_id_and_index_deploy_v3.rs (4)
openrpc-testgen/src/utils/v7/endpoints/mod.rs (3)
  • new (35-37)
  • block_number (135-135)
  • block_number (475-477)
openrpc-testgen/src/utils/random_single_owner_account.rs (1)
  • new (39-41)
openrpc-testgen/src/utils/v7/endpoints/endpoints_functions.rs (1)
  • block_number (1014-1021)
openrpc-testgen/src/utils/v7/accounts/account/mod.rs (1)
  • starknet_keccak (276-287)
openrpc-testgen/src/suite_openrpc/test_get_class.rs (1)
openrpc-testgen/src/utils/v7/endpoints/declare_contract.rs (2)
  • extract_class_hash_from_error (77-88)
  • parse_class_hash_from_error (59-75)
openrpc-testgen/src/suite_openrpc/test_get_txn_receipt_deploy_account.rs (1)
openrpc-testgen/src/utils/v7/endpoints/utils.rs (1)
  • wait_for_sent_transaction (150-258)
openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_deploy_account.rs (1)
openrpc-testgen/src/utils/v7/accounts/deployment/deploy.rs (1)
  • deploy_account_v3_from_request (158-166)
openrpc-testgen/src/suite_openrpc/test_block_hash_and_number.rs (1)
openrpc-testgen/src/utils/v7/endpoints/utils.rs (1)
  • get_selector_from_name (78-89)
🔇 Additional comments (495)
b11r/src/main.rs (1)

10-10: Condense tracing subscriber initialization into one line
The single-line chained call preserves the original behavior (INFO level) and improves brevity without sacrificing clarity.

openrpc-testgen/build.rs (6)

32-34: Concise single-line filter for old generated files
The new one-liner for matching generated_tests_ prefixes is clear and maintains functionality.


41-44: Condensed root suite directory check
Consolidating the is_dir and prefix check into a single conditional improves readability while preserving behavior.


60-63: Consistent nested suite directory filtering
Applying the same single-line suite_ prefix check in recursive processing keeps the implementation uniform.


80-82: Streamlined generated file path setup and creation
Combining format!-based path construction with file creation in two concise lines is both succinct and clear.


97-97: Single-line impl RunnableTrait invocation
Merging the writeln! macro into one line enhances brevity without sacrificing clarity.


118-118: Inline failed_tests HashMap initialization
Declaring and initializing the HashMap on one line keeps the generated code compact and readable.

b11r/src/block_build/block.rs (6)

7-8: Approve: Condensed import formatting

The multi-line import of commitment functions has been correctly consolidated without altering functionality or readability.


75-77: Approve: Hex parsing inlined

The call to u128::from_str_radix for eth_l1_gas_price has been correctly compacted into a single-expression initializer while preserving error handling.


78-81: Approve: Strk gas price parsing condensed

The parsing of strk_l1_gas_price remains clear and functionally identical after formatting.


82-85: Approve: Eth L1 data gas price parsing

Condensing the initialization retains clarity and propagates errors as intended.


86-89: Approve: Strk L1 data gas price parsing

The formatting change is purely stylistic and correctly maintains error handling.


96-96: Approve: Block struct instantiation compact

Single-line struct instantiation of Block is concise and readable.

crypto-utils/src/curve/signer.rs (17)

17-17: Approve: EC_ORDER constant inlined definition

Inlining the raw array for EC_ORDER is purely stylistic and correctly captures the field element.


19-19: Approve: EC_ORDER_2 hex-based initialization

Using U256::from_be_hex for EC_ORDER_2 is concise and clear.


21-21: Approve: ELEMENT_UPPER_BOUND definition

Condensing the array initializer for ELEMENT_UPPER_BOUND improves readability without affecting semantics.


25-26: Approve: GENERATOR struct initialization

The one-line initializer for GENERATOR is neat and maintains correctness.


29-30: Approve: ALPHA constant compacted

The single-line definition keeps the code concise and preserves the intended constant.


32-33: Approve: BETA constant compacted

Condensing to one line enhances vertical compactness with no logic change.


36-36: Approve: Trait method signature formatting

The ecdsa_sign signature in the Signer trait remains unchanged in functionality; formatting is purely stylistic.


40-40: Approve: Impl method signature formatting

The inline formatting of the ecdsa_sign implementation signature is consistent and maintains behavior.


49-49: Approve: Error variant mapping in match arm

Consolidating the branch for InvalidMessageHash remains clear and correct.


99-99: Approve: From<ExtendedSignature> conversion inline

Inlining the struct construction for Signature is concise and behavior-preserving.


203-203: Approve: get_public_key one-liner

The compact chain for computing the public key is readable and functionally identical.


235-235: Approve: sign return expression compact

The inline creation of ExtendedSignature remains clear, correct, and error-safe.


277-277: Approve: mod_inverse result assignment

Condensing the conditional for a negative x value is stylistically sound and unchanged in logic.


355-355: Approve: verify public key reconstruction

Inlined sqrt and error propagation for building full_public_key is concise and correct.


370-370: Approve: verify result check inline

The combined equality checks remain correct after formatting.


387-387: Approve: recover full_r computation inline

Inlining the point reconstruction maintains error handling and correctness.


393-393: Approve: recover bit extraction loop

Condensing the loop for bitwise comparison is stylistically consistent with the rest of the module.

openrpc-testgen/src/macros/assert_matches_result.rs (1)

6-6: Clean formatting improvement.

The multi-line macro invocation has been consolidated into a single line, improving code compactness while maintaining the same functionality. This is consistent with the PR's overall focus on code formatting.

openrpc-testgen/src/suite_openrpc/test_get_transaction_status.rs (1)

22-23: Code formatting improvement.

The multi-line Felt::from_hex calls have been consolidated into single lines, improving code compactness without changing functionality. This maintains the same hex values and error handling while reducing unnecessary vertical space.

openrpc-testgen/src/suite_openrpc/test_get_transaction_status_error_txn_hash_not_found.rs (1)

22-23: Code formatting improvement consistent with other files.

Similar to changes in other test files, the multi-line Felt::from_hex calls have been consolidated into single lines, improving code compactness without changing functionality or behavior.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_estimate_message_fee.rs (1)

44-44: Improved error message formatting.

The multi-line format! invocations within assertions have been consolidated into single lines, improving code readability and reducing vertical space while maintaining the same error messages and functionality.

Also applies to: 49-49, 54-54, 65-65

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_get_txn_status.rs (2)

19-19: Condensed error return into single line for brevity
No logic change; consistent with style of compact single-line error returns throughout the suite.


23-23: Condensed async call into single line
The get_transaction_status call chain is now on one line, matching the PR's formatting convention.

openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_error_txn_hash_not_found.rs (2)

22-23: Condensed get_transaction_by_hash call into a single line
Maintains original semantics; improves horizontal compactness per test suite conventions.


28-28: Inlined error match in assert_matches_result! macro
The pattern match is now a single-line argument, consistent with formatting guidelines and without altering logic.

openrpc-testgen/src/suite_openrpc/suite_deploy/test_deploy_txn_v1_invalid_class_hash.rs (2)

29-29: Condensed deploy_v1(...).send().await into one line
This matches the PR’s style for collapsing chained calls without affecting behavior.


33-33: Collapsed nested pattern in assert_matches_result! macro
Error variant is now inlined; no semantic change and aligns with other test cases.

openrpc-testgen/src/suite_openrpc/test_estimate_fee_wei.rs (4)

26-27: Merged multi-line PathBuf constructions into single-line calls
Paths remain correct; improved compactness.


39-39: Inlined failure message in assert_result! macro
Single-line format call replaces multi-line block, preserving clarity.


45-45: Condensed gas price assertion message
Maintains content while improving line-density in tests.


63-63: Collapsed overall_fee assertion message into one line
Consistent with the PR’s formatting conventions and no logic change.

openrpc-testgen/src/suite_katana_no_mining/test_get_events_no_pending.rs (6)

44-44: Condensed chained execute_v1(...).nonce(...).send().await
Line compression matches styling updates elsewhere; behavior unchanged.


68-68: Inlined EventsChunk destructuring for zero chunk size case
Maintains destructuring semantics while adhering to one-line statement style.


93-93: Inlined EventsChunk destructuring for chunk size >0
Consistent with refactor of similar calls; no functional change.


95-95: Condensed assertion for events length with custom message
Single-line assertion is clear and concise, fitting the suite-wide style.


106-106: Inlined EventsChunk destructuring for paginated call
Follows the formatting pattern of other get_events calls.


125-125: Inlined EventsChunk destructuring for max chunk case
Consistent stylistic change; logic remains identical.

openrpc-testgen/src/suite_katana/test_v3_transactions.rs (2)

27-27: Formatting consolidation for calldata
Merged multiple Felt::from_hex_unchecked calls into a single-line vec![] initializer. The compact form is consistent with the PR’s style and remains readable given the small number of elements.


30-30: Condensed .execute_v3 invocation
The one-liner .execute_v3(vec![Call { to, selector, calldata }]) maintains functionality and aligns with the broader formatting cleanup.

openrpc-testgen/src/suite_openrpc/test_estimate_fee_fri.rs (4)

26-27: Consolidated get_compiled_contract arguments
The PathBuf::from_str(...) calls have been merged into single lines, reducing vertical space without harming clarity for short paths.


39-39: Compact assertion message for fee unit
Condensed the format!-based error message into a single line, preserving content and readability.


44-44: Single-line gas price assertion
The error message for the gas price check is now on one line—consistent with other assertions in this suite.


63-63: Condensed overall fee assertion message
The multi-line format! block has been refactored into one line; functionality and clarity remain intact.

openrpc-testgen/src/suite_openrpc/test_get_chain_id.rs (3)

6-6: Unified import formatting
Combined related imports (ConnectedAccount, OpenRpcTestGenError, Provider) onto a single line for consistency with the PR’s import style.


18-18: Inline chain_id call
Collapsed .provider().chain_id().await into one line—fits within line-length guidelines and matches surrounding tests.


27-28: Condensed assertion error message
The format!-based chain ID mismatch message is now single-line; unchanged semantics with improved compactness.

openrpc-testgen/src/suite_katana_no_mining/test_trace.rs (2)

44-44: Single-line transaction submission
The chained .execute_v1(...).nonce(nonce).send().await? is now on one line, preserving its original behavior while reducing vertical space.


61-61: Condensed pending-block submission
Same one-line refactor for the second transaction submission in the for loop—consistent with the style applied above.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_invoke_contract_v1.rs (3)

35-35: Compact .first().ok_or(...) invocation
Moved the .first().ok_or(OpenRpcTestGenError::Other(...))? into a single line; functionality and error semantics are unchanged.


44-44: Deferred error handling in invoke_result
You replaced .await? with .await, deferring error propagation to allow manual assertion. Please verify this aligns with the test’s intent and that the subsequent unwrap() and assert_result! correctly handle both success and failure cases.


69-69: Single-line updated-balance check
Condensed the updated balance .first().ok_or(...) invocation into one line, maintaining the original behavior and error message.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_call_error_contract_not_found.rs (2)

29-29: Stylistic refactor: condense chained call into one line
The call to execute_v3(...).send().await? has been merged into a single line without changing its behavior.


51-51: Stylistic refactor: inline assert_matches_result! macro invocation
The error pattern match is now on one line; logic and coverage remain unchanged.

openrpc-testgen/src/suite_katana_no_mining/test_block_traces.rs (3)

44-44: Stylistic refactor: single-line transaction submission
The .execute_v1(...).nonce(nonce).send().await? call is now on one line; functionality is preserved.


72-72: Stylistic refactor: single-line transaction submission
The repeated .execute_v1(...).nonce(nonce).send().await? call is now a one-liner; no logic change.


100-100: Stylistic refactor: single-line transaction submission
The final .execute_v1(...).nonce(nonce).send().await? call is condensed without altering control flow.

openrpc-testgen/src/suite_katana/test_send_txs_with_invalid_signature.rs (1)

61-61: Stylistic refactor: inline error assertion
The assert_matches_result!(res.unwrap_err(), AccountError::Provider(...)) invocation is now on one line; semantics remain intact.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_invoke_contract_v3.rs (2)

35-35: Stylistic refactor: inline ok_or(...)? call
The .first().ok_or(OpenRpcTestGenError::Other(...))? expression is merged into a single line without changing behavior.


44-44: Stylistic refactor: inline .execute_v3(...).send().await call
Capturing the result without ? and then unwrapping/asserting preserves the original intent in a compact form.

openrpc-testgen/src/suite_katana/test_send_txs_with_insufficient_fee.rs (6)

37-37: Stylistic refactor: inline low-fee transaction submission
The .execute_v1(...).max_fee(Felt::TWO).send().await call is condensed into one line, with no semantic change.


42-42: Stylistic refactor: inline error pattern for insufficient max fee
The assert_matches_result!(res.unwrap_err(), AccountError::Provider(...)) check is now a single-line assertion.


45-45: Stylistic refactor: inline nonce assertion
The assert_eq_result!(nonce, initial_nonce, ...) check has been collapsed into one line; logic remains the same.


51-51: Stylistic refactor: inline underfunded transaction submission
The .execute_v1(...).max_fee(fee).send().await call is now on one line; functionality is preserved.


55-55: Stylistic refactor: inline error pattern for insufficient balance
The assert_matches_result!(res.unwrap_err(), AccountError::Provider(...)) invocation is condensed without changing behavior.


59-59: Stylistic refactor: inline nonce assertion
The assert_eq_result!(nonce, initial_nonce, ...) assertion is now on one line; semantics remain unchanged.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_call_error_contract_error.rs (2)

29-29: Condense chained call to execute_v3 into a single line.
Stylistic change only—logic and error propagation remain unchanged.


51-51: Reduce assertion macro invocation to one line.
Formatting-only update; behavior of the error pattern match is preserved.

openrpc-testgen/src/suite_katana_no_fee/test_send_txs_with_insufficient_fee.rs (4)

39-39: Inline the low-fee transaction execution chain.
Purely a formatting refactor; no functional impact.


49-49: Simplify nonce assertion into single-line macro.
Style adjustment only; test semantics unchanged.


56-56: Condense insufficient-balance transaction call.
This is strictly a stylistic consolidation, preserving original logic.


65-65: Merge nonce check for second transaction into one line.
Formatting improvement with no behavioral change.

openrpc-testgen/src/suite_openrpc/suite_deploy/test_deploy_txn_v3.rs (3)

30-30: Condense deploy_v3 invocation and await into one line.
Stylistic only—logic remains identical.


42-43: Inline provider state update retrieval.
Formatting refactor without changing behavior.


47-49: Compress Pending match arm into a single-line Err variant.
Purely style-oriented change; control flow is preserved.

openrpc-testgen/src/suite_katana/test_deploy_accout.rs (4)

49-49: Inline the to field construction in the transfer Call.
Style update only, semantics unchanged.


58-58: Merge OpenZeppelinAccountFactory instantiation into one line.
Cosmetic change; functional behavior is the same.


65-65: Condense get_transaction_receipt call into a single line.
Formatting refinement with no change in logic.


77-77: Inline get_class_hash_at call and await.
Stylistic consolidation only.

openrpc-testgen/src/suite_katana/test_concurrent_transactions_submissions.rs (3)

85-85: Convert execution status assertion to one-liner.
Purely a formatting refactor; behavior is identical.


86-86: Condense finality status assertion into a single line.
Style-only change—no functional impact.


91-91: Inline nonce increment assertion.
Formatting-only update; semantics remain the same.

openrpc-testgen/src/suite_openrpc/test_deploy_account_v3.rs (7)

9-9: Packaging related imports more concisely

The import statement has been consolidated into a single line, which helps reduce vertical space while maintaining readability.


26-26: LGTM: Added STRK constant with proper styling

The STRK constant is properly defined with a descriptive name and appropriate Felt initialization.


60-60: Compact struct initialization for better readability

The struct initialization is now on a single line, which improves code compactness without sacrificing readability.


86-86: Improved code compactness for method chains

Several multi-line method chains have been consolidated into single or fewer lines, making the code more compact and easier to scan while preserving the original logic.

Also applies to: 89-91, 107-107, 109-110


118-118: More concise error and assertion messages

Error messages and assertion formatting have been simplified to single lines, improving code compactness while maintaining the clarity of the messages.

Also applies to: 127-127, 152-152, 177-177, 181-181, 187-187, 219-219, 243-243, 259-259


163-166: Streamlined constructor calldata extraction

The code to retrieve and validate constructor calldata has been reformatted to be more compact while preserving the exact same error handling approach.


222-222: Simplified variable initializations

Variable initializations have been consolidated to single lines, which makes the code more concise and maintains the same functionality.

Also applies to: 230-230, 240-240, 245-245

openrpc-testgen/src/suite_openrpc/suite_deploy/test_deploy_txn_v3_invalid_class_hash.rs (2)

29-29: Consolidated method chain for deploy operation

The multi-line method chain for the factory deploy operation has been streamlined into a single line, making the code more compact while preserving the same functionality.


33-33: Simplified error pattern matching

The pattern matching in the assert_matches_result! macro has been consolidated to a single line, improving readability while maintaining the same error checking logic.

openrpc-testgen/src/suite_openrpc/test_get_txn_by_block_id_and_index_deploy_account_v1.rs (6)

9-9: Consolidated import for deployment modules

The import statement has been restructured for better compactness, which aligns with the project-wide formatting improvements.


46-46: Simplified Felt hex value initialization

The Felt value is now initialized in a cleaner, single-line format that improves code readability.


59-59: Compact WaitForTx struct initialization

The struct initialization is now on a single line, making the code more concise while maintaining readability.


85-85: Streamlined method chains for better readability

Multiple method chains have been consolidated into fewer lines, improving code compactness while preserving the original functionality.

Also applies to: 88-90, 106-106, 108-109


117-117: Simplified error and assertion messages

Error messages and assertion formatting have been streamlined to single lines, improving code compactness while maintaining clear error messages.

Also applies to: 126-126, 144-144, 151-151, 157-157, 175-175, 181-181, 184-184, 188-188


160-163: Improved constructor calldata extraction pattern

The code for retrieving and validating constructor calldata has been reformatted to be more compact while preserving the same error handling logic.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_call_error_block_not_found.rs (2)

29-29: Consolidated transaction execution chain

The multi-line method chain for executing transactions has been streamlined into a single line, improving code compactness without changing functionality.


51-51: Simplified assertion pattern

The assertion pattern matching has been consolidated to a single line, improving readability while maintaining the same error checking logic.

openrpc-testgen/src/suite_openrpc/test_spec_version.rs (3)

4-4: Consolidated import statement

Multiple imports have been consolidated into a single line, which reduces vertical space and improves code readability.


19-19: Simplified provider method chain

The method chain for retrieving the spec version has been condensed to a single line, making the code more compact.


29-29: Streamlined assertion message format

The assertion error message formatting has been simplified to a single line while maintaining the same error information.

openrpc-testgen/src/suite_katana/test_send_txs_with_invalid_nonces.rs (2)

48-48: Condensed assertion macro is clear
The one-line assert_eq_result! remains readable and preserves the original message. Nice work on keeping the test intent intact.


97-97: Assertion remains accurate after refactor
The condensed assert_eq_result! correctly verifies that the nonce is unchanged. No changes needed here.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_call_contract.rs (1)

35-35: Condense Option handling in one line
Using .first().ok_or(...) inline is concise and keeps the error context clear. Consider extracting the error message to a constant if reused elsewhere.

openrpc-testgen/src/suite_openrpc/test_deploy_account_outside_execution.rs (4)

47-47: Literal in one line is acceptable
Using Felt::from_hex_unchecked(...) inline is fine here. If this literal appears elsewhere, consider a named constant.


58-58: Inline timestamp retrieval
get_current_timestamp(...).await? on one line keeps the flow compact. No functional concerns.


95-95: Wait helper call is concise
The single-line wait_for_sent_transaction(...) reads clearly. Approved.


100-101: Inline block fetch
.get_block_with_txs(...).await? on one line is concise. No logic changes detected.

openrpc-testgen/src/suite_openrpc/test_get_storage_class_proof.rs (4)

28-29: PathBuf instantiation in two lines
These lines are clear and maintainable. Approved.


35-35: Random account fetch inline
random_accounts()? on one line keeps consistency with other suites.


49-50: Merkle tree creation is concise
Chaining from_proof and supplying the root inline is elegant. No issues.


52-52: Proof verification chain
compute_expected_child_for_class_proof(...).verify_proof(...) is on two lines which is readable. Approved.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_get_txn_receipt_invoke.rs (11)

63-65: Condensed actual fee assertion
The single-line assert_result!(actual_fee.amount == ..., format!(...)) remains clear.


69-71: Fee unit assertion inline
Maintains consistency with other assert_result! calls. Approved.


83-84: Messages-sent assertion condense
assert_result!(...is_empty(), format!(...)) is concise and correctly reports on failure.


114-114: Sender address assertion
The one-line assert_result!(event.from_address == STRK_ADDRESS); is straightforward and readable.


115-115: Event count assertion
assert_result!(event.data.len() == 2, format!(...)) is accurate.


119-120: First event data assertion
Compact and clear.


125-126: Second event data assertion
Maintains style and correctness.


128-128: Keys length assertion
One-line check with formatted message is good.


133-134: First key assertion
Condensed compare and format! is readable.


139-140: Second key assertion
Correct and stylistically consistent.


145-146: Third key assertion
Properly formatted with context.

openrpc-testgen/src/suite_openrpc/test_get_events_transfer.rs (9)

22-23: Style improvement applied correctly.

Converting to single-line initialization expressions for strk_address and receiptent_address looks good. Note there's a typo in variable naming ("receiptent" should be "recipient"), but this appears to be pre-existing.


51-51: Style improvement applied correctly.

Condensing the method chain for retrieving block hash and number improves code compactness.


62-62: Style improvement applied correctly.

Simplifying the provider call to get_events into a single line follows the consistent formatting pattern.


72-72: Style improvement applied correctly.

Condensing the format string into a single line improves code readability.


77-77: Style improvement applied correctly.

Condensing the format string into a single line improves code readability.


80-81: Style improvement applied correctly.

Restructuring the multi-line expression for getting first_event into two single-line expressions improves code compactness while maintaining readability.


85-85: Style improvement applied correctly.

Condensing the format string into a single line improves code readability.


162-163: Style improvement applied correctly.

Restructuring the multi-line expression for getting second_event into two single-line expressions improves code compactness while maintaining readability.


209-214: Style improvement applied correctly.

Restructuring the multi-line expressions for getting maybe_pending_block_with_txs and simplifying the match expression branches improves code compactness while maintaining readability.

openrpc-testgen/src/suite_katana_no_fee/test_deploy_account.rs (4)

29-29: Style improvement applied correctly.

Condensing the provider retrieval and cloning into a single-line expression improves code compactness.


37-37: Style improvement applied correctly.

Condensing the OpenZeppelinAccountFactory creation into a single-line expression improves code compactness.


48-48: Style improvement applied correctly.

Condensing the transaction receipt retrieval into a single-line expression follows the consistent formatting pattern.


60-60: Style improvement applied correctly.

Condensing the class hash retrieval into a single-line expression improves code compactness.

openrpc-testgen/src/suite_openrpc/test_get_block_number.rs (6)

31-31: Style improvement applied correctly.

Condensing the block number retrieval into a single-line expression improves code compactness.


46-46: Style improvement applied correctly.

Condensing the Felt address initialization into a single-line expression improves code compactness.


59-59: Style improvement applied correctly.

Condensing the block number retrieval after first transaction into a single-line expression follows the consistent formatting pattern.


70-70: Style improvement applied correctly.

Condensing the WaitForTx initialization into a single-line expression improves code compactness.


81-81: Style improvement applied correctly.

Condensing the wait_for_sent_transaction call into a single-line expression improves code compactness.


83-83: Style improvement applied correctly.

Condensing the block number retrieval after second transaction into a single-line expression follows the consistent formatting pattern.

openrpc-testgen/src/suite_katana_no_mining/test_get_events_with_pending.rs (6)

43-43: Style improvement applied correctly.

Condensing the account execution and transaction sending into a single-line expression improves code compactness.


52-52: Style improvement applied correctly.

Condensing the account execution and transaction sending (second instance) into a single-line expression follows the consistent formatting pattern.


70-70: Style improvement applied correctly.

Condensing the destructuring pattern for provider.get_events into a single-line expression improves code readability.


85-85: Style improvement applied correctly.

Condensing the destructuring pattern for provider.get_events (second instance) into a single-line expression follows the consistent formatting pattern.


99-99: Style improvement applied correctly.

Condensing the destructuring pattern for provider.get_events (third instance) into a single-line expression follows the consistent formatting pattern.


116-116: Style improvement applied correctly.

Condensing the destructuring pattern for provider.get_events (fourth instance) into a single-line expression follows the consistent formatting pattern.

openrpc-testgen/src/suite_katana/test_ensure_validator_have_valid_state.rs (2)

42-42: Approved style change: condensed Call struct field
The to: Felt::from_hex(...) line has been merged into a single line, improving compactness without affecting functionality.


66-66: Approved style change: condensed error pattern match
The nested AccountError::Provider(...) variant is now on one line, preserving the original error semantics.

openrpc-testgen/src/suite_openrpc/suite_deploy/test_deploy_txn_v1.rs (3)

32-32: Approved style change: single-line deploy invocation
The deploy_v1(...).send().await chain is now condensed into one line without altering behavior.


44-45: Approved style change: single-line state update fetch
Merged the multi-line get_state_update(...) call into a single statement; error handling is intact.


49-51: Approved style change: condensed pending-state error mapping
The Pending match arm is now expressed in a compact single-line block, retaining the same error logic.

openrpc-testgen/src/suite_openrpc/test_get_block_with_tx_hashes.rs (4)

8-8: Approved import consolidation
Combined multiple related imports into a single line to match the repository’s concise style.


24-25: Approved style change: single-line contract compilation call
The two PathBuf::from_str(...) arguments for get_compiled_contract have been merged into single lines; functionality remains unchanged.


29-30: Approved style change: condensed declaration invocation
The declare_v3(...).send().await invocation is now a one-liner, preserving the existing async flow and error propagation.


55-55: Approved style change: inlined error construction
The closure passed to ok_or_else is now on one line, improving brevity while maintaining the original error message.

openrpc-testgen/src/suite_openrpc/test_get_block_with_txs.rs (4)

8-8: Approved import consolidation
Merged the declare_contract::get_compiled_contract, errors::OpenRpcTestGenError, and utils::wait_for_sent_transaction imports into one line for consistency.


24-25: Approved style change: single-line contract compilation paths
Condensed PathBuf::from_str(...) calls into single lines; behavior is unchanged.


29-30: Approved style change: declaration call condensed
The declare_v3(...).send().await chain is now a single line, preserving error handling semantics.


38-39: Approved style change: single-line block retrieval
Merged the get_block_with_txs(...) call into one line for brevity; logic remains the same.

openrpc-testgen/src/suite_openrpc/test_deploy_account_v1.rs (13)

9-9: Approved import consolidation
Combined the deploy module imports (deploy_account_v1_from_request, get_deploy_account_request, DeployAccountVersion) into a single line, matching the pull request’s formatting approach.


61-61: Approved style change: inline wait configuration
The WaitForTx struct instantiation is now a one-liner, preserving its semantics (wait: true and default params).


90-92: Approved style change: condensed deploy-account request execution
The deploy_account_v1_from_request(...).await? call is now inlined; functionality and error handling remain identical.


108-108: Approved style change: inline block-number fetch
Fetching block_hash_and_number().await?.block_number is now a single-line expression; behavior is unchanged.


110-111: Approved style change: condensed block-with-txs retrieval
The get_block_with_txs(...) call is inlined; error propagation stays intact.


119-119: Approved style change: inlined transaction-not-found error
Condensed the ok_or_else error construction for missing transaction into one line, preserving message detail.


152-153: Approved style change: refined assertion message formatting
The format!(...) for class-hash mismatch is inlined; assertion logic is unchanged.


164-167: Approved style change: condensed constructor calldata extraction
The call to .constructor_calldata.first().ok_or_else(...) is now fully inlined; error handling remains correct.


178-178: Approved style change: inlined signature validity assertion
The assert_result!(valid_signature, "...") is now a one-liner, matching the surrounding formatting.


182-183: Approved style change: condensed signature equality assertion
The comparison and message format!(...) are now on one line; behavior is unchanged.


188-189: Approved style change: inlined salt assertion
The contract_address_salt equality check and error message are condensed; semantics preserved.


192-193: Approved style change: condensed max-fee assertion
The max_fee == DEPLOY_ACCOUNT_MAX_FEE check and its message are now on one line.


198-202: Approved style change: condensed nonce assertion
The nonce check and its formatted message are fully inlined; no change to logic.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_get_storage_at_map.rs (5)

41-41: Formatting code for improved readability

The error handling has been condensed into a single line, which makes the code more compact while maintaining clarity.


47-47: Code styling improvement

The get_storage_at method call has been reformatted into a single line, which is consistent with the overall code style being applied in this PR.


58-58: Cleaner method chaining

Method chaining has been consolidated into a single line, improving code compactness without sacrificing readability.


80-80: Consistent error handling format

Error handling has been reformatted to maintain consistency with other similar constructs in the file.


124-124: Streamlined assertion message

The formatted error message in the assertion has been condensed to a single line, consistent with the overall formatting approach.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_invoke_v3_trace.rs (9)

14-14: Consolidated import statement

Multiple imports have been combined onto a single line, reducing vertical space and improving code density.


36-36: Streamlined method chaining

Method calls and asynchronous operations have been consolidated into single lines, providing a more compact code structure while maintaining readability.

Also applies to: 38-38, 42-42, 50-50


63-65: Improved match expression formatting

The nested match expression has been reformatted to use fewer lines while preserving logic clarity.


70-76: Consistent error handling style

Error handling with ok_or_else has been standardized throughout the file, making the code more consistent and easier to read.


78-86: Uniform error handling pattern

Multiple error handling blocks have been reformatted to follow the same pattern, improving code consistency.


101-110: Standardized position checking and error creation

The pattern for finding positions in collections and generating appropriate errors has been standardized to use a consistent, more compact format.


113-117: Consistent error handling for collection access

Error handling for accessing collection elements has been formatted consistently with other similar operations in the file.


138-142: Streamlined assertion messages

Assertion messages have been reformatted to be more concise while maintaining their descriptive value.

Also applies to: 175-176


178-197: Unified error handling for optional values

Error handling for optional values follows a consistent pattern throughout the file, making the code more readable and maintainable.

Also applies to: 209-217

openrpc-testgen/src/suite_openrpc/test_get_events_deploy.rs (8)

15-15: Consolidated import statement

Import statements have been combined onto a single line, maintaining a consistent style with other files in the codebase.


25-26: Streamlined path construction

Path construction with PathBuf::from_str has been consolidated into single lines, making the code more compact.


43-43: Improved method chaining and constant initialization

Both the hex string conversion and method chaining for contract deployment have been reformatted to be more concise.

Also applies to: 54-56


64-64: Consistent provider method formatting

Provider method calls have been formatted consistently to use single lines, improving code readability.

Also applies to: 75-75


92-102: Standardized conditional handling and error returns

Conditional expressions and error returns have been formatted consistently throughout the file, making the code easier to follow.


107-113: Concise assertion messages

Formatted strings in assertions have been condensed to single lines, providing a more compact representation while maintaining clarity.

Also applies to: 148-149, 172-173


115-116: Uniform error handling for optional values

Error handling using ok_or_else has been formatted consistently, maintaining a cohesive code style.

Also applies to: 212-213


260-265: Consistent block retrieval and error handling

Block retrieval with proper error handling has been formatted in a way that's consistent with the rest of the file.

openrpc-testgen/src/suite_openrpc/test_get_state_update.rs (4)

8-8: Consolidated import statements

Import statements have been combined onto a single line, consistent with the formatting pattern applied throughout the codebase.


24-25: Streamlined path construction

PathBuf::from_str calls have been reformatted to single lines, making the code more compact and consistent with other files.


29-30: Consistent method chaining format

Method chains for declaration and provider calls have been consolidated into more compact expressions, improving code readability.

Also applies to: 38-39


58-58: Simplified error handling

Error handling with ok_or has been reformatted to a single line, consistent with the formatting pattern throughout the PR.

openrpc-testgen/src/suite_katana/test_estimate_fee.rs (7)

38-38: Method chain formatting improvement is consistent with project style.

The consolidated single-line method chain improves code compactness without sacrificing readability.


43-44: Improved API call and method chain formatting.

Both the nonce retrieval and fee estimation calls have been consolidated to single lines, maintaining consistency with the project's formatting style while preserving the original functionality.


47-47: Assertion macro formatting improvement.

The assertion is now more compact and consistent with the project's style.


54-54: Fee estimation with lower nonce uses consistent formatting.

The method chain has been properly consolidated to match the formatting of other similar calls in the file.


57-57: Assertion macro formatting is consistent.

The formatting of this assertion matches the style used in line 47, maintaining consistency.


61-61: Fee estimation with arbitrary nonce follows consistent formatting.

The method chain formatting matches earlier instances, maintaining a consistent style throughout the file.


64-64: Final assertion follows consistent formatting pattern.

This assertion maintains the same compact style as the previous assertions in the file.

openrpc-testgen/src/suite_katana/test_declare_and_deploy_contract.rs (7)

29-29: Path construction formatting improved.

The path construction has been consolidated to a single line, improving readability.


31-31: Tuple unpacking formatting is more compact.

The tuple unpacking from the contract declaration parameters has been condensed to a single line, maintaining the same functionality.


39-40: Contract declaration method call formatting improved.

The declaration method call with its arguments has been consolidated while preserving readability.


51-51: Class verification check formatting is more concise.

The method chain for verifying the class has been consolidated to a single line without affecting the functionality.


68-68: Contract address calculation formatting improved.

The function call for calculating the contract address has been condensed to a single line, maintaining readability.


82-83: Transaction waiting formatting is more concise.

The method chain for waiting for a transaction has been consolidated across two lines, keeping it readable while reducing vertical space.


86-86: Class hash retrieval formatting is consistent.

The method chain for retrieving the class hash follows the same formatting pattern as other API calls in the file.

openrpc-testgen/src/macros/assert_result.rs (4)

38-41: Error construction formatting improved.

The error construction has been consolidated into a more compact form without changing the functionality of the assertion macro.


43-46: Panic error handling formatting is more concise.

The error construction for expression evaluation panic has been similarly consolidated, matching the style used in the previous error construction.


52-52: Custom message error construction improved.

The error construction for a custom message has been condensed to a single line, improving readability while maintaining functionality.


55-58: Panic error handling formatting for custom message is consistent.

The error construction maintains the same formatting style as used in lines 43-46, ensuring consistency throughout the macro.

openrpc-testgen/src/suite_openrpc/suite_deploy/test_get_txn_receipt_deploy.rs (19)

37-37: Fee estimation call formatting improved.

The method chain for estimating fees has been consolidated to a single line, improving readability.


39-39: Contract deployment call formatting is consistent.

The method chain for contract deployment follows the same formatting pattern as the fee estimation call.


59-59: Error return formatting is more concise.

The error return for unexpected receipt types has been consolidated to a single line, improving readability.


66-67: Format string formatting is more compact.

The format string for fee verification has been consolidated to a single line without affecting readability.


72-73: Fee unit format string formatting is consistent.

The format string follows the same compact formatting pattern as other format strings in the file.


86-87: Messages sent format string formatting improved.

The format string has been consolidated to a single line, consistent with other format strings.


100-101: Error return for execution status formatting is more concise.

The error return has been consolidated to a single line, improving readability.


108-109: Execution status format string formatting is consistent.

The format string follows the same pattern as other format strings in the file.


112-112: Event count assertion formatting is more compact.

The assertion and its format string have been consolidated to a single line without affecting readability.


114-114: Event retrieval with error handling formatting improved.

The operation to retrieve the first event with error handling has been condensed to a single line, maintaining readability.


117-118: Event from address format string formatting is more concise.

The format string has been consolidated to a single line, consistent with other format strings.


122-123: Event data count format string formatting improved.

The format string follows the same compact pattern as other format strings in the file.


132-133: Event data verification format string formatting is consistent.

The format string has been consolidated to a single line, maintaining readability.


146-147: Third event data format string formatting improved.

The format string follows the same pattern as other format strings in the file.


156-157: Fourth event data format string formatting is consistent.

The format string has been consolidated to a single line, maintaining readability.


163-163: Constructor calldata length conversion formatting improved.

The operation to convert the constructor calldata length to a Felt has been condensed to a single line.


179-180: Sixth event data format string formatting is consistent.

The format string follows the same pattern as other format strings in the file.


203-204: Second event address format string formatting improved.

The format string has been consolidated to a single line, consistent with other format strings.


226-227: Fee amount format string formatting is consistent.

The format string follows the same pattern as other format strings in the file.

openrpc-testgen/src/suite_openrpc/test_syncing.rs (4)

20-20: No issues with the syncing() call.
This line simply awaits the provider’s syncing() response, preserving existing logic.


31-32: Fetching block hash and number is correct.
The single‐line chain to retrieve block_hash_and_number() still performs the same checks and unwrapping.


71-73: Pattern match on MaybePendingBlockWithTxs is unchanged and correct.
The handling of pending vs. non‐pending blocks remains logically identical.


82-83: Starting block number assertion is accurate.
The condensed assertion maintains the check and the formatting of the error message is consistent.

openrpc-testgen/src/suite_openrpc/test_simulate_deploy_account_skip_fee_charge.rs (1)

9-9: Stylistic condensing of imports, struct initializations, match arms, closures, and assertions maintains existing logic correctly.
All changes are purely formatting—no behavioral or control‐flow alterations detected.

Also applies to: 45-45, 58-58, 87-94, 97-98, 101-102, 113-115, 116-118, 131-134, 145-147, 167-174, 187-189, 241-248, 288-288, 289-293, 324-324

openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_declare.rs (1)

10-10: Refactoring of imports, contract path parsing, and method chaining is purely stylistic and correct.
Logic and assertions remain unchanged.

Also applies to: 25-26, 32-32, 34-34, 44-44, 75-77, 80-82, 111-111, 115-115

openrpc-testgen/src/suite_openrpc/suite_deploy/mod.rs (1)

13-13: Condensing of multi-line calls and error branches is stylistic and preserves logic.
No changes to public APIs, exception handling, or control flow.

Also applies to: 46-52, 76-79, 89-92, 111-111, 126-126, 172-172

openrpc-testgen/src/suite_openrpc/test_block_hash_and_number.rs (1)

27-28: Formatting changes for asynchronous calls and pattern matches maintain original semantics.
All assertions and result handling are functionally identical.

Also applies to: 36-36, 54-54, 87-88, 96-96

openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_invoke.rs (3)

23-32: LGTM! Good formatting improvements.

The code has been reformatted to be more concise while maintaining readability. Address declarations and the calls vector initialization are now more compact, and the multi-line method chain for transfer_request has been consolidated into a cleaner two-line expression.


82-146: Consistent and clean formatting of calldata element extraction.

Good refactoring of all the calldata element extraction patterns. The code now has a more uniform structure while maintaining the same error handling and validation logic.


90-186: Improved assertion formatting.

The format strings in assertions have been standardized to single-line expressions, which improves readability while preserving all the original error messages and assertion logic.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/mod.rs (3)

57-57: LGTM! Good method chain formatting.

The deployment operation has been consolidated into a more concise single-line expression while maintaining readability and preserving the original logic.


74-84: Improved pattern matching and error handling.

The contract address extraction and error returns have been reformatted to be more compact while maintaining the same logic and error reporting.


98-98: Simplified include macro.

The include! macro has been formatted more cleanly on a single line.

openrpc-testgen/src/suite_openrpc/test_simulate_declare_v3_skip_validate_skip_fee.rs (4)

43-48: LGTM! Improved path construction.

The file path construction has been reformatted to be more concise while maintaining readability.


56-63: Cleaner chained operations.

Nonce retrieval and transaction simulation operations have been consolidated into more compact expressions while preserving the same functionality.


82-87: Improved pattern matching.

The match arms for SimulateTransactionsResult have been reformatted to be more concise, making the code more readable while handling the same cases.


107-109: Consistent error handling formatting.

Error handling with ok_or_else has been reformatted to be more compact throughout the file, maintaining consistent style while preserving the same error handling logic.

Also applies to: 191-194, 206-209

openrpc-testgen/src/suite_katana/test_declaring_already_existing_class.rs (2)

37-38: LGTM! Improved declaration operation formatting.

The contract declaration operation has been consolidated into a cleaner two-line expression while maintaining the same functionality.


45-45: Cleaner verification and error pattern matching.

Both the class verification operation and the error pattern match in the assertion have been reformatted to be more concise, improving readability while maintaining the same checks.

Also applies to: 69-69

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_get_txn_by_block_id_and_index_invoke_v3.rs (1)

30-55: Approve formatting-only consolidations.
All modifications compress multi-line chained calls and error-handling closures into single-line expressions. The underlying logic, control flow, and error semantics remain unchanged.

openrpc-testgen/src/suite_openrpc/test_get_block_with_receipts_declare.rs (1)

8-366: Approve styling refactor.
Imports, method chains (get_compiled_contract, declare_v3, send_from_request, etc.), destructuring, and assertion macros have been reformatted into more compact single-line statements. No functional changes detected.

openrpc-testgen/src/suite_openrpc/test_trace_block_txn_deploy_acc.rs (1)

9-433: Approve compact formatting changes.
Condensed imports, chained method calls (e.g., verify_deploy_account_v3_signature, deploy_account_v3_from_request), and assertion macros into single lines without altering behavior or control flow.

openrpc-testgen/src/suite_openrpc/test_get_block_with_receipts_deploy_account.rs (1)

10-507: Approve one-line formatting enhancements.
All multi-line invocations, error-pattern matches, and assertions are compressed into concise single-line expressions. No changes to logic, control flow, or public APIs.

openrpc-testgen/src/suite_openrpc/mod.rs (1)

22-242: Approve unified single-line expressions.
The setup method and imports have been consistently consolidated into single-line statements, improving compactness. Logic and error handling remain identical.

openrpc-testgen/src/suite_openrpc/test_get_txn_by_block_id_and_index_declare_v2.rs (15)

6-6: Approve consolidation of imports.
Combining get_compiled_contract, OpenRpcTestGenError, and wait_for_sent_transaction into a single line improves brevity without impacting clarity.


27-28: Approve inlined PathBuf::from_str calls.
Passing both contract class paths directly in one invocation preserves error handling (?) and reduces vertical space.


36-38: Approve single-line chaining for declare_v2().prepare().await.
Consolidating the preparation step into one line maintains the same async flow and improves readability.


39-39: Approve inline get_declare_request call.
The one-liner keeps the code concise without altering behavior.


49-49: Approve inline send_from_request invocation.
Condensing the send call into a single line retains functionality and declutters the code.


65-65: Approve inline block_hash_and_number call.
Fetching block_hash in one line is clear and functionally identical.


68-69: Approve inline get_block_with_txs invocation.
Merging the provider call and await into one line streamlines the lookup.


76-76: Approve one-line error closure for transaction lookup.
The refactored ok_or_else closure is concise and still constructs the correct error.


85-85: Approve one-line error closure in pending block branch.
Uniform formatting on both match arms enhances consistency.


109-109: Approve condensing of class hash assertion message.
Combining the format! macro into one line reduces noise without losing information.


121-121: Approve inline max fee assertion.
The single-line assertion keeps the test’s intent clear.


126-126: Approve inline nonce assertion.
Condensed format retains readability.


131-131: Approve inline sender address assertion.
Concise and consistent with other checks.


135-135: Approve single-line signature validity check.
Merging the assert_result! call keeps the logic intact.


139-139: Approve inline signature equality assertion.
The one-line formatting aligns with the rest of the test style.

openrpc-testgen/src/suite_openrpc/suite_deploy/test_get_class_hash_at.rs (6)

25-26: Approve inlined PathBuf::from_str calls for contract paths.
Keeping both conversions in one expression maintains error propagation and reduces height.


42-43: Approve single-line ContractFactory::new instantiation.
Condensing construction with its parameters improves code compactness.


49-49: Approve inline deploy_v3(...).send().await call.
Merging the deploy chain into one line retains async semantics and clarity.


66-67: Approve one-line if let Some(...) extraction.
The formatted if let block reads clearly and preserves logic.


70-70: Approve inline Err(OpenRpcTestGenError::CallError) branch.
Condensing the error return into one line is consistent with the style update.


93-93: Approve single-line class hash assertion message.
The compact format! invocation remains informative and succinct.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_get_storage_at.rs (6)

40-40: Approve one-line .ok_or for empty initial balance error.
Formatting the closure in one line is concise and preserves the same error semantics.


48-48: Approve inline initial get_storage_at(...).await? call.
Combining provider method and await into one line improves brevity.


59-59: Approve inline execute_v3(...).send().await invocation.
The one-line chain is clear and functionally unchanged.


86-86: Approve inline updated get_storage_at(...).await call.
Condensing this provider invocation matches the style of the initial storage fetch.


97-97: Approve single-line updated balance assertion message.
The condensed format! retains clarity and consistency.


116-116: Approve formatted println! statements.
Condensing the debug prints into single lines is consistent with overall styling.

openrpc-testgen-runner/src/main.rs (7)

21-21: Approve inline initialization of the tracing subscriber.
Combining .fmt().with_max_level(...).init() in one expression keeps setup concise.


39-42: Approve compact pattern match for TestSuiteFailure in OpenRpc block.
Reformatting the if let into a single multi-line pattern improves readability without logic changes.


65-68: Approve compact pattern match for TestSuiteFailure in Katana block.
Consistent collapse of the error branch aligns with the refactoring goals.


90-93: Approve compact pattern match for TestSuiteFailure in KatanaNoMining block.
The one-line destructuring style is applied uniformly.


116-119: Approve compact pattern match for TestSuiteFailure in KatanaNoFee block.
Maintaining the same structure across suites enhances consistency.


135-143: Approve consolidation of setup input and suite invocation for KatanaNoAccountValidation.
Lining up struct initialization and the .run(...).await call in fewer lines increases compactness.


145-148: Approve compact pattern match for TestSuiteFailure in KatanaNoAccountValidation block.
The refactoring remains purely stylistic and preserves the original error-handling logic.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_get_txn_by_block_id_and_index_invoke_v1.rs (5)

30-30: Approve inline execute_v1(...).send().await invocation.
The one-liner is clear and retains the asynchronous execution flow.


38-38: Approve inline block_hash_and_number().await?.block_number fetch.
Condensing this retrieval into one line is readable and effective.


40-41: Approve inline get_block_with_txs(...).await call.
Combining the provider call into fewer lines matches the style of similar blocks.


48-48: Approve one-line ok_or_else for transaction-not-found in block lookup.
The concise closure is consistent with other test cases.


55-55: Approve one-line ok_or_else in the pending block branch.
Uniform formatting across both match arms ensures consistency.

openrpc-testgen/src/suite_openrpc/suite_deploy/test_get_class_at.rs (7)

26-27: Code consolidation looks good.

The PathBuf::from_str calls have been consolidated into single lines, which improves code compactness while maintaining readability.


43-44: Factory initialization nicely consolidated.

The ContractFactory::new instantiation is now more compact with the same functionality.


50-50: Deployment chain formatting improved.

The method chain for deployment has been consolidated into a single line, which makes the code more concise while preserving the same functionality.


67-73: Error handling refactored appropriately.

The conditional check and error handling in the Invoke receipt branch have been reformatted to be more compact without changing the logic or error reporting behavior.


76-77: Simplified error return.

The error return has been simplified to a single line while maintaining the same functionality.


92-94: Assertion comparison consolidated correctly.

The complex ABI comparison with optional chaining has been consolidated into a more readable single-line format without changing the logic.


104-105: Error message formatting improved.

The error message formatting in the assertion has been simplified while maintaining the same information.

openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_deploy_account.rs (8)

11-13: Import consolidation looks good.

The imports have been consolidated to reduce vertical space, following a consistent style throughout the codebase.


43-44: Simplified Felt hex initialization.

The Felt::from_hex call has been consolidated into a single line, improving code compactness.


56-56: Struct initialization consolidated.

The WaitForTx struct is now initialized in a more compact single-line format, which improves readability.


82-83: Method chain consolidated effectively.

The chain of method calls to get the chain ID has been consolidated into a single line without changing functionality.


85-87: Deploy account function call simplified.

The deployment function call has been refactored to use fewer lines while maintaining the same functionality. The code is now more concise without sacrificing readability.


114-115: Error handling patterns consolidated.

Multiple error handling patterns using ok_or_else have been consolidated into single-line expressions. This maintains the same error messaging but reduces vertical space, making the code more compact.

Also applies to: 120-133


173-173: Assertion simplified appropriately.

The assertion for signature validation has been simplified without losing information.


177-178: Error message formatting improved.

The error message formatting in the assertion has been simplified to a single line while maintaining clarity.

openrpc-testgen/src/suite_openrpc/test_get_transaction_by_hash_deploy.rs (9)

11-12: Import consolidation looks good.

The imports have been consolidated into a single line, maintaining consistent style with the rest of the codebase.


32-34: Path initialization consolidated effectively.

The PathBuf::from_str calls have been consolidated into single lines, which improves code compactness while maintaining the same functionality.


37-38: Declaration call chain formatting improved.

The method chain for contract declaration has been consolidated into a single line, making the code more concise while preserving the same flow.


50-50: Deployment call formatting improved.

The deployment method call has been consolidated into a single line, which reduces vertical space without sacrificing readability.


68-69: Method chain consolidated correctly.

The chain ID fetching and string conversion has been consolidated into a single line, making the code more readable.


74-75: Transaction broadcast formatting improved.

The transaction broadcast code has been reformatted to be more compact while maintaining the same functionality.


109-113: Error handling patterns consolidated effectively.

Multiple error handling patterns using ok_or_else have been consolidated into single-line expressions, which reduces vertical space while maintaining error clarity.

Also applies to: 120-124, 130-134, 142-146, 156-159, 168-172, 178-182, 196-200


218-219: Assertion simplified appropriately.

The assertion for signature validation has been simplified to a single line without losing its meaning.


287-288: Assertion simplified correctly.

The assertion for tip checking has been simplified to a single line while maintaining the same validation and error message.

openrpc-testgen/src/suite_openrpc/test_simulate_deploy_account_skip_validation_and_fee.rs (14)

9-10: Import path consolidated.

The import path has been consolidated, maintaining consistent style with the rest of the codebase.


45-46: Simplified Felt hex initialization.

The Felt::from_hex call has been consolidated into a single line, improving code compactness.


58-58: Struct initialization consolidated.

The WaitForTx struct initialization has been simplified to a single line, which reduces vertical space while maintaining readability.


88-93: Match patterns consolidated effectively.

The match arm patterns for SimulateTransactionsResult have been reformatted into more compact single-line expressions, which improves readability without changing the matching logic.


97-98: Error construction simplified.

The error construction closure has been simplified to a single line, which maintains the same error message while reducing vertical space.


101-102: Error constructions consolidated correctly.

Multiple error construction closures have been consolidated into single-line expressions, which makes the code more compact while maintaining the same error messaging.

Also applies to: 107-108


113-116: Error handling patterns consolidated appropriately.

Multiple error handling patterns using ok_or_else have been consolidated into single-line expressions. This maintains the same error messaging but reduces vertical space.

Also applies to: 126-129, 139-142


182-185: Calldata extraction simplified.

The extraction of public key from constructor invocation calldata with error handling has been consolidated into a more compact format without changing the logic.


240-242: Error message formatting improved.

The error message formatting in the assertion has been simplified while maintaining clarity in the expected vs. actual comparison.


282-283: Assertion simplified appropriately.

The assertion for fee transfer invocation has been simplified to a single line without losing its meaning.


284-288: Error handling pattern consolidated effectively.

The error handling pattern for deployed contracts has been consolidated into a single-line expression, which makes the code more compact while preserving error clarity.


319-320: Error message formatting improved.

The error message formatting in the nonce assertion has been simplified without losing clarity.


354-355: Assertion comparison consolidated.

The assertion for public key storage value has been simplified to a single line while maintaining the same validation logic.


363-364: Assertion simplified appropriately.

The assertion for validate invocation has been simplified to a single line without losing its meaning.

openrpc-testgen/src/suite_openrpc/test_declare_txn_v2.rs (6)

10-10: Clean import organization.

The imports have been tidily organized into a single line, making the import section more compact while maintaining readability.


30-32: Improved path formatting.

The multi-line string initialization has been neatly consolidated into fewer lines, maintaining readability while reducing vertical space.


38-38: More concise method call.

The declare_v2 method call has been simplified to a single line, making the code more compact without sacrificing clarity.


55-58: Improved error handling formatting.

Error construction formatting has been consolidated into more compact expressions across multiple error cases, maintaining the same error semantics while reducing unnecessary line breaks.

Also applies to: 66-69, 80-80


96-98: Cleaner assertion formatting.

The assertion comparing JSON-parsed ABI fields has been reformatted into a single line for improved readability and conciseness.


108-108: Consistent formatting in error messages.

The error message formatting has been standardized for better readability and consistency with other error messages in the codebase.

openrpc-testgen/src/suite_openrpc/test_get_txn_receipt_declare.rs (7)

26-27: Improved path string formatting.

The path strings for contract class files have been consolidated into single lines, improving code readability while maintaining the same functionality.


34-37: More concise transaction operations.

The estimate_fee and declaration result calls have been simplified into more readable single-line expressions, which makes the code flow clearer.


57-57: Cleaner error handling.

The error return statement has been simplified to a single line, making the error flow more readable while maintaining the same error semantics.


64-64: Consistent assertion message formatting.

Multiple assertion message formats have been standardized to single-line expressions, maintaining the same error information while improving code consistency.

Also applies to: 70-70, 84-84


110-116: Improved event validation.

The event count assertion and event retrieval logic have been simplified to more concise expressions, making the validation flow cleaner while maintaining the same checks.


117-130: Streamlined event data retrieval.

Event data extraction has been consolidated into more readable single-line expressions, reducing unnecessary verbosity while maintaining the same data validation logic.


132-157: Optimized event key validation.

The event key retrieval and validation has been reformatted into more concise expressions, improving readability while maintaining the same validation logic.

openrpc-testgen/src/suite_openrpc/test_get_block_with_receipts_invoke.rs (7)

18-19: Clean import organization.

Import statements have been consolidated into fewer lines, maintaining readability while reducing vertical space in the import section.


32-32: Improved constant declaration.

The ETH_ADDRESS constant declaration has been simplified for better readability and consistency with other constant declarations in the file.


41-41: Cleaner recipient address initialization.

The recipient address initialization has been consolidated into a single line, making the code more concise without losing clarity.


78-79: More concise transaction data retrieval.

Both the transaction and receipt retrieval as well as block hash and number retrieval have been simplified to more readable expressions, enhancing code clarity.

Also applies to: 168-168


233-233: Consistent assertion message formatting.

Multiple assertion message formats throughout the file have been standardized to single-line expressions, improving code consistency while maintaining the same error information.

Also applies to: 322-322, 373-373, 377-377, 386-387, 391-392, 396-396, 406-406, 416-417, 426-427, 437-438, 474-474, 497-498


537-538: Streamlined receipt validation.

The finality status retrieval and validation has been reformatted into more concise expressions, making the validation flow clearer while maintaining the same checks.

Also applies to: 541-542, 544-544, 547-548, 550-551


557-558: Improved error handling and validation.

The error return and execution status validation has been simplified to more readable expressions, enhancing code clarity while preserving the same error semantics.

Also applies to: 565-566

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_trace_block_txn_invoke.rs (9)

41-50: Streamlined transaction preparation and execution.

Multiple operations including nonce retrieval, execution preparation, invoke request generation, signature verification, and transaction sending have been consolidated into more readable single-line expressions, significantly improving code flow and readability.


76-79: More concise trace block validation.

The assertion and trace block retrieval have been simplified to more readable expressions, enhancing code clarity while maintaining the same validation logic.


89-96: Cleaner transaction trace extraction.

The trace root and transaction hash retrieval has been consolidated into more readable single-line expressions, reducing unnecessary verbosity while maintaining the same data validation logic.


98-103: Improved pattern matching.

The pattern matching on trace root has been simplified by removing unnecessary braces and line breaks, making the code more concise without sacrificing clarity.


105-120: Streamlined trace data extraction.

The invoke trace, function invocation, validate invocation, and state diff retrieval have been consolidated into more readable single-line expressions, significantly improving code flow and readability.


159-175: Optimized data lookup operations.

Multiple data lookup operations including deployed contract index, STRK ERC20 index, and function invocation call retrieval have been reformatted into more concise expressions, enhancing code clarity while maintaining the same lookup logic.


196-200: Consistent assertion formatting.

Assertion formatting has been standardized throughout the file, improving code consistency while maintaining the same validation checks.

Also applies to: 233-234


236-256: Improved state diff validation.

State diff contract address retrieval and deployed contract storage diff retrieval have been consolidated into more readable single-line expressions, making the validation flow clearer while maintaining the same checks.


267-275: Streamlined storage balance validation.

The storage balance retrieval and validation has been reformatted into more concise expressions, enhancing code clarity while preserving the same validation logic.

openrpc-testgen/src/suite_openrpc/suite_deploy/test_get_txn_by_block_id_and_index_deploy_v3.rs (10)

31-31: Improved code compactness for ContractFactory instantiation.

The constructor call for ContractFactory has been condensed into a single line, making the code more concise while maintaining readability.


50-51: Method chain simplified to single line.

The chain of method calls to get chain ID has been condensed to a single line, improving code compactness.


56-57: Transaction broadcast statement reformatted for better readability.

The method call for adding an invoke transaction has been simplified to a single line.


67-68: Format string simplified for better readability.

The format string for transaction hash assertion message has been condensed to single line, making the code more concise.


70-73: Block retrieval code condensed for better readability.

Code for getting block number and block with transactions has been reformatted to be more concise while maintaining proper structure.


80-81: Error handling closures simplified.

The error handling closures for transaction not found conditions have been reformatted to be more concise.

Also applies to: 87-88


108-109: Assertion formatting improved.

The assertion format strings have been condensed to single lines, making them more readable while maintaining the same error information.

Also applies to: 111-111


113-117: Consistent pattern for accessing calldata elements.

The code for accessing calldata elements has been consistently reformatted across all instances, creating a uniform pattern throughout the file. This makes the code more readable and maintainable.

Also applies to: 124-128, 134-138, 145-149, 158-162, 168-172, 178-182, 196-200


200-201: Simplified Felt conversion from decimal string.

The construction of the calldata length as a Felt value has been simplified to a single line.


218-219: Assertion messages consolidated.

Format strings for assertions have been consistently reformatted to be more concise across the entire file.

Also applies to: 222-223, 227-228, 241-242, 283-284, 286-288

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_simulate_invoke_v3_skip_validate_skip_fee.rs (11)

17-19: Import statements consolidated.

The import statements have been reorganized to reduce vertical space while maintaining clear organization.


51-60: Method chains for setup operations condensed.

The code for setting up the test environment has been reformatted to be more concise, while maintaining clear separation between different operations.


86-91: Match expressions simplified.

The match expressions for handling the SimulateTransactionsResult have been condensed to reduce vertical space while preserving logic clarity.


95-96: Error creation expressions consolidated.

Error creation expressions have been simplified to single lines, making the code more compact.

Also applies to: 99-100


103-107: Nested match statement reformatted.

The nested match statement for handling transaction traces has been reformatted to be more concise while maintaining readability.


110-117: Error handling blocks consolidated.

The error handling blocks for extracting trace information have been consolidated to reduce vertical space while maintaining clarity.


122-123: Consistent pattern for error handling.

Error handling has been consistently reformatted across the file, creating a uniform pattern that improves readability.

Also applies to: 137-138, 141-144, 147-150


203-208: Assertion formatting standardized.

Complex assertions with format strings have been standardized to reduce unnecessary vertical space while maintaining clear error messages.

Also applies to: 212-217


230-234: Simple assertions consolidated.

Simpler assertions have been condensed to single lines where appropriate, improving code compactness.

Also applies to: 247-247, 311-311


259-262: Complex error handling expressions standardized.

More complex error handling expressions with format strings have been consistently reformatted to reduce vertical space.

Also applies to: 273-278, 290-293


306-307: Simplified condition expression.

The condition for checking storage diff entries has been simplified to a single line.

openrpc-testgen/src/suite_katana_no_mining/mod.rs (13)

7-9: Import statements consolidated.

Import statements have been reorganized to reduce vertical space while maintaining clear structure.

Also applies to: 29-30


84-85: Setup code formatting improved.

The code for setting up the test environment has been reformatted to be more concise, making it easier to follow the flow of operations.

Also applies to: 97-99, 102-103, 110-114, 121-125, 132-133


137-138: Account creation and deployment condensed.

Account creation and deployment operations have been reformatted to reduce unnecessary vertical space while maintaining clear separation between operations.

Also applies to: 152-155


195-196: Struct initializations simplified.

The initialization of RandomSingleOwnerAccount structs has been simplified to single lines.


198-203: Contract compilation path handling improved.

The code for handling contract compilation paths has been reformatted to be more concise.


212-214: Transaction handling and error reporting condensed.

Transaction handling and error reporting code has been reformatted to reduce vertical space while maintaining clear error information.

Also applies to: 224-228, 238-242


260-261: Transaction processing code simplified.

Transaction processing code has been reformatted to be more concise, improving readability.

Also applies to: 275-276, 298-299, 301-304


306-307: Method chains and error handling simplified.

Method chains and error handling have been reformatted to reduce vertical space while maintaining clarity.

Also applies to: 311-312, 316-317, 325-326


331-333: Receipt processing code consolidated.

Receipt processing code and error handling has been reformatted to be more concise.

Also applies to: 336-337, 340-341


392-392: Transaction status logging improved.

Transaction status logging and error handling has been reformatted to be more concise while maintaining clear status messages.

Also applies to: 403-404, 406-407, 418-419, 426-431


433-434: Transaction status matching patterns simplified.

Transaction status matching patterns have been reorganized to reduce vertical space while maintaining clarity.

Also applies to: 438-439, 444-445


476-480: Token parsing logic consolidated.

Token parsing logic has been reformatted to be more concise while maintaining clear error handling.


491-491: Include statement simplified.

The include statement for generated tests has been simplified to a single line.

openrpc-testgen/src/suite_openrpc/test_get_storage_contract_storage_proof.rs (7)

15-16: Utility imports consolidated.

The import statements for utility functions have been reorganized to reduce vertical space.


38-40: Contract path handling improved.

The handling of contract paths has been reformatted to be more concise.


45-45: Method chains for contract operations condensed.

Method chains for contract declaration and deployment have been simplified to single lines, improving code readability.

Also applies to: 61-61


78-80: Receipt processing code reformatted.

Receipt processing code and error handling has been reformatted to reduce vertical space while maintaining clarity.

Also applies to: 83-84, 87-88


106-113: Error handling blocks consolidated.

Error handling blocks for storage proofs have been consolidated to reduce vertical space, improving readability while maintaining clear error information.


122-124: Transaction execution code simplified.

Transaction execution code has been reformatted to be more concise, improving readability.


145-151: Storage proof extraction simplified.

Storage proof extraction and error handling has been reformatted to be more concise while maintaining clear error information.

openrpc-testgen/src/suite_openrpc/test_get_txn_receipt_deploy_account.rs (1)

41-44: Formatting-only refactor approved
These hunks consolidate struct initializations, method chains, and assertions into more compact single-line expressions. No changes were introduced to logic, control flow, or error handling.

Also applies to: 54-54, 75-77, 85-85, 143-145, 175-180, 185-187, 195-200, 202-204

openrpc-testgen/src/suite_openrpc/test_get_nonce.rs (1)

45-48: Formatting-only refactor approved
Multi-line expressions for struct creation, provider calls, and assertions were condensed into single lines. The functional behavior remains identical.

Also applies to: 58-58, 82-82, 96-96

openrpc-testgen/src/suite_openrpc/test_simulate_declare_v3_skip_fee.rs (1)

14-14: Stylistic formatting consolidation approved
Pattern matches, chained async calls, and error constructions have been reformatted for brevity without affecting any logic or error handling paths.

Also applies to: 33-38, 46-57, 75-75, 84-84, 170-182

openrpc-testgen/src/suite_openrpc/test_deploy_account_trace.rs (1)

22-22: Stylistic formatting consolidation approved
This refactor merges multi-line invocations and assertions into single-line statements. All original semantics, control flow, and validations remain intact.

Also applies to: 62-63, 75-78, 93-95, 133-137, 173-177, 225-232, 261-262

openrpc-testgen/src/suite_openrpc/test_declare_v3_trace.rs (1)

14-14: Stylistic formatting consolidation approved
The changes compress chained method calls, match arms, and assertions into succinct single-line forms without altering behavior or error handling.

Also applies to: 29-30, 39-40, 51-53, 73-74, 82-82, 131-133, 149-154

openrpc-testgen/src/suite_openrpc/test_get_txn_by_block_id_and_index_declare_v3.rs (1)

1-214: Approve: Pure formatting refactor with no behavioral changes
All edits in this file consolidate multi-line chained calls, struct initializations, error constructions, and assertion macros into single-line expressions. I’ve verified that no logic, control flow, error handling, or public API signatures were altered. The changes improve readability and reduce vertical space without impacting functionality.

openrpc-testgen/src/suite_openrpc/test_declare_txn_v3.rs (1)

1-132: Approve: Stylistic consolidation only
The modifications primarily collapse import groups, PathBuf::from_str blocks, match‐arm error handling, and assertion macros into more compact single-line statements. No functional or error‐handling behaviors have been changed. This enhances consistency and readability across the suite.

openrpc-testgen/src/suite_openrpc/test_get_txn_by_block_id_and_index_deploy_account_v3.rs (1)

1-262: Approve: Refactor for conciseness without logic alteration
All differences here are purely stylistic—chaining calls, struct initialization, and assertion formatting have been tightened into single lines. Core functionality, error handling, and public API usage remain untouched.

openrpc-testgen/src/suite_openrpc/test_trace_block_txn_declare.rs (1)

1-264: Approve: Formatting-only changes preserved existing behavior
This update condenses multi-line method chains and error‐handling closures into one-liners and compresses assertion blocks. There are no changes to logic, control flow, or error semantics.

openrpc-testgen/src/suite_openrpc/test_get_events_declare.rs (1)

1-153: Approve: Single-line formatting refactor — behavior intact
The adjustments in this test unify multi-step calls, struct inits, and error closures into single lines for consistency. No behavioral or API changes were introduced.

openrpc-testgen/src/suite_openrpc/suite_deploy/suite_contract_calls/test_simulate_invoke_v3_skip_fee.rs (1)

13-14: Stylistic cleanup: compacted multi-line chains and closures
These changes condense chained method calls, error unwrap closures, and match arms into fewer lines without affecting logic or control flow. All original semantics and error handling remain intact.

Also applies to: 37-37, 39-40, 42-42, 44-45, 71-76, 81-82, 85-86, 96-99, 105-107, 112-112, 127-128, 131-134, 137-140, 219-224, 236-237, 249-253, 263-268, 281-283, 296-298, 311-316

openrpc-testgen/src/suite_openrpc/test_get_block_txn_count.rs (1)

40-42: Formatting-only: condensed multi-line expressions
Converted struct initializations, RPC calls, and assertion macros into single-line or fewer-line statements for compactness. No logic or behavior changes.

Also applies to: 46-47, 63-63, 105-105, 107-107, 115-115, 137-139

openrpc-testgen/src/suite_openrpc/test_get_class.rs (1)

9-9: Purely stylistic: merged long chains and error branches
Multi-line calls and match branches have been refactored into single-line expressions. Existing logic, error handling, and return semantics are unchanged.

Also applies to: 29-30, 53-57, 60-64, 76-79, 94-96, 106-107

openrpc-testgen/src/suite_openrpc/test_get_events_deploy_account.rs (1)

44-44: Stylistic refinement: consolidating chains and unwraps
Refactored multi-line RPC calls, event filter setup, and unwrap patterns into concise single-line statements. No changes to logic, control flow, or test assertions.

Also applies to: 57-57, 68-68, 70-71, 81-81, 90-91, 93-95, 111-113, 158-159, 161-161, 181-182, 208-209, 211-212

openrpc-testgen/src/suite_openrpc/test_get_block_with_receipts_deploy.rs (1)

20-21: Formatting-only: code compactness improvements
All changes condense multi-line chains, struct initializations, and error branches into fewer lines. No functional or semantic alterations; logic and assertions remain identical.

Also applies to: 53-53, 70-70, 89-89, 98-100, 150-150, 201-204, 209-209, 217-217, 221-221, 233-235, 237-239, 246-246, 253-256, 265-273, 277-278, 288-289, 296-297, 309-311, 356-356, 388-392, 407-412, 418-420, 424-426, 430-430

openrpc-testgen/src/suite_openrpc/test_erc20_transfer_outside_execution.rs (10)

15-16: Approve import condensing
The import line is now consolidated into a single-line expression without altering semantics.


64-67: Approve error handling branch formatting
The AccountError::Signing branch has been condensed into a single-line Err(RunnerError::AccountFailure(...)) construction, preserving the original logic.


75-78: Approve provider error branch formatting
Similar consolidation in the ProviderError::Other branch for improved readability; logic remains identical.


94-100: Approve factory creation & deployment formatting
The ContractFactory::new instantiation and the subsequent .deploy_v3(...).send().await? call are now on single lines for brevity, with no semantic change.


117-122: Approve receipt pattern matching formatting
The match on TxnReceipt::Invoke has been simplified to a concise if let expression for event extraction; behavior is unchanged.


152-156: Approve mint call formatting
Construction of the mint call struct is now a single-line Call { ... } block—semantics preserved.


170-175: Approve outside-execution calldata preparation formatting
The prepare_outside_execution(...) invocation has been merged into a concise single-line call, preserving functional behavior.


180-183: Approve call-to-executable-account formatting
The Call struct for execute_from_outside_v2 is now defined in a compact block, with no change to logic.


185-194: Approve balance retrieval & conversion formatting
Chained .await? calls within get_balance and felts_slice_to_biguint are now on single lines for readability; behavior is intact.


216-218: Approve transaction execution & wait formatting
The transaction send and the subsequent wait_for_sent_transaction call are now condensed into minimal lines, maintaining original semantics.

openrpc-testgen/src/suite_openrpc/test_get_storage_contract_proof.rs (6)

35-38: Approve contract path parsing formatting
The PathBuf::from_str calls are now consolidated into single-line expressions without changing functionality.


42-43: Approve declare_v3 call formatting
The contract declaration call chain is compressed into one line for compactness; logic remains the same.


58-60: Approve deploy_v3 call formatting
Deployment invocation is now a single-line factory.deploy_v3(...).send().await?; semantic behavior is unchanged.


95-99: Approve get_storage_proof invocation formatting
The storage proof request has been streamlined into a one-line call, preserving the original functionality.


100-105: Approve proof leaves data extraction formatting
Retrieval of contract_leaves_data.first() is now more concise; error handling remains intact.


121-124: Approve Merkle tree proof computation formatting
The calls to compute_expected_child_for_contract_proof and verify_proof are merged into single lines without affecting behavior.

openrpc-testgen/src/suite_katana_no_account_validation/mod.rs (10)

72-74: Approve contract path parsing formatting
Consolidated multi-line PathBuf::from_str invocations into single-line calls; functionality unchanged.


82-90: Approve private key derivation formatting
The SigningKey::from_secret_scalar(...) assignment is now inline for clarity, with no change to logic.


94-101: Approve declare_v3 branch formatting
The account declaration match arms, including wait_for_sent_transaction_katana, are now condensed and maintain identical logic.


135-142: Approve account creation & deploy-call formatting
The create_account call and the subsequent Call struct definition for deployment are reformatted for compactness; semantics preserved.


193-195: Approve random account collections formatting
The RandomSingleOwnerAccount wrappers for paymaster and executable accounts are now one-line struct initializations.


196-202: Approve sample contract compilation formatting
Second get_compiled_contract invocation has been merged into a concise one-line expression.


309-315: Approve factory instantiation & deploy formatting
ContractFactory::new initialization and .deploy_v3(...).send().await? are now on single lines for brevity; behavior unchanged.


323-330: Approve receipt pattern matching formatting
Simplified match on TxnReceipt variants into inline style, with no change to logic.


390-405: Approve transaction wait loop formatting
The logging and retry loop in wait_for_sent_transaction_katana is now formatted with fewer blank lines; semantics preserved.


474-478: Approve continuation token parsing formatting
The ContinuationToken::parse method’s hex parsing calls are now streamlined into single lines without altering functionality.

openrpc-testgen/src/suite_openrpc/suite_deploy/test_get_txn_by_block_id_and_index_deploy_v1.rs (9)

13-13: Approve import formatting
The starknet_types_rpc import group has been consolidated into one line; semantics unchanged.


49-52: Approve invoke request and submission formatting
Combined verify_invoke_v1_signature and add_invoke_transaction(...) chains into concise inline calls without altering behavior.

Also applies to: 57-58


67-69: Approve hash assertion formatting
Reshaped the assert_result! for the transaction hash check into a single-line expression, preserving the original logic.


71-74: Approve block retrieval formatting
Condensed block-number fetching and get_block_with_txs(...) into succinct one-line calls; behavior remains the same.


81-82: Approve transaction index lookup formatting
The .position(...).ok_or_else(...) chains are now inlined for readability, with no change to functionality.

Also applies to: 87-88


107-113: Approve first calldata element extraction formatting
Merged the .calldata.first().ok_or_else(...) pattern into a single-line statement, maintaining semantics.


120-123: Approve second calldata element extraction formatting
Inlined the .get(1).ok_or_else(...) call into one concise block; logic intact.


130-133: Approve third calldata element extraction formatting
Applied the same one-line consolidation for the third element lookup; behavior unchanged.


141-144: Approve fourth calldata element extraction formatting
The .get(3).ok_or_else(...) is now defined in one line for brevity; semantic behavior is preserved.

openrpc-testgen/src/suite_katana_no_fee/mod.rs (12)

72-74: Approve contract path parsing formatting
Multi-line PathBuf::from_str calls are now inlined into single statements; functionality unchanged.


82-90: Approve private key derivation formatting
The SigningKey::from_secret_scalar(...) assignment has been inlined for clarity, without affecting logic.


94-101: Approve declare_v3 block formatting
The paymaster_account.declare_v3(...) match arms, including mining waits, are now condensed while preserving all behaviors.


135-142: Approve account creation & deploy-call formatting
The create_account call and Call struct initialization for deploying the account are now more compact, semantics intact.


150-155: Approve transaction execution & wait formatting
Reformatted the execute_v3 send and subsequent wait_for_sent_transaction_katana into single-line chains with no semantic change.


193-195: Approve random account wrappers formatting
Created RandomSingleOwnerAccount instances for both account types in one-line struct constructors; behavior preserved.


196-202: Approve sample contract compilation formatting
The second get_compiled_contract call is now a single-line invocation, with no change to functionality.


209-214: Approve declaration result event querying formatting
In the error branch, event-filtering loops and contract-hash extraction are now formatted concisely without altering logic.


309-315: Approve factory instantiation & deploy formatting
ContractFactory::new and .deploy_v3(...).send().await? are merged into compact statements, preserving original behavior.


323-330: Approve receipt pattern matching formatting
Simplified the match arms for TxnReceipt variants into inline style, with no functional changes.


390-405: Approve transaction wait loop formatting
Logging and retry mechanics in wait_for_sent_transaction_katana are now minimal-line loops; semantics remain identical.


474-478: Approve continuation token parsing formatting
The hex-parsing steps in ContinuationToken::parse are now condensed into fewer lines, preserving the parsing logic.

openrpc-testgen/src/suite_katana/mod.rs (11)

5-5: Import statement consolidation looks good.

The import has been updated to include additional types in a single line, which improves code compactness without sacrificing readability.


25-25: LGTM!

Comprehensive list of imports organized in a single line.


97-98: Clean consolidation of method chaining.

The multi-line declare_v3 method call has been appropriately converted into a single-line format, which aligns with the PR's formatting objectives.


109-113: Error handling condensation looks good.

The error handling has been reformatted into a more compact form while preserving the same error message structure and logic.


120-124: Consistent error handling reformatting.

This error handling block matches the style changes applied to other similar blocks in the file, maintaining consistency.


136-137: Function call reformatting improves readability.

The create_account function call has been effectively condensed into a more readable format without changing the parameters or logic.


151-152: Method chaining condensation is well-executed.

The execute_v3 method call and chain has been effectively consolidated into a single line, improving code compactness.


192-193: Clean struct initialization.

Struct initializations have been simplified to single-line expressions, which is consistent with the overall formatting improvements in the PR.


203-302: Complex match expression reformatting maintains logic clarity.

The extensive reformatting of this match expression condenses the code while preserving the original error handling logic, including:

  1. Successful declaration handling
  2. Handling of "already declared" errors in different error types
  3. The fallback event scanning loop for transaction hash retrieval

This is a good example of improving code compactness without sacrificing functionality or error handling robustness.


320-321: Conditional expression condensed effectively.

The multi-line conditional check has been converted to a single-line format that maintains readability while reducing vertical space.


325-326: Error return statements simplified appropriately.

The error handling return statements have been condensed to a more direct format while maintaining the same error types and messages.

Also applies to: 329-330

Comment on lines +55 to +56
let receipts: Vec<Receipt> =
convert_receipts(transaction_receipts.clone()).into_iter().map(|receipt| receipt.into()).collect();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Consider simplifying the mapping to Receipt

Instead of using .into_iter().map(|receipt| receipt.into()), you can leverage Into::into directly to make the intent clearer and reduce boilerplate:

-let receipts: Vec<Receipt> =
-    convert_receipts(transaction_receipts.clone()).into_iter().map(|receipt| receipt.into()).collect();
+let receipts: Vec<Receipt> =
+    convert_receipts(transaction_receipts.clone()).into_iter().map(Into::into).collect();
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
let receipts: Vec<Receipt> =
convert_receipts(transaction_receipts.clone()).into_iter().map(|receipt| receipt.into()).collect();
let receipts: Vec<Receipt> =
convert_receipts(transaction_receipts.clone())
.into_iter()
.map(Into::into)
.collect();

Comment on lines +26 to +27
PathBuf::from_str("target/dev/contracts_contracts_smpl14_HelloStarknet.contract_class.json")?,
PathBuf::from_str("target/dev/contracts_contracts_smpl14_HelloStarknet.compiled_contract_class.json")?,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Optional: Simplify PathBuf construction
Consider using PathBuf::from("...") instead of PathBuf::from_str("...")? to eliminate the Result and ? handling overhead.

.nonce(curr_nonce)
.send()
.await?;
let res = account.execute_v1(vec![increase_balance_call.clone()]).max_fee(fee).nonce(curr_nonce).send().await?;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Consistent formatting for retryable transaction
Good reuse of the fluent API in one line, but again consider multi-line formatting for maintainability.

.max_fee(fee)
.send()
.await?;
let res = account.execute_v1(vec![increase_balance_call.clone()]).max_fee(fee).send().await?;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Consider readability for chained async call
The single-line chain account.execute_v1(...).max_fee(fee).send().await? is concise but risks exceeding typical line-length limits and can be harder to debug. Consider breaking the chain across multiple lines for clarity.

.nonce(old_nonce)
.send()
.await;
let res = account.execute_v1(vec![increase_balance_call.clone()]).max_fee(fee).nonce(old_nonce).send().await;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Split long call chains into lines
Similar to line 42, the long .execute_v1(...).max_fee(fee).nonce(old_nonce).send().await chain could be easier to follow if each method call were on its own line.

.first()
.ok_or_else(|| OpenRpcTestGenError::Other("Event data not found".to_string()))?;
let event_data_first =
*event.data.first().ok_or_else(|| OpenRpcTestGenError::Other("Event data not found".to_string()))?;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

First event data extraction
Dereferencing and error unwrapping inline is fine; consider splitting if more transformations are needed.

.get(1)
.ok_or_else(|| OpenRpcTestGenError::Other("Event key not found".to_string()))?;
let event_key_second =
*event.keys.get(1).ok_or_else(|| OpenRpcTestGenError::Other("Event key not found".to_string()))?;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Third event key extraction
Inline extract is concise.

.chain_id()
.to_hex_string()
.as_str(),
test_input.random_paymaster_account.chain_id().to_hex_string().as_str(),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Nitpick: ephemeral .to_hex_string().as_str() usage
Calling .to_hex_string().as_str() on a temporary String works here, but introducing a local let chain_id_hex = ...; variable could improve readability.

const DEPLOY_ACCOUNT_MAX_FEE: Felt = Felt::from_hex_unchecked("0x336f");
const ETH: Felt =
Felt::from_hex_unchecked("0x49D36570D4E46F48E99674BD3FCC84644DDD6B96F7C741B1562B82F9E004DC7");
const ETH: Felt = Felt::from_hex_unchecked("0x49D36570D4E46F48E99674BD3FCC84644DDD6B96F7C741B1562B82F9E004DC7");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Consider documenting or renaming ETH constant
Introducing ETH as a bare constant is fine, but adding a comment or using a more descriptive name (e.g., ETH_TOKEN_ADDRESS) would improve clarity for future readers.

Comment on lines 75 to 78
assert_result!(
status.starting_block_hash == starting_block_hash,
format!(
"Mismatch starting block hash: {} != {}",
status.highest_block_num, starting_block_hash
)
format!("Mismatch starting block hash: {} != {}", status.highest_block_num, starting_block_hash)
);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Incorrect field in error message for starting block hash assertion.
The assertion checks status.starting_block_hash == starting_block_hash but uses status.highest_block_num in its error message, which is misleading.

Apply this diff to correct the error message:

- assert_result!(
-     status.starting_block_hash == starting_block_hash,
-     format!("Mismatch starting block hash: {} != {}", status.highest_block_num, starting_block_hash)
- );
+ assert_result!(
+     status.starting_block_hash == starting_block_hash,
+     format!("Mismatch starting block hash: {} != {}", status.starting_block_hash, starting_block_hash)
+ );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
assert_result!(
status.starting_block_hash == starting_block_hash,
format!(
"Mismatch starting block hash: {} != {}",
status.highest_block_num, starting_block_hash
)
format!("Mismatch starting block hash: {} != {}", status.highest_block_num, starting_block_hash)
);
assert_result!(
status.starting_block_hash == starting_block_hash,
format!("Mismatch starting block hash: {} != {}", status.starting_block_hash, starting_block_hash)
);

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9422489 and 6403887.

📒 Files selected for processing (6)
  • .github/workflows/build.yaml (0 hunks)
  • .github/workflows/fmt.yaml (0 hunks)
  • .github/workflows/pull-request-main-ci.yml (1 hunks)
  • .github/workflows/task-build.yaml (1 hunks)
  • .github/workflows/task-lint-cargo.yaml (1 hunks)
  • .github/workflows/task-lint-prettier.yaml (1 hunks)
💤 Files with no reviewable changes (2)
  • .github/workflows/build.yaml
  • .github/workflows/fmt.yaml
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/pull-request-main-ci.yml

13-13: could not read reusable workflow file for "./task-lint-cargo.yaml": open /home/jailuser/git/task-lint-cargo.yaml: no such file or directory

(workflow-call)


18-18: could not read reusable workflow file for "./task-lint-prettier.yaml": open /home/jailuser/git/task-lint-prettier.yaml: no such file or directory

(workflow-call)


23-23: could not read reusable workflow file for "./task-build.yaml": open /home/jailuser/git/task-build.yaml: no such file or directory

(workflow-call)

.github/workflows/task-lint-prettier.yaml

16-16: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.35.1)
.github/workflows/task-lint-cargo.yaml

[warning] 4-4: truthy value should be one of [false, true]

(truthy)


[error] 19-19: trailing spaces

(trailing-spaces)

Comment on lines +29 to +32
- name: Check feature combinations
run: |
cargo cargo hack test --feature-powerset --no-dev-deps
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct the cargo hack invocation.

The step is calling cargo cargo hack test, which is invalid (cargo is repeated). It should invoke cargo hack directly:

-          cargo cargo hack test --feature-powerset --no-dev-deps
+          cargo hack test --feature-powerset --no-dev-deps
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Check feature combinations
run: |
cargo cargo hack test --feature-powerset --no-dev-deps
- name: Check feature combinations
run: |
cargo hack test --feature-powerset --no-dev-deps

Comment on lines +19 to +20
run:
cargo fmt -- --check
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Remove trailing whitespace after run:.

There’s an extra space at the end of the run: line. Please remove it so it reads:

run:
  cargo fmt -- --check
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 19-19: trailing spaces

(trailing-spaces)

Comment on lines +5 to +6
workflow_dispatch:
workflow_call:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Make empty event mappings explicit.

YAMLlint warns about empty workflow_dispatch and workflow_call values. Define them as empty mappings to satisfy the schema:

 on:
-  workflow_dispatch:
-  workflow_call:
+  workflow_dispatch: {}
+  workflow_call: {}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
workflow_dispatch:
workflow_call:
on:
workflow_dispatch: {}
workflow_call: {}

Comment on lines 20 to +22
- name: Install dependencies
run: npm install

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Optimize dependency installation.

For more reliable and faster CI runs:

  • Use npm ci instead of npm install to respect the lockfile.
  • Cache node_modules with actions/cache keyed off package-lock.json.

Comment on lines 15 to +19
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "22"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Use a valid Node.js version or LTS alias.

Pinning node-version: "22" will fail since Node 22 isn’t released. Update to a current version (e.g., "20") or use the LTS alias:

-      - name: Setup Node.js
-        uses: actions/setup-node@v3
-        with:
-          node-version: "22"
+      - name: Setup Node.js
+        uses: actions/setup-node@v3
+        with:
+          node-version: "20"

Alternatively:

node-version: 'lts/*'
🧰 Tools
🪛 actionlint (1.7.4)

16-16: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

♻️ Duplicate comments (1)
.github/workflows/pull-request-main-ci.yml (1)

16-19: Duplicate: Validate other reusable workflows similarly.
Apply the same existence and workflow_call checks from the previous comment to:

  • .github/workflows/task-lint-prettier.yaml (lines 18–19)
  • .github/workflows/task-build.yaml (lines 23–24)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6403887 and 3c81289.

📒 Files selected for processing (1)
  • .github/workflows/pull-request-main-ci.yml (1 hunks)

Comment on lines +1 to +2
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/github-workflow.json
name: Workflow - Pull Request Main
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Consider pinning the JSON schema reference for stability.

Referencing the SchemaStore schema on the master branch can introduce unexpected breaking changes if the schema evolves. It may be safer to pin to a specific version or commit hash:

# Instead of:
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/.../master/src/schemas/json/github-workflow.json

# Pin to a tag:
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/v1.21.0/src/schemas/json/github-workflow.json

build:
needs: lint-prettier
uses: ./.github/workflows/task-build.yaml
secrets: inherit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Add a trailing newline at end of file.

POSIX conventions recommend ending text files with a newline to avoid parser warnings.

Comment on lines +11 to +14
lint-cargo:
if: github.event.pull_request.draft == false
uses: ./.github/workflows/task-lint-cargo.yaml
secrets: inherit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify the reusable workflow file and its workflow_call trigger.

This job references .github/workflows/task-lint-cargo.yaml. Ensure that file:

  1. Exists at the given path.
  2. Declares on: workflow_call at the top.
  3. Exposes any required inputs or secrets.

To automate this check, you can run:


🏁 Script executed:

#!/usr/bin/env bash
file=".github/workflows/task-lint-cargo.yaml"
if [[ ! -f "$file" ]]; then
  echo "Error: $file not found" && exit 1
fi
grep -Rq "on:\s*workflow_call" "$file" || {
  echo "Error: 'workflow_call' trigger missing in $file"
  exit 1
}
echo "✔ task-lint-cargo.yaml is properly configured"

Length of output: 355


Add the missing workflow_call trigger to the reusable workflow

The workflow referenced in .github/workflows/pull-request-main-ci.yml cannot be invoked because task-lint-cargo.yaml lacks the required on: workflow_call declaration. Please update .github/workflows/task-lint-cargo.yaml by adding at the very top:

on:
  workflow_call:
    inputs:
      # define any inputs your lint task requires
    secrets:
      inherit

Files needing this change:

  • .github/workflows/task-lint-cargo.yaml

Comment on lines +4 to +8
on:
pull_request:
branches: [main]
push:
branches: [main]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Refine the trigger guard to avoid errors on push events.

The workflow fires on both pull_request and push, but the first job’s if: github.event.pull_request.draft == false will reference github.event.pull_request even on push, leading to a null dereference or unintended skips. Explicitly scope the condition:

 jobs:
   lint-cargo:
-    if: github.event.pull_request.draft == false
+    if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.draft }}

Or split PR vs. push flows into separate jobs/workflows as needed.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
on:
pull_request:
branches: [main]
push:
branches: [main]
# .github/workflows/pull-request-main-ci.yml
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
lint-cargo:
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.draft }}
# …rest of the job definition…

Comment on lines +21 to +24
build:
needs: lint-prettier
uses: ./.github/workflows/task-build.yaml
secrets: inherit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: Build job won’t run on push to main.

Because lint-cargo is skipped on push (due to its if guard), lint-prettier and thus build are also skipped. If the intention is to run build on pushes to main, adjust its conditions or dependencies. For example:

   build:
-    needs: lint-prettier
+    needs:
+      - lint-prettier
+      - lint-cargo
+    if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && !github.event.pull_request.draft) }}
    uses: ./.github/workflows/task-build.yaml
    secrets: inherit

This ensures build runs on both non-draft PRs and pushes.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
build:
needs: lint-prettier
uses: ./.github/workflows/task-build.yaml
secrets: inherit
build:
needs:
- lint-prettier
- lint-cargo
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && !github.event.pull_request.draft) }}
uses: ./.github/workflows/task-build.yaml
secrets: inherit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant