-
Notifications
You must be signed in to change notification settings - Fork 32
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
read_provider_test
migrate to devnet
#384
read_provider_test
migrate to devnet
#384
Conversation
WalkthroughThis update enhances the codebase with significant improvements, including version upgrades for Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
f035c99
to
bcf249e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
Outside diff range and nitpick comments (2)
melos.yaml (1)
59-59
: Ensure the new--state-archive-capacity full
flag is appropriate for your use case.The addition of
--state-archive-capacity full
to bothdevnet:start
anddevnet:start:dump
commands suggests that you are opting to retain a full state archive for the devnet. This can have implications on performance and storage, especially in continuous integration environments or when running multiple instances.Also applies to: 60-60, 64-64
packages/starknet/lib/src/account.dart (1)
[!TIP]
Codebase VerificationLine range hint
18-33
: Review error handling and fallback logic ingetNonce
.The
getNonce
method inaccount.dart
does not contain explicit error handling or fallback logic. This omission could lead to unhandled exceptions if the primary request fails.
- File:
packages/starknet/lib/src/account.dart
- Lines: 186-192
Action Required:
- Add proper error handling and fallback mechanisms to the
getNonce
method to ensure robustness.Analysis chain
Line range hint
18-33
: Review error handling and fallback logic ingetNonce
.Ensure that the error handling and fallback logic in the
getNonce
method are robust and correctly implemented. The method uses a nested async call which should be carefully managed to avoid potential deadlocks or unhandled exceptions.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify correct implementation of error handling in `getNonce`. # Test: Check for the presence of error handling code. Expect: Specific error handling patterns. rg --type dart $'error: (' packages/starknet/lib/src/account.dartLength of output: 133
Script:
#!/bin/bash # Description: Verify correct implementation of error handling in `getNonce`. # Test: Check for the presence of error handling code. Expect: Specific error handling patterns. rg --type dart 'catch|on|try' packages/starknet/lib/src/account.dartLength of output: 9685
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (19)
- .env.devnet (1 hunks)
- .gitignore (1 hunks)
- .starkli/account_for_devnet_setup.json (1 hunks)
- .tool-versions (1 hunks)
- contracts/v2.6.2/src/hello.cairo (2 hunks)
- contracts/v2.6.2/target/dev/starknet_dart_hello.contract_class.json (1 hunks)
- melos.yaml (2 hunks)
- melos_monorepo.iml (1 hunks)
- packages/starknet/lib/src/account.dart (1 hunks)
- packages/starknet_provider/.tool-versions (1 hunks)
- packages/starknet_provider/lib/src/model/estimate_fee.dart (1 hunks)
- packages/starknet_provider/lib/src/model/estimate_fee.freezed.dart (1 hunks)
- packages/starknet_provider/lib/src/model/estimate_fee.g.dart (2 hunks)
- packages/starknet_provider/lib/src/model/get_transaction_receipt.dart (7 hunks)
- packages/starknet_provider/lib/src/model/get_transaction_receipt.freezed.dart (183 hunks)
- packages/starknet_provider/lib/src/model/get_transaction_receipt.g.dart (7 hunks)
- packages/starknet_provider/lib/src/model/json_rpc_api_error.dart (2 hunks)
- packages/starknet_provider/lib/src/model/json_rpc_api_error.g.dart (2 hunks)
- packages/starknet_provider/test/integration/read_provider_test.dart (35 hunks)
Files not summarized due to errors (2)
- contracts/v2.6.2/target/dev/starknet_dart_hello.contract_class.json: Error: Message exceeds token limit
- packages/starknet_provider/lib/src/model/get_transaction_receipt.freezed.dart: Error: Message exceeds token limit
Files skipped from review due to trivial changes (4)
- .gitignore
- .tool-versions
- melos_monorepo.iml
- packages/starknet_provider/.tool-versions
Additional context used
Gitleaks
.starkli/account_for_devnet_setup.json
6-6: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key)
.env.devnet
15-15: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key)
16-16: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key)
yamllint
melos.yaml
[error] 90-90: trailing spaces (trailing-spaces)
[error] 92-92: trailing spaces (trailing-spaces)
Additional comments not posted (34)
contracts/v2.6.2/src/hello.cairo (1)
5-5
: New Method Addition:sum
The addition of the
sum
method to both the interface and the contract module is correctly implemented and follows the StarkNet Cairo programming conventions.Also applies to: 30-32
packages/starknet_provider/lib/src/model/json_rpc_api_error.g.dart (1)
24-24
: Updated Serialization for New Error CodesThe updates to include new error codes (
DEVNET_WILDCARD_ERROR
andMETHOD_NOT_FOUND
) in the serialization map are correctly implemented.Also applies to: 54-54
packages/starknet_provider/lib/src/model/json_rpc_api_error.dart (1)
21-22
: Addition of New Error CodesThe addition of new error codes (
DEVNET_WILDCARD_ERROR
andMETHOD_NOT_FOUND
) to theJsonRpcApiErrorCode
enum is correctly annotated and follows Dart best practices.Also applies to: 81-82
melos.yaml (1)
71-71
: Newmelos contracts:invoke
command added.This addition aligns with the PR's aim to enhance smart contract interactions by providing a dedicated command for invoking transactions. This should streamline testing and deployment processes.
packages/starknet_provider/lib/src/model/estimate_fee.dart (2)
25-45
: AddedSimulationFlag
enum and its JSON serialization.The introduction of the
SimulationFlag
enum with optionsSKIP_VALIDATE
andSKIP_FEE_CHARGE
enhances the flexibility in simulating transactions. The JSON serialization methods are correctly implemented. Ensure that all potential uses of these flags are well-documented to avoid misuse.
52-56
: Addition ofsimulation_flags
toEstimateFeeRequest
.The
simulation_flags
field has been added to theEstimateFeeRequest
class. This allows for more granular control over transaction fee estimation, which is particularly useful in development and testing environments where fee constraints might be simulated differently.
[APROVED]packages/starknet_provider/lib/src/model/get_transaction_receipt.dart (2)
23-31
: IntroducedActualFee
class for detailed fee information.The
ActualFee
class has been introduced to encapsulate fee details withamount
andunit
. This is a positive change as it provides more detailed information about transaction fees, which can be crucial for auditing and debugging.
38-38
: Use ofActualFee
in various transaction receipt models.The integration of the
ActualFee
class across different transaction receipt models (likeInvokeTxnReceipt
,DeclareTxnReceipt
, etc.) standardizes how fee information is presented and handled. This should improve the consistency and reliability of fee data across different transaction types.Also applies to: 51-51, 64-64, 77-77, 91-91, 105-105, 116-116
packages/starknet_provider/lib/src/model/estimate_fee.g.dart (2)
15-17
: Serialization and deserialization forsimulation_flags
.The code correctly handles the serialization and deserialization of the
simulation_flags
field in theEstimateFeeRequest
model. This ensures that the new simulation flags are correctly integrated into the JSON data flow.Also applies to: 24-25
58-66
: Added classes forSkipValidate
andSkipFeeCharge
.The addition of
_$$SkipValidateImpl
and_$$SkipFeeChargeImpl
classes for handling the serialization of theSkipValidate
andSkipFeeCharge
flags ensures that these flags are correctly serialized and deserialized. This is crucial for maintaining the integrity of data when these flags are used in API calls.Also applies to: 68-76
packages/starknet_provider/lib/src/model/get_transaction_receipt.g.dart (1)
37-47
: Proper handling ofActualFee
in JSON serialization.The changes to the serialization and deserialization methods ensure that the
ActualFee
class is correctly integrated into the transaction receipts. This is crucial for accurately conveying fee details in API responses.Also applies to: 53-53, 87-87, 121-121, 155-155, 191-191, 227-227, 255-255
contracts/v2.6.2/target/dev/starknet_dart_hello.contract_class.json (1)
1-1
: Check alignment with PR objectives and AI-generated summary.Ensure that the
starknet_dart_hello.contract_class.json
accurately reflects the updates mentioned in the PR objectives and AI-generated summary, particularly the addition of thesum
method and any related changes.Verification successful
The
sum
method has been successfully added to the contract class JSON.
- The
sum
method is present in theuser_func_names
andabi
sections of the JSON file.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the addition of the 'sum' method in the contract class JSON. # Test: Search for 'sum' method in the JSON file. Expect: At least one occurrence. rg --type json $'sum' contracts/v2.6.2/target/dev/starknet_dart_hello.contract_class.jsonLength of output: 16299
packages/starknet/lib/src/account.dart (3)
189-189
: Ensure proper initialization of new fields.The
simulation_flags
field is added to theEstimateFeeRequest
. Ensure this field is properly initialized and used throughout the class where fee estimation occurs.
Line range hint
35-71
: Review transaction signing and fee calculation ingetEstimateMaxFeeForInvokeTx
.Ensure that the transaction signing process and fee calculation in the
getEstimateMaxFeeForInvokeTx
method are correctly implemented. Pay close attention to how different transaction versions are handled and how the fee is calculated based on the transaction details.
Line range hint
73-111
: Review transaction execution logic inexecute
.Ensure that the transaction execution logic in the
execute
method is robust and correctly handles different transaction versions. Check for proper error handling and the correct use of blockchain interaction patterns.packages/starknet_provider/test/integration/read_provider_test.dart (10)
12-12
: Update contract address to match new environment settings.The contract address has been updated to
0x03cdc588f4f1bff66c8a6896e7008cc39c7804d36b16e93792625bd18bffd249
to align with the new devnet version 0.0.7 settings.
20-20
: Update transaction hash to match new environment settings.The transaction hash has been updated to
0x029583643cd8932f1955bf28bfebf4c907b13df1e5c2d202b133cfbf783697a2
to align with changes in the devnet environment.
26-26
: Update transaction hash for deploy account transaction.The deploy account transaction hash has been updated to
0x055ba13c33a12506d2eab8dfbc618a8ce0d247c24959a64ee18fbf393c873b83
to reflect changes in the devnet environment.
45-45
: Update class hash to match new environment settings.The class hash has been updated to
0x061dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f
to reflect the new devnet settings.
47-47
: Update contract address to match new environment settings.The contract address has been updated to
0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691
to align with the new devnet version 0.0.7 settings.
65-65
: Mark test as problematic due to devnet version change.This test is marked with a FIXME comment due to issues caused by the bump in devnet version. It's important to monitor this and resolve it when the devnet issue is fixed.
119-119
: Ensure correct function selector forget_name
.The entry point selector for the
get_name
function is correctly retrieved, ensuring that the test calls the intended function.
139-139
: Update block ID for consistency and correctness.The block ID is set to
BlockId.latest
, which is appropriate for this test as it ensures the function is called against the latest block state.
151-151
: Correct handling of invalid block IDs.This test correctly handles the scenario where an invalid block ID is used, expecting a
BLOCK_NOT_FOUND
error. This is a good practice in test coverage for error handling.
127-127
: Check for correct test expectations.The test expects the result to be
Felt.fromInt(0)
, which should be verified against the expected behavior of theget_name
function to ensure it aligns with the contract's logic.packages/starknet_provider/lib/src/model/estimate_fee.freezed.dart (4)
418-431
: Ensure proper error handling for JSON deserialization inSimulationFlag
.The default case in the switch statement throws a
CheckedFromJsonException
, which is good practice as it helps in identifying the exact cause of the error during the deserialization process. However, consider logging this exception or providing more context in the error message for easier debugging.
434-475
: Review the implementation of mixin_$SimulationFlag
.The mixin uses a lot of boilerplate code generated by the Freezed library, which is typical for union types in Dart. The methods like
when
,maybeWhen
,map
, andmaybeMap
are used to handle different states of the union. This is a standard pattern and looks correct as per Freezed's implementation guidelines.
513-606
: Check the JSON serialization implementation forSkipValidate
.The
SkipValidate
class is correctly annotated with@JsonSerializable
which is essential for the code generation of serialization logic. The$type
defaulting to 'skipValidate' ensures that the correct type discriminator is used in polymorphic serialization scenarios. This is crucial for maintaining the integrity of the JSON structure when dealing with different types of simulation flags.
634-727
: Check the JSON serialization implementation forSkipFeeCharge
.Similar to
SkipValidate
,SkipFeeCharge
is also annotated with@JsonSerializable
and handles its type discriminator correctly. This consistency in handling serialization across different subclasses ofSimulationFlag
is good for maintaining a robust and error-resistant serialization/deserialization logic.packages/starknet_provider/lib/src/model/get_transaction_receipt.freezed.dart (5)
433-435
: Ensure proper JSON deserialization forActualFee
.The method
_$ActualFeeFromJson
correctly delegates the JSON parsing to_ActualFee.fromJson
. This is a standard pattern in Dart for JSON serialization in classes with private constructors.
624-624
: Consistency check forActualFee
usage inwhen
andwhenOrNull
methods.The
ActualFee
type is consistently used across various transaction receipt types in thewhen
andwhenOrNull
methods. This ensures that the type change is propagated correctly throughout the code.Also applies to: 634-634, 644-644, 654-654, 665-665, 676-676, 682-682, 691-691, 701-701, 711-711, 721-721, 732-732, 743-743, 749-749, 758-758, 768-768, 778-778, 788-788, 799-799, 810-810, 816-816
875-875
: Check for consistent use ofActualFee
inTxnReceiptCopyWith
.The
actualFee
property in theTxnReceiptCopyWith
method correctly uses theActualFee
type, ensuring type safety and consistency.
1038-1038
: Proper assignment ofactualFee
inInvokeTxnReceipt
.The
actualFee
property in theInvokeTxnReceipt
class is correctly assigned using theActualFee
type, aligning with the changes in the model.
616-616
: Review ofactualFee
property inTxnReceipt
.The
actualFee
property has been changed to use the newActualFee
class instead of the previousFelt
type. This change should be cross-verified in all usage contexts to ensure compatibility.Verification successful
Verification of
actualFee
property inTxnReceipt
: SuccessfulThe
actualFee
property has been correctly updated to use the newActualFee
class instead of the previousFelt
type across all usage contexts.
- Verified instances in:
packages/starknet_provider/lib/src/model/get_transaction_receipt.g.dart
packages/starknet_provider/lib/src/model/get_transaction_receipt.dart
packages/starknet_provider/lib/src/model/get_transaction_receipt.freezed.dart
packages/starknet_provider/test/integration/read_provider_test.dart
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all usages of `actualFee` to ensure they have been updated to use `ActualFee`. # Test: Search for the property usage. Expect: Only occurrences of the new type. rg --type dart $'actualFee'Length of output: 39912
export STARKNET_PRIVATE_KEY="0x71d7bb07b9a64f6f78ac4c816aff4da9" | ||
export STARKNET_PUBLIC_KEY="0x39d9e6ce352ad4530a0ef5d5a18fd3303c3606a7fa6ac5b620020ad681cc33b" |
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.
Potential Security Risk: API Key Exposure
The private and public keys are exposed in the environment file, which could lead to unauthorized access if not properly secured. Consider using secrets management tools or environment-specific encryption to protect these keys.
Tools
Gitleaks
15-15: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key)
16-16: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key)
run: | | ||
starkli call $HELLO_CONTRACT_ADDRESS get_name | ||
starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0 |
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.
Remove trailing spaces to clean up the code.
Trailing spaces on lines 90 and 92 should be removed to adhere to good coding practices.
- starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0
+ starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0
-
+
Also applies to: 92-92
Tools
yamllint
[error] 90-90: trailing spaces (trailing-spaces)
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- packages/starknet_provider/lib/src/model/estimate_fee.dart (1 hunks)
- packages/starknet_provider/lib/src/model/get_transaction_receipt.dart (7 hunks)
- packages/starknet_provider/lib/src/model/json_rpc_api_error.dart (2 hunks)
- packages/starknet_provider/test/integration/read_provider_test.dart (34 hunks)
Files skipped from review as they are similar to previous changes (4)
- packages/starknet_provider/lib/src/model/estimate_fee.dart
- packages/starknet_provider/lib/src/model/get_transaction_receipt.dart
- packages/starknet_provider/lib/src/model/json_rpc_api_error.dart
- packages/starknet_provider/test/integration/read_provider_test.dart
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: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- assets/devnet-dump.json (1 hunks)
- melos.yaml (2 hunks)
- packages/starknet_provider/test/integration/read_provider_test.dart (34 hunks)
- packages/wallet_kit/lib/services/token_service.dart (1 hunks)
- packages/wallet_kit/lib/wallet_screens/password_screen.dart (1 hunks)
Files not summarized due to errors (1)
- assets/devnet-dump.json: Error: Message exceeds token limit
Files skipped from review due to trivial changes (2)
- packages/wallet_kit/lib/services/token_service.dart
- packages/wallet_kit/lib/wallet_screens/password_screen.dart
Files skipped from review as they are similar to previous changes (1)
- packages/starknet_provider/test/integration/read_provider_test.dart
Additional context used
yamllint
melos.yaml
[error] 90-90: trailing spaces
(trailing-spaces)
[error] 92-92: trailing spaces
(trailing-spaces)
Additional comments not posted (4)
melos.yaml (3)
59-59
: Verify the command options for starting devnet.Ensure that the options
--seed 0
,--dump-path $DEVNET_DUMP_PATH
,--state-archive-capacity full
, and--port 3030
are necessary and appropriate for your setup.
61-64
: Verify the command options for starting devnet and handling dumps.Ensure that the options
--seed 0
,--dump-path $DEVNET_DUMP_PATH
,--state-archive-capacity full
,--dump-on exit
, and--port 3030
are necessary and appropriate for your setup. Additionally, confirm that therm $DEVNET_DUMP_PATH
command is safe and won't cause unintended data loss.
71-71
: Verify the necessity of thecontracts:invoke
command.Ensure that invoking contracts is necessary and appropriate for your setup.
assets/devnet-dump.json (1)
1-1
: Verify the accuracy and necessity of the transaction details.Ensure that the transaction details in the JSON array are accurate and necessary for your setup. Pay special attention to the values of fields like
max_fee
,version
,signature
,nonce
,contract_class
,sender_address
, andcompiled_class_hash
.
melos.yaml
Outdated
|
||
contracts:invoke: | ||
description: creating invoke tx for tests with hash 0x03b2911796e0024f9e23d7337997538058eca267d5ddaa582d482cbe1fb64897 and deploy_account tx with hash 0x055ba13c33a12506d2eab8dfbc618a8ce0d247c24959a64ee18fbf393c873b83 | ||
run: | | ||
starkli call $HELLO_CONTRACT_ADDRESS get_name | ||
starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0 | ||
# should create tx hash 0x029583643cd8932f1955bf28bfebf4c907b13df1e5c2d202b133cfbf783697a2 | ||
|
||
yes | cp .starkli/account_for_devnet_setup.json .starkli/account_1.json | ||
starkli invoke 0x49D36570D4E46F48E99674BD3FCC84644DDD6B96F7C741B1562B82F9E004DC7 transfer 0x016a0d7df981d681537dc2ce648722ff1d1c2cbe59412b492d35bac69825f104 0x100000000000000000 0x0 | ||
echo | starkli account deploy .starkli/account_1.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.
Verify the commands for creating invoke transactions and deploying accounts.
Ensure that the commands for creating invoke transactions and deploying accounts are necessary and appropriate for your setup.
Additionally, remove the trailing spaces on lines 90 and 92.
- starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0
+ starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0
-
+
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.
contracts:invoke: | |
description: creating invoke tx for tests with hash 0x03b2911796e0024f9e23d7337997538058eca267d5ddaa582d482cbe1fb64897 and deploy_account tx with hash 0x055ba13c33a12506d2eab8dfbc618a8ce0d247c24959a64ee18fbf393c873b83 | |
run: | | |
starkli call $HELLO_CONTRACT_ADDRESS get_name | |
starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0 | |
# should create tx hash 0x029583643cd8932f1955bf28bfebf4c907b13df1e5c2d202b133cfbf783697a2 | |
yes | cp .starkli/account_for_devnet_setup.json .starkli/account_1.json | |
starkli invoke 0x49D36570D4E46F48E99674BD3FCC84644DDD6B96F7C741B1562B82F9E004DC7 transfer 0x016a0d7df981d681537dc2ce648722ff1d1c2cbe59412b492d35bac69825f104 0x100000000000000000 0x0 | |
echo | starkli account deploy .starkli/account_1.json | |
contracts:invoke: | |
description: creating invoke tx for tests with hash 0x03b2911796e0024f9e23d7337997538058eca267d5ddaa582d482cbe1fb64897 and deploy_account tx with hash 0x055ba13c33a12506d2eab8dfbc618a8ce0d247c24959a64ee18fbf393c873b83 | |
run: | | |
starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0 | |
# should create tx hash 0x029583643cd8932f1955bf28bfebf4c907b13df1e5c2d202b133cfbf783697a2 | |
yes | cp .starkli/account_for_devnet_setup.json .starkli/account_1.json | |
starkli invoke 0x49D36570D4E46F48E99674BD3FCC84644DDD6B96F7C741B1562B82F9E004DC7 transfer 0x016a0d7df981d681537dc2ce648722ff1d1c2cbe59412b492d35bac69825f104 0x100000000000000000 0x0 | |
echo | starkli account deploy .starkli/account_1.json |
Tools
yamllint
[error] 90-90: trailing spaces
(trailing-spaces)
[error] 92-92: trailing spaces
(trailing-spaces)
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: 3
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/starknet_provider/test/integration/read_provider_test.dart (34 hunks)
Additional comments not posted (7)
packages/starknet_provider/test/integration/read_provider_test.dart (7)
12-12
: Verify the new balance contract address.Ensure that the new balance contract address
0x03cdc588f4f1bff66c8a6896e7008cc39c7804d36b16e93792625bd18bffd249
is correct and valid.
18-18
: Verify the new block number.Ensure that the new block number
3
is correct and valid.
20-20
: Verify the new invoke transaction hash.Ensure that the new invoke transaction hash
0x029583643cd8932f1955bf28bfebf4c907b13df1e5c2d202b133cfbf783697a2
is correct and valid.
26-26
: Verify the new deploy account transaction hash.Ensure that the new deploy account transaction hash
0x055ba13c33a12506d2eab8dfbc618a8ce0d247c24959a64ee18fbf393c873b83
is correct and valid.
45-45
: Verify the new class hash for version 1.Ensure that the new class hash
0x061dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f
is correct and valid.
47-47
: Verify the new contract address for version 1.Ensure that the new contract address
0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691
is correct and valid.
119-119
: Verify the new entry point selector.Ensure that the new entry point selector
getSelectorByName('get_name')
is correct and valid.
Felt declareTransactionHash = Felt.fromHexString( | ||
'0x1363b8d4b4ef14e872e78b2fc65cc939b2a7a535b76f9146dbd6cd259119e44'); | ||
'0x4d7ba5427d4066c8db851e7662ecce860a94a804c6735677dfd29f1d0103fda'); |
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 transaction hash length.
The transaction hash 0x4d7ba5427d4066c8db851e7662ecce860a94a804c6735677dfd29f1d0103fda
is missing one character. Transaction hashes should be 64 hex characters long.
- '0x4d7ba5427d4066c8db851e7662ecce860a94a804c6735677dfd29f1d0103fda'
+ '0x04d7ba5427d4066c8db851e7662ecce860a94a804c6735677dfd29f1d0103fda' // Assuming the missing character is '0'
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.
'0x4d7ba5427d4066c8db851e7662ecce860a94a804c6735677dfd29f1d0103fda'); | |
'0x04d7ba5427d4066c8db851e7662ecce860a94a804c6735677dfd29f1d0103fda'); |
@@ -37,14 +37,14 @@ void main() { | |||
'0x04e76f8708774c8162fb4da7abefb3cae94cc51cf3f9b40e0d44f24aabf8a521'); | |||
BlockId blockIdForTheGivenContractAddress = BlockId.blockHash( | |||
Felt.fromHexString( | |||
'0x6a39eb5c273a221b99b08323bed9ec1ef1bc3d232a668c941b23cca3bf1164a')); | |||
'0x51d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02')); |
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 block hash length for contract address block ID.
The block hash used to create a BlockId
from a block hash is missing one character. It should be 64 hex characters long.
- '0x51d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02'
+ '0x051d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02' // Assuming the missing character is '0'
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.
'0x51d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02')); | |
'0x051d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02')); |
|
||
Felt invalidHexString = Felt.fromHexString( | ||
'0x0000000000000000000000000000000000000000000000000000000000000000'); | ||
Felt blockHash = Felt.fromHexString( | ||
'0x7ed2fde2b82d70368db9ae0a53e88bd9a50e50a202f20e7ff07d0c18338d8c6'); | ||
int blockNumber = 13334; | ||
'0x51d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02'); |
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 block hash length.
The block hash 0x51d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02
is missing one character. Block hashes should be 64 hex characters long.
- '0x51d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02'
+ '0x051d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02' // Assuming the missing character is '0'
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.
'0x51d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02'); | |
'0x051d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02'); |
66b57fa
to
09cc352
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Outside diff range, codebase verification and nitpick comments (2)
melos.yaml (1)
86-95
: Remove trailing spaces to clean up the code.Trailing spaces on lines 90 and 92 should be removed to adhere to good coding practices.
- starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0 + starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0 - +Tools
yamllint
[error] 90-90: trailing spaces
(trailing-spaces)
[error] 92-92: trailing spaces
(trailing-spaces)
packages/starknet_provider/lib/src/model/estimate_fee.dart (1)
25-28
: Clarify the comment for better understanding.The comment should be more explicit about the purpose of the
SimulationFlag
and how it affects the transaction simulation.-/// By default, the sequencer behavior is replicated locally (enough funds are expected to be in the -/// account, and fee will be deducted from the balance before the simulation of the next -/// transaction). To skip the fee charge, use the SKIP_FEE_CHARGE flag. +/// By default, the sequencer behavior is replicated locally, meaning that enough funds are expected +/// to be in the account, and the fee will be deducted from the balance before simulating the next +/// transaction. To skip the fee charge, use the `SKIP_FEE_CHARGE` flag.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (23)
- .env.devnet (1 hunks)
- .github/workflows/ci.yaml (1 hunks)
- .gitignore (1 hunks)
- .starkli/account_for_devnet_setup.json (1 hunks)
- .tool-versions (1 hunks)
- assets/devnet-dump.json (1 hunks)
- contracts/v2.6.2/src/hello.cairo (2 hunks)
- contracts/v2.6.2/target/dev/starknet_dart_hello.contract_class.json (1 hunks)
- melos.yaml (2 hunks)
- melos_monorepo.iml (1 hunks)
- packages/starknet/lib/src/account.dart (1 hunks)
- packages/starknet_provider/.tool-versions (1 hunks)
- packages/starknet_provider/lib/src/model/estimate_fee.dart (1 hunks)
- packages/starknet_provider/lib/src/model/estimate_fee.freezed.dart (1 hunks)
- packages/starknet_provider/lib/src/model/estimate_fee.g.dart (2 hunks)
- packages/starknet_provider/lib/src/model/get_transaction_receipt.dart (7 hunks)
- packages/starknet_provider/lib/src/model/get_transaction_receipt.freezed.dart (183 hunks)
- packages/starknet_provider/lib/src/model/get_transaction_receipt.g.dart (7 hunks)
- packages/starknet_provider/lib/src/model/json_rpc_api_error.dart (2 hunks)
- packages/starknet_provider/lib/src/model/json_rpc_api_error.g.dart (2 hunks)
- packages/starknet_provider/test/integration/read_provider_test.dart (34 hunks)
- packages/wallet_kit/lib/services/token_service.dart (1 hunks)
- packages/wallet_kit/lib/wallet_screens/password_screen.dart (1 hunks)
Files not summarized due to errors (3)
- assets/devnet-dump.json: Error: Message exceeds token limit
- contracts/v2.6.2/target/dev/starknet_dart_hello.contract_class.json: Error: Message exceeds token limit
- packages/starknet_provider/lib/src/model/get_transaction_receipt.freezed.dart: Error: Message exceeds token limit
Files skipped from review due to trivial changes (1)
- .github/workflows/ci.yaml
Files skipped from review as they are similar to previous changes (14)
- .gitignore
- .tool-versions
- contracts/v2.6.2/src/hello.cairo
- melos_monorepo.iml
- packages/starknet/lib/src/account.dart
- packages/starknet_provider/.tool-versions
- packages/starknet_provider/lib/src/model/estimate_fee.freezed.dart
- packages/starknet_provider/lib/src/model/estimate_fee.g.dart
- packages/starknet_provider/lib/src/model/get_transaction_receipt.g.dart
- packages/starknet_provider/lib/src/model/json_rpc_api_error.dart
- packages/starknet_provider/lib/src/model/json_rpc_api_error.g.dart
- packages/starknet_provider/test/integration/read_provider_test.dart
- packages/wallet_kit/lib/services/token_service.dart
- packages/wallet_kit/lib/wallet_screens/password_screen.dart
Additional context used
Gitleaks
.starkli/account_for_devnet_setup.json
6-6: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
.env.devnet
15-15: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
16-16: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
yamllint
melos.yaml
[error] 90-90: trailing spaces
(trailing-spaces)
[error] 92-92: trailing spaces
(trailing-spaces)
Additional comments not posted (20)
.env.devnet (1)
18-19
: LGTM!The changes to
HELLO_CLASS_HASH
andHELLO_CONTRACT_ADDRESS
are straightforward updates to the new values.melos.yaml (2)
59-59
: Verify the command for starting the devnet.Ensure that the
starknet-devnet
command with the--state-archive-capacity full
flag is necessary and appropriate for your setup.
63-63
: Verify the command for starting the devnet with dump on exit.Ensure that the
starknet-devnet
command with the--state-archive-capacity full
and--dump-on exit
flags is necessary and appropriate for your setup.packages/starknet_provider/lib/src/model/estimate_fee.dart (2)
30-46
: LGTM!The
SimulationFlag
class and its methods are correctly implemented.
52-56
: LGTM!The
EstimateFeeRequest
class and its methods are correctly implemented.packages/starknet_provider/lib/src/model/get_transaction_receipt.dart (2)
23-32
: LGTM! But verify the usage of theActualFee
class.The code changes are approved.
However, ensure that the
amount
andunit
fields are used correctly elsewhere in the codebase.Verification successful
LGTM! The usage of the
ActualFee
class and its fieldsamount
andunit
is correct.The code changes are approved.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the `ActualFee` class in the codebase. # Test: Search for the `ActualFee` class usage. Expect: Correct usage of `amount` and `unit` fields. rg --type dart -A 5 $'ActualFee'Length of output: 166764
Line range hint
33-119
:
LGTM! But verify the usage of theactualFee
field in each factory constructor.The code changes are approved.
However, ensure that the
actualFee
field is used correctly in each factory constructor.Verification successful
The
actualFee
field is used correctly in each factory constructor of theTxnReceipt
class.The verification confirms that the
actualFee
field is consistently present and correctly used across all factory constructors in theTxnReceipt
class.
- The
actualFee
field is included in the constructor parameters.- The
actualFee
field is correctly handled in the JSON serialization/deserialization methods.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the `actualFee` field in each factory constructor of the `TxnReceipt` class. # Test: Search for the `actualFee` field usage in the `TxnReceipt` class. Expect: Correct usage in each factory constructor. rg --type dart -A 5 $'TxnReceipt'Length of output: 254861
assets/devnet-dump.json (5)
1-1
: LGTM! But verify the field values in thecontract_class
object.The JSON structure is approved.
However, ensure that the field values are accurate and consistent with the rest of the codebase.
Verification successful
Field values in the
contract_class
object are accurate and consistent.The
contract_class
object inassets/devnet-dump.json
has been verified againstcontracts/v2.6.2/target/dev/starknet_dart_hello.contract_class.json
and found to be accurate and consistent.
assets/devnet-dump.json
contracts/v2.6.2/target/dev/starknet_dart_hello.contract_class.json
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the field values in the `contract_class` object. # Test: Search for the `contract_class` object usage. Expect: Accurate and consistent field values. rg --type json -A 5 $'contract_class'Length of output: 31985
1-1
: LGTM! But verify the field values in theentry_points_by_type
object.The JSON structure is approved.
However, ensure that the field values are accurate and consistent with the rest of the codebase.
Verification successful
Field values in the
entry_points_by_type
object are accurate and consistent.
- The
entry_points_by_type
object inassets/devnet-dump.json
matches the structure and values found incontracts/v2.6.2/target/dev/starknet_dart_hello.contract_class.json
.- The field values for
EXTERNAL
,L1_HANDLER
, andCONSTRUCTOR
are consistent across both JSON files.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the field values in the `entry_points_by_type` object. # Test: Search for the `entry_points_by_type` object usage. Expect: Accurate and consistent field values. rg --type json -A 5 $'entry_points_by_type'Length of output: 31695
1-1
: LGTM! But verify the field values in theAddDeclareTransaction
object.The JSON structure is approved.
However, ensure that the field values are accurate and consistent with the rest of the codebase.
1-1
: LGTM! But verify the field values in theAddDeployAccountTransaction
object.The JSON structure is approved.
However, ensure that the field values are accurate and consistent with the rest of the codebase.
1-1
: LGTM! But verify the field values in theAddInvokeTransaction
object.The JSON structure is approved.
However, ensure that the field values are accurate and consistent with the rest of the codebase.
contracts/v2.6.2/target/dev/starknet_dart_hello.contract_class.json (5)
1-1
: LGTM! But verify the array values in thesierra_program
object.The JSON structure is approved.
However, ensure that the array values are accurate and consistent with the rest of the codebase.
Verification successful
Array values in the
sierra_program
object are verified and consistent across the codebase.The array values in the
sierra_program
object are accurate and consistent with the rest of the codebase.
contracts/v2.6.2/target/dev/starknet_dart_hello.contract_class.json
assets/devnet-dump.json
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the array values in the `sierra_program` object. # Test: Search for the `sierra_program` object usage. Expect: Accurate and consistent array values. rg --type json -A 5 $'sierra_program'Length of output: 31689
1-1
: LGTM! But verify the field values in theentry_points_by_type
object.The JSON structure is approved.
However, ensure that the field values are accurate and consistent with the rest of the codebase.
Verification successful
LGTM! But verify the field values in the
entry_points_by_type
object.The JSON structure is approved.
However, ensure that the field values are accurate and consistent with the rest of the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the field values in the `entry_points_by_type` object. # Test: Search for the `entry_points_by_type` object usage. Expect: Accurate and consistent field values. rg --type json -A 5 $'entry_points_by_type'Length of output: 31695
1-1
: LGTM! But verify the version string in thecontract_class_version
object.The JSON structure is approved.
However, ensure that the version string is accurate and consistent with the rest of the codebase.
Verification successful
The version string in the
contract_class_version
object is accurate and consistent.The version string "0.1.0" is used consistently across different JSON files in the codebase.
contracts/v2.6.2/target/dev/starknet_dart_hello.contract_class.json
assets/devnet-dump.json
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the version string in the `contract_class_version` object. # Test: Search for the `contract_class_version` object usage. Expect: Accurate and consistent version string. rg --type json -A 5 $'contract_class_version'Length of output: 31697
1-1
: LGTM! But verify the field values in thesierra_program_debug_info
object.The JSON structure is approved.
However, ensure that the field values are accurate and consistent with the rest of the codebase.
1-1
: LGTM! But verify the ABI definitions in theabi
object.The JSON structure is approved.
However, ensure that the ABI definitions are accurate and consistent with the rest of the codebase.
Verification successful
Verify the ABI definitions in the
abi
object.The JSON structure is approved. However, ensure that the ABI definitions are accurate and consistent with the actual function implementations in the codebase.
Verify the ABI definitions in the
abi
object.The JSON structure is approved. The ABI definitions in the
starknet_dart_hello.contract_class.json
file are consistent with the function implementations found in thecontracts/v2.6.2/src/hello.cairo
file.
get_name
function:
- ABI:
{"name":"get_name","inputs":[],"outputs":[{"type":"core::felt252"}],"state_mutability":"view"}
- Implementation:
fn get_name(self: @ContractState) -> felt252
set_name
function:
- ABI:
{"name":"set_name","inputs":[{"name":"name","type":"core::felt252"}],"outputs":[],"state_mutability":"external"}
- Implementation:
fn set_name(ref self: ContractState, name: felt252)
sum
function:
- ABI:
{"name":"sum","inputs":[{"name":"a","type":"core::felt252"},{"name":"b","type":"core::felt252"}],"outputs":[{"type":"core::felt252"}],"state_mutability":"external"}
- Implementation:
fn sum(ref self: ContractState, a: felt252, b: felt252) -> felt252
Constructor:
- ABI:
{"name":"constructor","inputs":[{"name":"name","type":"core::felt252"}]}
- Implementation:
fn constructor(ref self: ContractState, name: felt252)
The ABI definitions are accurate and consistent with the actual function implementations in the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the ABI definitions in the `abi` object. # Test: Search for the `abi` object usage. Expect: Accurate and consistent ABI definitions. rg --type json -A 5 $'abi'Length of output: 38617
Script:
#!/bin/bash # Description: Verify the ABI definitions in the `abi` object by checking the actual function implementations. # Search for the implementation of `get_name` function. ast-grep --lang rust --pattern $'fn get_name($_) -> $_ { $$$ }' # Search for the implementation of `set_name` function. ast-grep --lang rust --pattern $'fn set_name($_, $_) { $$$ }' # Search for the implementation of `sum` function. ast-grep --lang rust --pattern $'fn sum($_, $_) -> $_ { $$$ }' # Search for the implementation of the constructor. ast-grep --lang rust --pattern $'fn constructor($_) { $$$ }'Length of output: 261
Script:
#!/bin/bash # Description: Broader search for the implementations of `get_name`, `set_name`, `sum`, and constructor functions. # Search for the implementation of `get_name` function. rg 'fn get_name' # Search for the implementation of `set_name` function. rg 'fn set_name' # Search for the implementation of `sum` function. rg 'fn sum' # Search for the implementation of the constructor. rg 'fn constructor'Length of output: 1366
packages/starknet_provider/lib/src/model/get_transaction_receipt.freezed.dart (3)
433-446
: LGTM! TheActualFee
class is well-implemented.The class contains the necessary fields and methods, and the serialization methods are properly defined.
616-619
: LGTM! TheTxnReceipt
class changes are well-integrated.The
actualFee
field is now of typeActualFee
, and the related methods and constructors have been updated accordingly.Also applies to: 624-626, 634-636, 644-646, 654-656, 665-667, 676-678, 691-693, 701-703, 711-713, 721-723, 732-734, 743-745, 758-760, 768-770, 778-780, 788-790, 799-801, 810-812, 875-880, 910-911, 927-932, 945-952, 985-986, 1038-1038, 1116-1174, 1187-1245, 1258-1316, 1390-1404, 1430-1437, 1470-1471, 1523-1523, 1601-1659, 1672-1730, 1743-1801, 1875-1889, 1915-1922, 1955-1956, 2008-2008, 2086-2144, 2157-2215, 2228-2286, 2360-2374, 2400-2408, 2442-2443, 2500-2500, 2585-2643, 2656-2714, 2727-2785, 2859-2874, 2902-2910, 2945-2946, 3003-3003, 3088-3146, 3159-3217, 3230-3288, 3362-3377, 3405-3410, 3442-3443, 3485-3485, 3556-3614, 3627-3685, 3698-3756, 3830-3842, 3867-3871, 3902-3903, 3942-3942, 4007-4065, 4078-4136, 4149-4207, 4281-4293
3485-3485
: LGTM! ThePendingDeployTxnReceipt
andPendingCommonReceiptProperties
class changes are well-integrated.The
actualFee
field is now of typeActualFee
, and the related methods and constructors have been updated accordingly.Also applies to: 3556-3614, 3627-3685, 3698-3756, 3830-3842, 3867-3871, 3902-3903, 3942-3942, 4007-4065, 4078-4136, 4149-4207, 4281-4293
"variant": { | ||
"type": "open_zeppelin", | ||
"version": 1, | ||
"public_key": "0x39d9e6ce352ad4530a0ef5d5a18fd3303c3606a7fa6ac5b620020ad681cc33b", |
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.
Potential Security Risk: Public Key Exposure
The public key is exposed in the configuration file, which might lead to security risks if this file is not properly secured. Consider encrypting this key or using environment variables to handle sensitive information securely.
Tools
Gitleaks
6-6: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
@@ -7,13 +7,13 @@ export DEVNET_DUMP_PATH="./assets/devnet-dump.json" | |||
|
|||
export CAIRO_VERSION=2.6.2 | |||
export SCARB_VERSION=2.6.2 | |||
export STARKNET_DEVNET_VERSION=0.0.5 | |||
export STARKNET_DEVNET_VERSION=0.0.7 |
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.
Potential Security Risk: API Key Exposure
The private and public keys are exposed in the environment file, which could lead to unauthorized access if not properly secured. Consider using secrets management tools or environment-specific encryption to protect these keys.
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/starknet_provider/test/integration/read_provider_test.dart (34 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/starknet_provider/test/integration/read_provider_test.dart
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- contracts/v2.6.2/src/hello.cairo (2 hunks)
- melos.yaml (2 hunks)
- packages/starknet_provider/test/integration/read_provider_test.dart (34 hunks)
Files skipped from review as they are similar to previous changes (2)
- contracts/v2.6.2/src/hello.cairo
- packages/starknet_provider/test/integration/read_provider_test.dart
Additional context used
yamllint
melos.yaml
[error] 90-90: trailing spaces
(trailing-spaces)
[error] 92-92: trailing spaces
(trailing-spaces)
Additional comments not posted (3)
melos.yaml (3)
64-64
: Approve the addition of--dump-on exit
indevnet:start:dump
.This change will help in debugging by ensuring the state is preserved on exit.
Verify the accessibility of the dump path.
Ensure that$DEVNET_DUMP_PATH
is writable and accessible to avoid runtime errors.Verification successful
Approve the addition of
--dump-on exit
indevnet:start:dump
.This change will help in debugging by ensuring the state is preserved on exit.
Verification result:
The dump path is confirmed to be writable and accessible.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if the dump path is writable and accessible. [ -w $DEVNET_DUMP_PATH ] && echo "Dump path is writable." || echo "Dump path is not writable."Length of output: 67
59-60
: Approve the updateddevnet:start
command.The addition of
--state-archive-capacity full
and--port 3030
seems appropriate for enhancing devnet functionality.Verify port usage to avoid conflicts.
Ensure that port 3030 is not used by other services in the development environment.
87-95
: Approve the newcontracts:invoke
command.This addition facilitates creating invoke and deploy account transactions, which is crucial for contract interactions.
Verify the hashes used in transactions.
Ensure that the hashes0x03b2911796e0024f9e23d7337997538058eca267d5ddaa582d482cbe1fb64897
and0x055ba13c33a12506d2eab8dfbc618a8ce0d247c24959a64ee18fbf393c873b83
are correct and valid.Tools
yamllint
[error] 90-90: trailing spaces
(trailing-spaces)
[error] 92-92: trailing spaces
(trailing-spaces)
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/starknet_provider/test/integration/read_provider_test.dart (34 hunks)
Additional comments not posted (8)
packages/starknet_provider/test/integration/read_provider_test.dart (8)
12-12
: Verify the correctness of the newbalanceContractAddress
value.Ensure that the new hexadecimal value
0x03cdc588f4f1bff66c8a6896e7008cc39c7804d36b16e93792625bd18bffd249
is correct and matches the expected format.
17-17
: Verify the correctness of the newblockHash
value.Ensure that the new hexadecimal value
0x51d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02
is correct and matches the expected format.
18-18
: Verify the correctness of the newblockNumber
value.Ensure that the new integer value
3
is correct and matches the expected context.
20-20
: Verify the correctness of the newinvokeTransactionHash
value.Ensure that the new hexadecimal value
0x029583643cd8932f1955bf28bfebf4c907b13df1e5c2d202b133cfbf783697a2
is correct and matches the expected format.
22-22
: Verify the correctness of the newdeclareTransactionHash
value.Ensure that the new hexadecimal value
0x4d7ba5427d4066c8db851e7662ecce860a94a804c6735677dfd29f1d0103fda
is correct and matches the expected format.
26-26
: Verify the correctness of the newdeployAccountTransactionHash
value.Ensure that the new hexadecimal value
0x055ba13c33a12506d2eab8dfbc618a8ce0d247c24959a64ee18fbf393c873b83
is correct and matches the expected format.
40-40
: Verify the correctness of the newblockIdForTheGivenContractAddress
value.Ensure that the new hexadecimal value
0x51d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02
is correct and matches the expected format.
45-47
: Verify the correctness of the newclassHashV1
andcontractAddressV1
values.Ensure that the new hexadecimal values
0x061dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f
and0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691
are correct and match the expected format.
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/starknet_provider/test/integration/read_provider_test.dart (34 hunks)
Additional comments not posted (13)
packages/starknet_provider/test/integration/read_provider_test.dart (13)
12-12
: Verify the updatedbalanceContractAddress
hex string.Ensure that the new hex string
"0x03cdc588f4f1bff66c8a6896e7008cc39c7804d36b16e93792625bd18bffd249"
is correct and corresponds to the intended address.
17-17
: Verify the updatedblockHash
hex string.Ensure that the new hex string
'0x51d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02'
is correct and corresponds to the intended block hash.
18-18
: Verify the updatedblockNumber
.Ensure that the new block number
3
is correct and corresponds to the intended block.
20-20
: Verify the updatedinvokeTransactionHash
hex string.Ensure that the new hex string
'0x029583643cd8932f1955bf28bfebf4c907b13df1e5c2d202b133cfbf783697a2'
is correct and corresponds to the intended transaction hash.
22-22
: Verify the updateddeclareTransactionHash
hex string.Ensure that the new hex string
'0x4d7ba5427d4066c8db851e7662ecce860a94a804c6735677dfd29f1d0103fda'
is correct and corresponds to the intended transaction hash.
26-26
: Verify the updateddeployAccountTransactionHash
hex string.Ensure that the new hex string
'0x055ba13c33a12506d2eab8dfbc618a8ce0d247c24959a64ee18fbf393c873b83'
is correct and corresponds to the intended transaction hash.
40-40
: Verify the updated block hash forBlockId
hex string.Ensure that the new hex string
'0x51d7ee9fa3a6226d47860eea28dc0b38eeccd7b6fac1b9f39c64c3ac772cc02'
is correct and corresponds to the intended block hash.
45-45
: Verify the updatedclassHashV1
hex string.Ensure that the new hex string
'0x061dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f'
is correct and corresponds to the intended class hash.
47-47
: Verify the updatedcontractAddressV1
hex string.Ensure that the new hex string
'0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691'
is correct and corresponds to the intended contract address.
62-63
: Verify the updatedexpect
statement forblockNumber
.Ensure that the updated
expect
statement correctly checks ifblockNumber
is aBlockNumberResult
and if the result is greater than or equal to 0.
119-119
: Verify the updatedentryPointSelector
for thecall
method.Ensure that the updated
entryPointSelector
correctly usesgetSelectorByName('get_name')
.
127-127
: Verify the updatedexpect
statement for thecall
method result.Ensure that the updated
expect
statement correctly checks if the result has a length of 1 and if the first element isFelt.fromInt(0)
.
139-139
: Verify the updatedblockId
for thecall
method.Ensure that the updated
blockId
correctly usesBlockId.latest
.
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- contracts/v2.6.2/src/hello.cairo (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- contracts/v2.6.2/src/hello.cairo
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.
One last fix and we can merge!
Thanks a lot for your work
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- contracts/v2.6.2/src/hello.cairo (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- contracts/v2.6.2/src/hello.cairo
* scratch changes * in progress * in progress * fix * fix * in progress * in progress * added simulation_flags * fix * clean up * fix recipit * fix tests * clean up * clean up * clean up * clean up * fix devnet ci * clean up * clean up * satisfy review * clean up * clean up * fix hello contract * fix hello contract
* scratch changes * in progress * in progress * fix * fix * in progress * in progress * added simulation_flags * fix * clean up * fix recipit * fix tests * clean up * clean up * clean up * clean up * fix devnet ci * clean up * clean up * satisfy review * clean up * clean up * fix hello contract * fix hello contract
* scratch changes * in progress * in progress * fix * fix * in progress * in progress * added simulation_flags * fix * clean up * fix recipit * fix tests * clean up * clean up * clean up * clean up * fix devnet ci * clean up * clean up * satisfy review * clean up * clean up * fix hello contract * fix hello contract
* scratch changes * in progress * in progress * fix * fix * in progress * in progress * added simulation_flags * fix * clean up * fix recipit * fix tests * clean up * clean up * clean up * clean up * fix devnet ci * clean up * clean up * satisfy review * clean up * clean up * fix hello contract * fix hello contract
read_provider_test
to match 0.0.7 devnet0xSpaceShard/starknet-devnet#498
0xSpaceShard/starknet-devnet#496
0xSpaceShard/starknet-devnet#544
resolves #347 and maybe #371
estimated time: 4 days
Summary by CodeRabbit
New Features
sum
method in smart contract for calculating the sum of two values.melos
to support smart contract transactions.Enhancements
Bug Fixes
Documentation
Style
TokenSymbol
.Chores
starknet-devnet
to version0.0.7
across various files..starkli/account_1.json
to.gitignore
.