From 5079664401866fa2d3b3de04686827334687bc32 Mon Sep 17 00:00:00 2001 From: Jochem Brouwer Date: Sun, 22 Dec 2024 03:28:45 +0100 Subject: [PATCH] update chainid to uint256 --- packages/tx/src/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/tx/src/util.ts b/packages/tx/src/util.ts index 983111fdae..5a051167a4 100644 --- a/packages/tx/src/util.ts +++ b/packages/tx/src/util.ts @@ -210,8 +210,8 @@ export class AuthorizationLists { if (address.length !== 20) { throw new Error('Invalid EIP-7702 transaction: address length should be 20 bytes') } - if (bytesToBigInt(chainId) > MAX_UINT64) { - throw new Error('Invalid EIP-7702 transaction: chainId exceeds 2^64 - 1') + if (bytesToBigInt(chainId) > MAX_INTEGER) { + throw new Error('Invalid EIP-7702 transaction: chainId exceeds 2^256 - 1') } if (bytesToBigInt(nonce) > MAX_UINT64) { throw new Error('Invalid EIP-7702 transaction: nonce exceeds 2^64 - 1')