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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shiny-kiwis-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"abitype": patch
---

EIP712 - `chainId` should support `uint256` values
2 changes: 1 addition & 1 deletion packages/abitype/src/abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export type Abi = readonly (
// Typed Data Types

export type TypedDataDomain = {
chainId?: number | undefined
chainId?: number | bigint | string | undefined
name?: string | undefined
salt?: ResolvedRegister['bytesType']['outputs'] | undefined
verifyingContract?: Address | undefined
Expand Down
2 changes: 1 addition & 1 deletion packages/abitype/src/zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export const Abi = z
// Typed Data Types

export const TypedDataDomain = z.object({
chainId: z.number().optional(),
chainId: z.union([z.number(), z.string(), z.bigint()]).optional(),
name: Identifier.optional(),
salt: z.string().optional(),
verifyingContract: Address.optional(),
Expand Down