-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
🐛 Fix bug in zod validators #889
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
WalkthroughThe recent updates involve formatting adjustments in type annotations within a specific function, conditional logic enhancement in a memory client related to an Ethereum Improvement Proposal (EIP), and a refactoring effort aimed at improving readability in procedure handling. These changes collectively enhance code clarity, compatibility, and maintainability without altering the underlying functionality. Changes
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 Configration File (
|
7f3d3f5
to
12d07ec
Compare
1fee319
to
e5210f8
Compare
12d07ec
to
2efbf39
Compare
e5210f8
to
c333bf7
Compare
2efbf39
to
e6e17df
Compare
c333bf7
to
c2d7451
Compare
e6e17df
to
4079b62
Compare
c2d7451
to
f2d2820
Compare
4079b62
to
11d1563
Compare
f2d2820
to
9455c63
Compare
✅ Fix build: ♻️ Regenerate
9455c63
to
ec93a3f
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.
Review Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files selected for processing (3)
- extensions/viem/src/tevmViemExtension.js (5 hunks)
- packages/memory-client/src/createMemoryClient.js (1 hunks)
- packages/procedures/src/eth/ethCallProcedure.js (1 hunks)
Files skipped from review due to trivial changes (2)
- extensions/viem/src/tevmViemExtension.js
- packages/procedures/src/eth/ethCallProcedure.js
Additional comments: 6
packages/memory-client/src/createMemoryClient.js (6)
- 103-105: The conditional inclusion of the
withdrawals
property based on the activation of EIP 4895 is correctly implemented. However, ensure that theWithdrawalData
type is correctly imported and used here, as missing imports can lead to runtime errors.- 100-108: > 📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]
The imports at the top of the file are comprehensive, covering various utilities and classes needed for the
createMemoryClient
function. Ensure that all imported modules are used within the file to avoid unnecessary imports that can increase bundle size.
- 100-108: > 📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [28-28]
The use of
BigInt
forchainId
is appropriate given the potential size of chain IDs. However, ensure that all consuming code ofchainId
correctly handlesBigInt
values, as mixingBigInt
with other numeric types without explicit conversion can lead to errors.
- 100-108: > 📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [67-67]
The initialization of
genesisState
as an empty object is correct. However, if there's any default state that should be included in the genesis block, consider populating this object accordingly to avoid potential issues with uninitialized state.
- 100-108: > 📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [82-82]
The creation of the
WrappedEvm
instance is well-handled, with options allowing for customization of the EVM's behavior. Ensure that all options (allowUnlimitedContractSize
,customPrecompiles
,profiler
) are thoroughly documented and tested, especially since they can significantly affect the EVM's execution.
- 108-108: The handling of
options.customPredeploys
is a good feature, allowing for pre-deployment of contracts. Ensure that error handling is in place for the asynchronous operations withinPromise.all
, as failures in contract pre-deployment can lead to a partially initialized state.
header: common.genesis(), | ||
...(common.isActivatedEIP(4895) | ||
? { | ||
withdrawals: | ||
withdrawals: | ||
/** @type {Array<import('@ethereumjs/util').WithdrawalData>}*/ ([]), | ||
} | ||
} | ||
: {}), | ||
}, | ||
{ common, setHardfork: false, skipConsensusFormatValidation: true }, |
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.
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [9-9]
The documentation for the createMemoryClient
function is well-written, providing a clear example of how to use the function. Consider adding more details about the parameters accepted by the function and the structure of the returned MemoryClient
object for improved clarity.
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [33-33]
The TODO comment about using the tevm/jsonrpc
package instead of viem
indicates a future improvement. It's important to track this as a task in your project management tool to ensure it doesn't get overlooked.
Would you like me to open a GitHub issue to track the replacement of viem
with tevm/jsonrpc
?
Description
Testing
Explain the quality checks that have been done on the code changes
Additional Information
Your ENS/address:
Summary by CodeRabbit
tevmViemExtension
function for better readability.createMemoryClient
function to conditionally include thewithdrawals
property, aligning with EIP 4895 activation.ethCallProcedure
for enhanced readability without altering its logic.