-
Notifications
You must be signed in to change notification settings - Fork 17
[Snyk] Upgrade viem from 2.43.2 to 2.43.3 #492
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
Snyk has created this PR to upgrade viem from 2.43.2 to 2.43.3. See this package in npm: viem See this project in Snyk: https://app.eu.snyk.io/org/layer-3-foundation-default/project/c25ff405-cf64-4f00-8ed5-6194c8f1a101?utm_source=github&utm_medium=referral&page=upgrade-pr
|
Important Review skippedIgnore keyword(s) in the title. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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. Comment |
Summary of ChangesHello @dpatsora, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request, automatically generated by Snyk, updates the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request upgrades the viem dependency from version 2.43.2 to 2.43.3. This is a patch release that includes bug fixes. I've reviewed the changes in viem and their potential impact on the codebase. The most notable change is the removal of the chain property from the request object returned by simulateContract. The current implementation appears to handle this correctly. However, this change highlights a potential risk in NitroliteService.ts where a type assertion to any is used, which could hide future type errors from viem updates. I've added a comment with a recommendation to address this for improved maintainability and robustness.
| "dependencies": { | ||
| "abitype": "^1.2.3", | ||
| "viem": "^2.43.2", | ||
| "viem": "^2.43.3", |
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.
This patch upgrade of viem includes a change to the object returned by simulateContract. Specifically, the chain property is no longer part of the returned request object.
While the current implementation in sdk/src/client/services/NitroliteService.ts should handle this gracefully by relying on the walletClient's chain configuration, it highlights a potential risk with the use of as any in the executeWriteContract function (lines 39-42).
// sdk/src/client/services/NitroliteService.ts:39-42
return walletClient.writeContract({
...request,
account,
} as any);This type assertion suppresses type-checking, which means future breaking changes in viem might not be caught at compile time, leading to runtime errors.
I recommend creating a follow-up task to refactor this part and remove the as any cast. It might be possible to achieve type safety with more specific generic types or by creating a more constrained type for PreparedContractRequest instead of any.
Snyk has created this PR to upgrade viem from 2.43.2 to 2.43.3.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 1 version ahead of your current version.
The recommended version was released 25 days ago.
Release notes
Package name: viem
-
2.43.3 - 2025-12-21
-
-
-
-
2.43.2 - 2025-12-18
-
-
-
-
-
-
from viem GitHub release notesPatch Changes
#4188
0e589b25a209943ea939f6ca6e4c5376c89d8e10Thanks @ jenpaff! - Fixed tempo formatter for access keys53f280a72534259d2f6c06d411b10b9077dd0bffThanks @ jxom! - Restored behavior wherechainwas not passed as a return value of `prepareTransactionRequest.6f0e7c2bb902d0f7eff7ffcc0cf0997be9c15c45Thanks @ tmm! - Updated tempo chain configPatch Changes
e3a110394b9775ee2eb4141526b274a5480b25fbThanks @ jxom! - Updated Ox.5087f50f98b3bd74e5bb9483c7e2c46418395a2dThanks @ jxom! - Fixed JSON-RPC account formatting for Tempo transactions.#4173
0e8149f9275a6453d52d9847dd02176e7089ce4eThanks @ sandyup! - Added Apollo mainnet.#4181
cb2bb89abf311eb2de7b506418e28d500087ca91Thanks @ albertov19! - Updated Moonbeam/Moonriver RPC URLs.#4179
0c10bf7a50b7eabf97cd23c88263122c79f775cdThanks @ findmytrueself! - Added HPP Mainnet & Sepolia#4180
f983ce9ad4eb4d53fd9d952e7e1cff4053ae7100Thanks @ BigtoMantraDev! - rename MANTRA DuKong native coinImportant
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: