Skip to content

Commit

Permalink
tx: fix 7702 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jochem-brouwer committed Oct 31, 2024
1 parent 560a831 commit fa76edc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/tx/test/eip7702.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
BIGINT_1,
MAX_INTEGER,
MAX_UINT64,
SECP256K1_ORDER_DIV_2,
bigIntToHex,
createAddressFromPrivateKey,
createZeroAddress,
Expand Down Expand Up @@ -86,9 +85,9 @@ describe('[EOACode7702Transaction]', () => {
{ nonce: bigIntToHex(MAX_UINT64 + BIGINT_1) },
'Invalid EIP-7702 transaction: nonce exceeds 2^64 - 1',
],
[{ yParity: '0x2' }, 'yParity should be 0 or 1'],
[{ yParity: '0x0100' }, 'yParity should be < 2^8'],
[{ r: bigIntToHex(MAX_INTEGER + BIGINT_1) }, 'r exceeds 2^256 - 1'],
[{ s: bigIntToHex(SECP256K1_ORDER_DIV_2 + BIGINT_1) }, 's > secp256k1n/2'],
[{ s: bigIntToHex(MAX_INTEGER + BIGINT_1) }, 's exceeds 2^256 - 1'],
[{ yParity: '0x0002' }, 'yParity cannot have leading zeros'],
[{ r: '0x0001' }, 'r cannot have leading zeros'],
[{ s: '0x0001' }, 's cannot have leading zeros'],
Expand Down

0 comments on commit fa76edc

Please sign in to comment.