Skip to content
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: Always use maxUint256 instead of 2n ** 256n - 1n #2692

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

frapsMatheus
Copy link
Contributor

@frapsMatheus frapsMatheus commented Sep 5, 2024

Overview

This PR improves the readability of code that uses 2n ** 256n - 1n. It also fixes a crash in JavaScript caused by using these big numbers directly inside if statements.
Screenshot 2024-09-05 at 12 00 47

Summary

  • Fixed a crash related to big numbers in conditional logic.
  • Improved overall code readability for better maintenance and understanding.

PR-Codex overview

This PR replaces hard-coded values with a maxUint256 constant for fee calculations.

Detailed summary

  • Replaced hard-coded values with maxUint256 constant in fee calculations across multiple files.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

- Improve code readability
- Fix error: *identifier starts immediately after numeric literal*
Copy link

changeset-bot bot commented Sep 5, 2024

🦋 Changeset detected

Latest commit: c69e8e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Sep 5, 2024

@frapsMatheus is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@jxom jxom merged commit 70814af into wevm:main Sep 5, 2024
4 of 25 checks passed
This was referenced Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants