-
Notifications
You must be signed in to change notification settings - Fork 1
feat(madara): integrating openrpc-testgen
into Madara
#273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
""" WalkthroughThis 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
Possibly related PRs
Suggested labels
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 issueFix 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
📒 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 matchinggenerated_tests_
prefixes is clear and maintains functionality.
41-44
: Condensed root suite directory check
Consolidating theis_dir
and prefix check into a single conditional improves readability while preserving behavior.
60-63
: Consistent nested suite directory filtering
Applying the same single-linesuite_
prefix check in recursive processing keeps the implementation uniform.
80-82
: Streamlined generated file path setup and creation
Combiningformat!
-based path construction with file creation in two concise lines is both succinct and clear.
97-97
: Single-lineimpl RunnableTrait
invocation
Merging thewriteln!
macro into one line enhances brevity without sacrificing clarity.
118-118
: Inlinefailed_tests
HashMap initialization
Declaring and initializing theHashMap
on one line keeps the generated code compact and readable.b11r/src/block_build/block.rs (6)
7-8
: Approve: Condensed import formattingThe multi-line import of commitment functions has been correctly consolidated without altering functionality or readability.
75-77
: Approve: Hex parsing inlinedThe call to
u128::from_str_radix
foreth_l1_gas_price
has been correctly compacted into a single-expression initializer while preserving error handling.
78-81
: Approve: Strk gas price parsing condensedThe parsing of
strk_l1_gas_price
remains clear and functionally identical after formatting.
82-85
: Approve: Eth L1 data gas price parsingCondensing the initialization retains clarity and propagates errors as intended.
86-89
: Approve: Strk L1 data gas price parsingThe formatting change is purely stylistic and correctly maintains error handling.
96-96
: Approve: Block struct instantiation compactSingle-line struct instantiation of
Block
is concise and readable.crypto-utils/src/curve/signer.rs (17)
17-17
: Approve:EC_ORDER
constant inlined definitionInlining the raw array for
EC_ORDER
is purely stylistic and correctly captures the field element.
19-19
: Approve:EC_ORDER_2
hex-based initializationUsing
U256::from_be_hex
forEC_ORDER_2
is concise and clear.
21-21
: Approve:ELEMENT_UPPER_BOUND
definitionCondensing the array initializer for
ELEMENT_UPPER_BOUND
improves readability without affecting semantics.
25-26
: Approve:GENERATOR
struct initializationThe one-line initializer for
GENERATOR
is neat and maintains correctness.
29-30
: Approve:ALPHA
constant compactedThe single-line definition keeps the code concise and preserves the intended constant.
32-33
: Approve:BETA
constant compactedCondensing to one line enhances vertical compactness with no logic change.
36-36
: Approve: Trait method signature formattingThe
ecdsa_sign
signature in theSigner
trait remains unchanged in functionality; formatting is purely stylistic.
40-40
: Approve: Impl method signature formattingThe inline formatting of the
ecdsa_sign
implementation signature is consistent and maintains behavior.
49-49
: Approve: Error variant mapping in match armConsolidating the branch for
InvalidMessageHash
remains clear and correct.
99-99
: Approve:From<ExtendedSignature>
conversion inlineInlining the struct construction for
Signature
is concise and behavior-preserving.
203-203
: Approve:get_public_key
one-linerThe compact chain for computing the public key is readable and functionally identical.
235-235
: Approve:sign
return expression compactThe inline creation of
ExtendedSignature
remains clear, correct, and error-safe.
277-277
: Approve:mod_inverse
result assignmentCondensing the conditional for a negative
x
value is stylistically sound and unchanged in logic.
355-355
: Approve:verify
public key reconstructionInlined sqrt and error propagation for building
full_public_key
is concise and correct.
370-370
: Approve:verify
result check inlineThe combined equality checks remain correct after formatting.
387-387
: Approve:recover
full_r
computation inlineInlining the point reconstruction maintains error handling and correctness.
393-393
: Approve:recover
bit extraction loopCondensing 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
Theget_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
: Condensedget_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
: Condenseddeploy_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 chainedexecute_v1(...).nonce(...).send().await
Line compression matches styling updates elsewhere; behavior unchanged.
68-68
: InlinedEventsChunk
destructuring for zero chunk size case
Maintains destructuring semantics while adhering to one-line statement style.
93-93
: InlinedEventsChunk
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
: InlinedEventsChunk
destructuring for paginated call
Follows the formatting pattern of other get_events calls.
125-125
: InlinedEventsChunk
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 forcalldata
Merged multipleFelt::from_hex_unchecked
calls into a single-linevec![]
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
: Consolidatedget_compiled_contract
arguments
ThePathBuf::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 theformat!
-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-lineformat!
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
: Inlinechain_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
Theformat!
-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 thefor
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 ininvoke_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 subsequentunwrap()
andassert_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 toexecute_v3(...).send().await?
has been merged into a single line without changing its behavior.
51-51
: Stylistic refactor: inlineassert_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
Theassert_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: inlineok_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
Theassert_matches_result!(res.unwrap_err(), AccountError::Provider(...))
check is now a single-line assertion.
45-45
: Stylistic refactor: inline nonce assertion
Theassert_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
Theassert_matches_result!(res.unwrap_err(), AccountError::Provider(...))
invocation is condensed without changing behavior.
59-59
: Stylistic refactor: inline nonce assertion
Theassert_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 theto
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 conciselyThe 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 stylingThe
STRK
constant is properly defined with a descriptive name and appropriate Felt initialization.
60-60
: Compact struct initialization for better readabilityThe struct initialization is now on a single line, which improves code compactness without sacrificing readability.
86-86
: Improved code compactness for method chainsSeveral 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 messagesError 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 extractionThe 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 initializationsVariable 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 operationThe 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 matchingThe 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 modulesThe import statement has been restructured for better compactness, which aligns with the project-wide formatting improvements.
46-46
: Simplified Felt hex value initializationThe Felt value is now initialized in a cleaner, single-line format that improves code readability.
59-59
: Compact WaitForTx struct initializationThe struct initialization is now on a single line, making the code more concise while maintaining readability.
85-85
: Streamlined method chains for better readabilityMultiple 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 messagesError 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 patternThe 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 chainThe multi-line method chain for executing transactions has been streamlined into a single line, improving code compactness without changing functionality.
51-51
: Simplified assertion patternThe 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 statementMultiple imports have been consolidated into a single line, which reduces vertical space and improves code readability.
19-19
: Simplified provider method chainThe method chain for retrieving the spec version has been condensed to a single line, making the code more compact.
29-29
: Streamlined assertion message formatThe 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-lineassert_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 condensedassert_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
: CondenseOption
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
UsingFelt::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-linewait_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
Chainingfrom_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-lineassert_result!(actual_fee.amount == ..., format!(...))
remains clear.
69-71
: Fee unit assertion inline
Maintains consistency with otherassert_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-lineassert_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 andformat!
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
andreceiptent_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: condensedCall
struct field
Theto: 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 nestedAccountError::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
Thedeploy_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-lineget_state_update(...)
call into a single statement; error handling is intact.
49-51
: Approved style change: condensed pending-state error mapping
ThePending
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 twoPathBuf::from_str(...)
arguments forget_compiled_contract
have been merged into single lines; functionality remains unchanged.
29-30
: Approved style change: condensed declaration invocation
Thedeclare_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 took_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 thedeclare_contract::get_compiled_contract
,errors::OpenRpcTestGenError
, andutils::wait_for_sent_transaction
imports into one line for consistency.
24-25
: Approved style change: single-line contract compilation paths
CondensedPathBuf::from_str(...)
calls into single lines; behavior is unchanged.
29-30
: Approved style change: declaration call condensed
Thedeclare_v3(...).send().await
chain is now a single line, preserving error handling semantics.
38-39
: Approved style change: single-line block retrieval
Merged theget_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 thedeploy
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
TheWaitForTx
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
Thedeploy_account_v1_from_request(...).await?
call is now inlined; functionality and error handling remain identical.
108-108
: Approved style change: inline block-number fetch
Fetchingblock_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
Theget_block_with_txs(...)
call is inlined; error propagation stays intact.
119-119
: Approved style change: inlined transaction-not-found error
Condensed theok_or_else
error construction for missing transaction into one line, preserving message detail.
152-153
: Approved style change: refined assertion message formatting
Theformat!(...)
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
Theassert_result!(valid_signature, "...")
is now a one-liner, matching the surrounding formatting.
182-183
: Approved style change: condensed signature equality assertion
The comparison and messageformat!(...)
are now on one line; behavior is unchanged.
188-189
: Approved style change: inlined salt assertion
Thecontract_address_salt
equality check and error message are condensed; semantics preserved.
192-193
: Approved style change: condensed max-fee assertion
Themax_fee == DEPLOY_ACCOUNT_MAX_FEE
check and its message are now on one line.
198-202
: Approved style change: condensed nonce assertion
Thenonce
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 readabilityThe error handling has been condensed into a single line, which makes the code more compact while maintaining clarity.
47-47
: Code styling improvementThe
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 chainingMethod chaining has been consolidated into a single line, improving code compactness without sacrificing readability.
80-80
: Consistent error handling formatError handling has been reformatted to maintain consistency with other similar constructs in the file.
124-124
: Streamlined assertion messageThe 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 statementMultiple imports have been combined onto a single line, reducing vertical space and improving code density.
36-36
: Streamlined method chainingMethod 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 formattingThe nested match expression has been reformatted to use fewer lines while preserving logic clarity.
70-76
: Consistent error handling styleError 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 patternMultiple error handling blocks have been reformatted to follow the same pattern, improving code consistency.
101-110
: Standardized position checking and error creationThe 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 accessError handling for accessing collection elements has been formatted consistently with other similar operations in the file.
138-142
: Streamlined assertion messagesAssertion 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 valuesError 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 statementImport statements have been combined onto a single line, maintaining a consistent style with other files in the codebase.
25-26
: Streamlined path constructionPath construction with
PathBuf::from_str
has been consolidated into single lines, making the code more compact.
43-43
: Improved method chaining and constant initializationBoth 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 formattingProvider 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 returnsConditional expressions and error returns have been formatted consistently throughout the file, making the code easier to follow.
107-113
: Concise assertion messagesFormatted 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 valuesError 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 handlingBlock 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 statementsImport 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 formatMethod 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 handlingError 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 thesyncing()
call.
This line simply awaits the provider’ssyncing()
response, preserving existing logic.
31-32
: Fetching block hash and number is correct.
The single‐line chain to retrieveblock_hash_and_number()
still performs the same checks and unwrapping.
71-73
: Pattern match onMaybePendingBlockWithTxs
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 fortransfer_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.
Combiningget_compiled_contract
,OpenRpcTestGenError
, andwait_for_sent_transaction
into a single line improves brevity without impacting clarity.
27-28
: Approve inlinedPathBuf::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 fordeclare_v2().prepare().await
.
Consolidating the preparation step into one line maintains the same async flow and improves readability.
39-39
: Approve inlineget_declare_request
call.
The one-liner keeps the code concise without altering behavior.
49-49
: Approve inlinesend_from_request
invocation.
Condensing the send call into a single line retains functionality and declutters the code.
65-65
: Approve inlineblock_hash_and_number
call.
Fetchingblock_hash
in one line is clear and functionally identical.
68-69
: Approve inlineget_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 refactoredok_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 theformat!
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 theassert_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 inlinedPathBuf::from_str
calls for contract paths.
Keeping both conversions in one expression maintains error propagation and reduces height.
42-43
: Approve single-lineContractFactory::new
instantiation.
Condensing construction with its parameters improves code compactness.
49-49
: Approve inlinedeploy_v3(...).send().await
call.
Merging the deploy chain into one line retains async semantics and clarity.
66-67
: Approve one-lineif let Some(...)
extraction.
The formattedif let
block reads clearly and preserves logic.
70-70
: Approve inlineErr(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 compactformat!
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 initialget_storage_at(...).await?
call.
Combining provider method and await into one line improves brevity.
59-59
: Approve inlineexecute_v3(...).send().await
invocation.
The one-line chain is clear and functionally unchanged.
86-86
: Approve inline updatedget_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 condensedformat!
retains clarity and consistency.
116-116
: Approve formattedprintln!
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 forTestSuiteFailure
in OpenRpc block.
Reformatting theif let
into a single multi-line pattern improves readability without logic changes.
65-68
: Approve compact pattern match forTestSuiteFailure
in Katana block.
Consistent collapse of the error branch aligns with the refactoring goals.
90-93
: Approve compact pattern match forTestSuiteFailure
in KatanaNoMining block.
The one-line destructuring style is applied uniformly.
116-119
: Approve compact pattern match forTestSuiteFailure
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 forTestSuiteFailure
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 inlineexecute_v1(...).send().await
invocation.
The one-liner is clear and retains the asynchronous execution flow.
38-38
: Approve inlineblock_hash_and_number().await?.block_number
fetch.
Condensing this retrieval into one line is readable and effective.
40-41
: Approve inlineget_block_with_txs(...).await
call.
Combining the provider call into fewer lines matches the style of similar blocks.
48-48
: Approve one-lineok_or_else
for transaction-not-found in block lookup.
The concise closure is consistent with other test cases.
55-55
: Approve one-lineok_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
TheAccountError::Signing
branch has been condensed into a single-lineErr(RunnerError::AccountFailure(...))
construction, preserving the original logic.
75-78
: Approve provider error branch formatting
Similar consolidation in theProviderError::Other
branch for improved readability; logic remains identical.
94-100
: Approve factory creation & deployment formatting
TheContractFactory::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 onTxnReceipt::Invoke
has been simplified to a conciseif let
expression for event extraction; behavior is unchanged.
152-156
: Approve mint call formatting
Construction of themint
call struct is now a single-lineCall { ... }
block—semantics preserved.
170-175
: Approve outside-execution calldata preparation formatting
Theprepare_outside_execution(...)
invocation has been merged into a concise single-line call, preserving functional behavior.
180-183
: Approve call-to-executable-account formatting
TheCall
struct forexecute_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 withinget_balance
andfelts_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 subsequentwait_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
ThePathBuf::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-linefactory.deploy_v3(...).send().await?
; semantic behavior is unchanged.
95-99
: Approveget_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 ofcontract_leaves_data.first()
is now more concise; error handling remains intact.
121-124
: Approve Merkle tree proof computation formatting
The calls tocompute_expected_child_for_contract_proof
andverify_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-linePathBuf::from_str
invocations into single-line calls; functionality unchanged.
82-90
: Approve private key derivation formatting
TheSigningKey::from_secret_scalar(...)
assignment is now inline for clarity, with no change to logic.
94-101
: Approve declare_v3 branch formatting
The account declarationmatch
arms, includingwait_for_sent_transaction_katana
, are now condensed and maintain identical logic.
135-142
: Approve account creation & deploy-call formatting
Thecreate_account
call and the subsequentCall
struct definition for deployment are reformatted for compactness; semantics preserved.
193-195
: Approve random account collections formatting
TheRandomSingleOwnerAccount
wrappers for paymaster and executable accounts are now one-line struct initializations.
196-202
: Approve sample contract compilation formatting
Secondget_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
Simplifiedmatch
onTxnReceipt
variants into inline style, with no change to logic.
390-405
: Approve transaction wait loop formatting
The logging and retry loop inwait_for_sent_transaction_katana
is now formatted with fewer blank lines; semantics preserved.
474-478
: Approve continuation token parsing formatting
TheContinuationToken::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
Thestarknet_types_rpc
import group has been consolidated into one line; semantics unchanged.
49-52
: Approve invoke request and submission formatting
Combinedverify_invoke_v1_signature
andadd_invoke_transaction(...)
chains into concise inline calls without altering behavior.Also applies to: 57-58
67-69
: Approve hash assertion formatting
Reshaped theassert_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 andget_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-linePathBuf::from_str
calls are now inlined into single statements; functionality unchanged.
82-90
: Approve private key derivation formatting
TheSigningKey::from_secret_scalar(...)
assignment has been inlined for clarity, without affecting logic.
94-101
: Approve declare_v3 block formatting
Thepaymaster_account.declare_v3(...)
match arms, including mining waits, are now condensed while preserving all behaviors.
135-142
: Approve account creation & deploy-call formatting
Thecreate_account
call andCall
struct initialization for deploying the account are now more compact, semantics intact.
150-155
: Approve transaction execution & wait formatting
Reformatted theexecute_v3
send and subsequentwait_for_sent_transaction_katana
into single-line chains with no semantic change.
193-195
: Approve random account wrappers formatting
CreatedRandomSingleOwnerAccount
instances for both account types in one-line struct constructors; behavior preserved.
196-202
: Approve sample contract compilation formatting
The secondget_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 forTxnReceipt
variants into inline style, with no functional changes.
390-405
: Approve transaction wait loop formatting
Logging and retry mechanics inwait_for_sent_transaction_katana
are now minimal-line loops; semantics remain identical.
474-478
: Approve continuation token parsing formatting
The hex-parsing steps inContinuationToken::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:
- Successful declaration handling
- Handling of "already declared" errors in different error types
- 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
let receipts: Vec<Receipt> = | ||
convert_receipts(transaction_receipts.clone()).into_iter().map(|receipt| receipt.into()).collect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 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.
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(); |
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")?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 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?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 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?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 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()))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 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()))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 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(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 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.
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) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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) | |
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 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)
- name: Check feature combinations | ||
run: | | ||
cargo cargo hack test --feature-powerset --no-dev-deps | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
- 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 |
run: | ||
cargo fmt -- --check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 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)
workflow_dispatch: | ||
workflow_call: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 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.
workflow_dispatch: | |
workflow_call: | |
on: | |
workflow_dispatch: {} | |
workflow_call: {} |
- name: Install dependencies | ||
run: npm install | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Optimize dependency installation.
For more reliable and faster CI runs:
- Use
npm ci
instead ofnpm install
to respect the lockfile. - Cache
node_modules
withactions/cache
keyed offpackage-lock.json
.
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "22" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 andworkflow_call
checks from the previous comment to:
.github/workflows/task-lint-prettier.yaml
(lines 18–19).github/workflows/task-build.yaml
(lines 23–24)
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/github-workflow.json | ||
name: Workflow - Pull Request Main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Add a trailing newline at end of file.
POSIX conventions recommend ending text files with a newline to avoid parser warnings.
lint-cargo: | ||
if: github.event.pull_request.draft == false | ||
uses: ./.github/workflows/task-lint-cargo.yaml | ||
secrets: inherit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 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:
- Exists at the given path.
- Declares
on: workflow_call
at the top. - Exposes any required
inputs
orsecrets
.
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
on: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ 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.
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… |
build: | ||
needs: lint-prettier | ||
uses: ./.github/workflows/task-build.yaml | ||
secrets: inherit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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 |
Descripton to come...
Summary by CodeRabbit