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(EIP712): chainId should support uint256 values #257

Merged
merged 6 commits into from
Dec 3, 2024

Conversation

freemanzMrojo
Copy link
Contributor

@freemanzMrojo freemanzMrojo commented Nov 22, 2024

Since the largest integer that a number could safely represent in TypeScript is 2^53 - 1, bigger values that are supported by uint256 cannot fit into it (some sample values in the issue).

Closes #256


PR-Codex overview

This PR focuses on updating the TypedDataDomain type to allow the chainId property to accept bigint values in addition to number, enhancing flexibility for handling larger numeric values.

Detailed summary

  • Updated chainId in TypedDataDomain type to accept bigint in packages/abitype/src/abi.ts.
  • Modified chainId in TypedDataDomain Zod schema to allow bigint in packages/abitype/src/zod.ts.

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

Copy link

changeset-bot bot commented Nov 22, 2024

🦋 Changeset detected

Latest commit: 0ba2288

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

This PR includes changesets to release 1 package
Name Type
abitype 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 Nov 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
abitype ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 6:26pm

@freemanzMrojo freemanzMrojo changed the title EIP712 - chainId should support uint256 values fix: chainId should support uint256 values Nov 22, 2024
@freemanzMrojo freemanzMrojo changed the title fix: chainId should support uint256 values fix(EIP712): chainId should support uint256 values Nov 22, 2024
@tmm tmm force-pushed the main branch 2 times, most recently from 59ae8ba to e5cdc14 Compare December 3, 2024 18:18
@tmm tmm merged commit ee60e67 into wevm:main Dec 3, 2024
17 checks passed
@github-actions github-actions bot mentioned this pull request Dec 3, 2024
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.85%. Comparing base (6cb18b5) to head (0ba2288).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #257   +/-   ##
=======================================
  Coverage   99.85%   99.85%           
=======================================
  Files          26       26           
  Lines        6103     6103           
  Branches      196      186   -10     
=======================================
  Hits         6094     6094           
  Misses          8        8           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

EIP712 - Cannot pass a string as chainId
2 participants