From 5bb060132081b12a7f7a9cab455e8fe5f92bee88 Mon Sep 17 00:00:00 2001 From: Holger Drewes Date: Thu, 15 Aug 2024 16:35:55 +0200 Subject: [PATCH] EVM example fix --- packages/evm/examples/precompile.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/evm/examples/precompile.ts b/packages/evm/examples/precompile.ts index c0a2fcb163..e6ee2083ba 100644 --- a/packages/evm/examples/precompile.ts +++ b/packages/evm/examples/precompile.ts @@ -1,9 +1,9 @@ -import { Chain, Common, Hardfork } from '@ethereumjs/common' -import { EVM, getActivePrecompiles } from '@ethereumjs/evm' +import { Common, Hardfork, Mainnet } from '@ethereumjs/common' +import { createEVM, getActivePrecompiles } from '@ethereumjs/evm' import { bytesToHex, hexToBytes } from '@ethereumjs/util' const main = async () => { - const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Prague }) + const common = new Common({ chain: Mainnet, hardfork: Hardfork.Prague }) // Taken from test/eips/precompiles/bls/add_G1_bls.json const data = hexToBytes( @@ -11,7 +11,7 @@ const main = async () => { ) const gasLimit = BigInt(5000000) - const evm = await EVM.create({ common }) + const evm = await createEVM({ common }) const precompile = getActivePrecompiles(common).get('000000000000000000000000000000000000000b')! const callData = {