NPM package omits many exports that are present in the monorepo
The examples do not use the latest version:
./examples/run-blockchain: Loads tests data, including accounts and blocks, and runs all of them in the VM. ./examples/run-solidity-contract: Compiles a Solidity contract, and calls constant and non-constant functions.
The issue is related to the fact that there are inconsistencies in what the monorepo exports and what the npm package exports:
Monorepo for VM: src/index
export { BlockBuilder, BuildStatus } from './buildBlock.js'
export { buildBlock } from './buildBlock.js'
export * from './constructors.js'
export * from './params.js'
export { encodeReceipt } from './runBlock.js'
export { runBlock } from './runBlock.js'
export { runTx } from './runTx.js'
export * from './types.js'
export { VM } from './vm.js'
NPM Package for VM instead:
export { BlockBuilder, BuildStatus } from './buildBlock.js'
export { encodeReceipt } from './runBlock.js'
export * from './types.js'
export { VM } from './vm.js'
https://www.npmjs.com/package/@ethereumjs/vm/v/8.1.1
We are in the late stages of a major breaking release round so our monorepo code is almost a year ahead of the last major version release on npm. We're hoping to get this next round out this month or next and then the published packaged should closely align with the current examples.
Thanks for the update!