Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
acolytec3 committed Sep 11, 2024
1 parent ea9f88d commit 88dfdd0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/tx/examples/EOACodeTx.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Common, Hardfork, Mainnet } from '@ethereumjs/common'
import { createEOACode7702Tx } from '@ethereumjs/tx'

import type { PrefixedHexString } from '@ethereumjs/util'
import { type PrefixedHexString, createAddressFromPrivateKey, randomBytes } from '@ethereumjs/util'

const ones32 = `0x${'01'.repeat(32)}` as PrefixedHexString

Expand All @@ -12,12 +11,13 @@ const tx = createEOACode7702Tx(
{
chainId: '0x2',
address: `0x${'20'.repeat(20)}`,
nonce: ['0x1'],
nonce: '0x1',
yParity: '0x1',
r: ones32,
s: ones32,
},
],
to: createAddressFromPrivateKey(randomBytes(32)),
},
{ common },
)
Expand Down

0 comments on commit 88dfdd0

Please sign in to comment.