From b99a766108eeed8ae98ae922a2904ec6c0938e37 Mon Sep 17 00:00:00 2001 From: Gabriel Rocheleau Date: Tue, 17 May 2022 23:57:37 +0200 Subject: [PATCH] VM: use VM async create method instead of constructor --- packages/vm/tests/api/EIPs/eip-1153.spec.ts | 2 +- packages/vm/tests/api/EIPs/eip-3651-warm-coinbase.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vm/tests/api/EIPs/eip-1153.spec.ts b/packages/vm/tests/api/EIPs/eip-1153.spec.ts index 7bbce364995..feadcfe7ecd 100644 --- a/packages/vm/tests/api/EIPs/eip-1153.spec.ts +++ b/packages/vm/tests/api/EIPs/eip-1153.spec.ts @@ -22,7 +22,7 @@ tape('EIP 1153: transient storage', (t) => { const runTest = async function (test: Test, st: tape.Test) { let i = 0 let currentGas = initialGas - const vm = new (VM as any)({ common }) + const vm = await VM.create({ common }) vm.evm.on('step', function (step: any) { const gasUsed = currentGas - step.gasLeft diff --git a/packages/vm/tests/api/EIPs/eip-3651-warm-coinbase.spec.ts b/packages/vm/tests/api/EIPs/eip-3651-warm-coinbase.spec.ts index 785744f0a10..604aaf0fbe6 100644 --- a/packages/vm/tests/api/EIPs/eip-3651-warm-coinbase.spec.ts +++ b/packages/vm/tests/api/EIPs/eip-3651-warm-coinbase.spec.ts @@ -30,7 +30,7 @@ const code = Buffer.from('60008080806001415AF100', 'hex') const contractAddress = new Address(Buffer.from('ee'.repeat(20), 'hex')) async function getVM(common: Common) { - const vm = new (VM as any)({ common: common }) + const vm = await VM.create({ common: common }) const account = await vm.stateManager.getAccount(sender) const balance = GWEI * BigInt(21000) * BigInt(10000000) account.balance = balance