Skip to content

Commit

Permalink
VM: use VM async create method instead of constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrocheleau committed May 17, 2022
1 parent 575a679 commit b99a766
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/vm/tests/api/EIPs/eip-1153.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/vm/tests/api/EIPs/eip-3651-warm-coinbase.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b99a766

Please sign in to comment.