How to use the ethereumjs-vm.default function in ethereumjs-vm

To help you get started, we’ve selected a few ethereumjs-vm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ethereum / remix / remix-lib / src / execution / execution-context.js View on Github external
function createVm (hardfork) {
  var stateManager = new StateManagerCommonStorageDump({})
  stateManager.checkpoint(() => {})
  var vm = new EthJSVM({
    activatePrecompiles: true,
    blockchain: stateManager.blockchain,
    stateManager: stateManager,
    hardfork: hardfork
  })
  vm.blockchain.validate = false
  var web3vm = new Web3VMProvider()
  web3vm.setVM(vm)
  return { vm, web3vm, stateManager }
}
github FabricLabs / fabric / services / ethereum.js View on Github external
constructor (settings = {}) {
    super(settings);

    this.status = 'constructing';
    this.settings = Object.assign({
      name: '@services/ethereum',
      stack: []
    }, settings);

    this._state = {
      stack: this.settings.stack
    };

    this.vm = new VM();
    this.status = 'constructed';
  }

ethereumjs-vm

An Ethereum VM implementation

MPL-2.0
Latest version published 5 years ago

Package Health Score

58 / 100
Full package analysis