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')