Skip to content

Commit 65de3a8

Browse files
authored
Update 4844 examples to cancun (#4058)
1 parent f041a68 commit 65de3a8

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

packages/block/examples/4844.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const main = async () => {
1414
customCrypto: {
1515
kzg,
1616
},
17+
hardfork: Hardfork.Cancun,
1718
})
1819
const blobTx = createBlob4844Tx(
1920
{ blobsData: ['myFirstBlob'], to: createAddressFromPrivateKey(randomBytes(32)) },

packages/evm/examples/4844.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
import { Common, Hardfork, Mainnet } from '@ethereumjs/common'
22

3-
const common = new Common({ chain: Mainnet, hardfork: Hardfork.Shanghai, eips: [4844] })
3+
const common = new Common({ chain: Mainnet, hardfork: Hardfork.Cancun })
4+
5+
console.log('is EIP-4844 active?', common.isActivatedEIP(4844))

packages/tx/examples/blobTx.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ const main = async () => {
99
const kzg = new microEthKZG(trustedSetup)
1010
const common = new Common({
1111
chain: Mainnet,
12-
hardfork: Hardfork.Shanghai,
13-
eips: [4844],
12+
hardfork: Hardfork.Cancun,
1413
customCrypto: { kzg },
1514
})
1615

packages/vm/examples/vmWith4844.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Common, Hardfork, Mainnet } from '@ethereumjs/common'
22
import { createVM } from '@ethereumjs/vm'
33

44
const main = async () => {
5-
const common = new Common({ chain: Mainnet, hardfork: Hardfork.Shanghai, eips: [4844] })
5+
const common = new Common({ chain: Mainnet, hardfork: Hardfork.Cancun })
66
const vm = await createVM({ common })
77
console.log(`4844 is active in the VM - ${vm.common.isActivatedEIP(4844)}`)
88
}

0 commit comments

Comments
 (0)