Closed roninjin10 closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Latest commit: b1fa6f6b7e89806450e0957edc5b289ad80d3305
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @roninjin10 and the rest of your teammates on Graphite
This pull request introduces multiple test suites for various functions related to Ethereum transaction processing, validation, and retrieval. It enhances the codebase by adding comprehensive unit tests for functions such as processTx
, validateSetAccountParams
, and several JSON-RPC procedures, ensuring robust validation and error handling. Additionally, it modifies type declarations in the EthJsonRpcRequest.ts
file to improve type safety by changing mutable tuples to immutable tuples.
File(s) | Change Summary |
---|---|
packages/actions/src/Mine/processTx.spec.ts |
Introduced a test suite for the processTx function, validating transaction processing and receipt generation. |
packages/actions/src/SetAccount/validateSetAccountParams.spec.ts |
Added unit tests for validateSetAccountParams , covering various input validation scenarios and error handling. |
packages/actions/src/eth/EthJsonRpcRequest.ts |
Modified parameter types of several JSON-RPC request types to immutable tuples for enhanced type safety. |
packages/actions/src/eth/ethAccountsProcedure.spec.ts |
Created tests for ethAccountsProcedure , validating responses with and without an id in JSON-RPC requests. |
packages/actions/src/eth/ethGetTransactionByBlockHashAndIndexProcedure.spec.ts |
Introduced tests for retrieving transactions by block hash and index, covering both successful retrieval and error scenarios. |
packages/actions/src/eth/ethGetTransactionByBlockNumberAndIndexProcedure.spec.ts |
Added tests for retrieving transactions by block number and index, validating both successful and error responses. |
packages/actions/src/eth/ethGetTransactionByHashProcedure.spec.ts |
Established tests for ethGetTransactionByHash , ensuring correct retrieval of transaction details and handling of non-existent transactions. |
packages/actions/src/eth/ethGetTransactionReceiptProcedure.spec.ts |
Created tests for retrieving transaction receipts, validating successful and unsuccessful retrieval scenarios. |
packages/actions/src/eth/ethGetTransactionReceipt.spec.ts |
Introduced tests for ethGetTransactionReceiptHandler , covering successful retrieval and handling of non-existent receipts. |
packages/actions/src/eth/ethSignProcedure.spec.ts |
Added tests for ethSignProcedure , validating message signing and error handling for non-existent accounts. |
packages/actions/src/eth/getStorageAtHandler.spec.ts |
Established tests for getStorageAtHandler , covering various scenarios for retrieving storage values and error handling. |
packages/errors/package.json |
Updated the scripts section to add new commented-out testing scripts for vitest , while removing previous entries. |
packages/precompiles/src/logToEthjsLog.ts |
Modified the construction of argsArray for improved readability without changing logic. |
packages/actions/src/Call/callHandlerOpts.js |
Clarified the precedence in the conditional expression for baseFeePerGas without altering the functionality. |
processTx
.deployHandler
, which may involve transaction processing similar to the processTx
function tested in the main PR.processTx
function.processTx
function.eth_getLogs
, which involves transaction logs and could relate to the processing of transactions in the main PR.processTx
function.🐰 In the meadow where rabbits play,
New tests hop in to save the day!
For transactions, they check and see,
Ensuring all works perfectly!
With every test, the code grows bright,
A joyful leap, oh what a sight! 🌼
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?
Description
Concise description of proposed changes
Testing
Explain the quality checks that have been done on the code changes
Additional Information
Your ENS/address:
Summary by CodeRabbit
New Features
Bug Fixes
Tests
processTx
,validateSetAccountParams
,ethAccountsProcedure
, and others to cover both successful and error scenarios.