Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ethereumjs-vm

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethereumjs-vm - npm Package Compare versions

Comparing version 1.2.2 to 1.3.0

3

lib/index.js

@@ -23,3 +23,3 @@ const util = require('util')

*/
function VM (trie, blockchain) {
function VM (trie, blockchain, opts) {
this.stateManager = new StateManager({

@@ -34,2 +34,3 @@ trie: trie,

this.trie = this.stateManager.trie
this.opts = opts || {}

@@ -36,0 +37,0 @@ // precompiled contracts

@@ -45,2 +45,3 @@ const async = require('async')

var suicides = opts.suicides
var enableHomestead = this.opts.enableHomestead === undefined ? block.isHomestead() : this.opts.enableHomestead

@@ -154,3 +155,3 @@ txValue = new BN(txValue)

results.return = new Buffer([])
if (opts.block.isHomestead()) {
if (enableHomestead) {
results.exception = 0

@@ -157,0 +158,0 @@ err = results.exceptionError = ERROR.OUT_OF_GAS

@@ -44,2 +44,4 @@ /*

var block = opts.block || new Block();
// VM internal state

@@ -67,3 +69,3 @@ var runState = {

suicides: opts.suicides || {},
block: opts.block || new Block(),
block: block,
callValue: opts.value || new BN(0),

@@ -75,3 +77,4 @@ address: opts.address || utils.zeros(32),

code: opts.code,
populateCache: opts.populateCache === undefined ? true : opts.populateCache
populateCache: opts.populateCache === undefined ? true : opts.populateCache,
enableHomestead: this.opts.enableHomestead === undefined ? block.isHomestead() : this.opts.enableHomestead // this == vm
}

@@ -83,3 +86,3 @@

if (!runState.block.isHomestead()) {
if (!runState.enableHomestead) {
delete opFns.DELEGATECALL

@@ -86,0 +89,0 @@ } else {

{
"name": "ethereumjs-vm",
"version": "1.2.2",
"version": "1.3.0",
"description": "an ethereum VM implementation",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc