Skip to content

Files

Latest commit

9ba0db9 · Apr 1, 2021

History

History
This branch is 2467 commits behind ethereumjs/ethereumjs-monorepo:master.

run-code-browser

Running the VM in a browser

This directory contains an example on how to run the VM in a browser.

The example does these things:

  1. Instantiates a VM
  2. Set ups a listener of the VM's step event
  3. Runs a sample code in the VM
  4. Logs the results

Installation

  1. Run npm install in the root of this project
  2. Run npm install in this directory

Running the example

First, follow these instructions:

  1. Run npm run build:dist in the root of this project

Node

  1. Run npm run example:node in this directory

Run Example in a Browser

  1. npm run example:browser
  2. Open http://localhost:8080 in a browser and check the result in web console.