Skip to content

Commit

Permalink
vm: fix state test runner for 7702
Browse files Browse the repository at this point in the history
  • Loading branch information
jochem-brouwer committed Oct 31, 2024
1 parent fa76edc commit bcfc8f6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/vm/test/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,17 @@ export function makeTx(
if (signature.v !== undefined) {
signature.yParity = bytesToHex(unpadBytes(hexToBytes(signature.v)))
}
if (signature.nonce !== undefined && signature.nonce[0] === '0x00') {
signature.nonce[0] = '0x'
if (signature.r !== undefined) {
signature.r = bytesToHex(unpadBytes(hexToBytes(signature.r)))
}
if (signature.s !== undefined) {
signature.s = bytesToHex(unpadBytes(hexToBytes(signature.s)))
}
if (signature.chainId !== undefined) {
signature.chainId = bytesToHex(unpadBytes(hexToBytes(signature.chainId)))
}
if (signature.nonce !== undefined && signature.nonce === '0x00') {
signature.nonce = '0x'
}
}
tx = createEOACode7702Tx(txData, opts)
Expand Down

0 comments on commit bcfc8f6

Please sign in to comment.