Giter Site home page Giter Site logo

zhengyao-lin / ethereumjs-vm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ethereumjs/ethereumjs-monorepo

1.0 0.0 0.0 23.19 MB

The Ethereum VM implemented in JavaScript

JavaScript 3.25% Python 0.32% TypeScript 95.67% Shell 0.70% HTML 0.01% Solidity 0.06%

ethereumjs-vm's Introduction

EthereumJS Monorepo

Code Coverage Discord

This was originally the EthereumJS VM repository. On Q1 2020 we brought some of its building blocks together to simplify development. Below you can find the packages included in this repository.

๐Ÿšง Please note that the master branch is updated on a daily basis, and to inspect code related to a specific package version, refer to the tags.

package npm issues tests coverage
@ethereumjs/account NPM Package Account Issues Actions Status Code Coverage
@ethereumjs/block NPM Package Block Issues Actions Status Code Coverage
@ethereumjs/blockchain NPM Package Blockchain Issues Actions Status Code Coverage
@ethereumjs/common NPM Package Common Issues Actions Status Code Coverage
@ethereumjs/ethash NPM Package Ethash Issues Actions Status Code Coverage
@ethereumjs/tx NPM Package Tx Issues Actions Status Code Coverage
@ethereumjs/vm NPM Package VM Issues Actions Status Code Coverage

Coverage report

Detailed version can be seen on Codecov.io

Code Coverage

Package dependency relationship

diagram

Development quick start

This monorepo uses Lerna. It links the local packages together, making development a lot easier.

TLDR: Setup

npm install
npm build

TLDR: To update dependencies and (re-)link packages

npm run bootstrap
npm build

Above is the quickest way to set you up. Going down the road, there are two sets of commands: project and package-specific commands. You can find them at ./package.json and ./packages/*/package.json, respectively. Here's a breakdown:

Project scripts โ€” run from repository root

npm install

Adds dependencies listed in the root package. Also, it executes the bootstrap script described below, installing all sub-packages dependencies.

npm run bootstrap

Installs dependencies for all sub-packages, and links them to create an integrated development environment.

npm run build

Produces dist files for all sub-packages. This command can be scoped.

npm run build:tree -- --scope @ethereumjs/blockchain

Builds all local packages that the provided package (eg: @ethereumjs/blockchain) depends on, and itself. This unusual syntax just means: pass whatever arguments are after -- to the underlying script.

If no scope is provided, npm run build:tree, will build all sub-packages.

Package scripts โ€” run from ./packages/<name>

โš ๏ธ Important: if you run npm install from the package directory, it will remove all links to the local packages, pulling all dependencies from npm. Run npm install from the root only.

There's a set of rather standardized commands you will find in each package of this repository.

npm run build

Uses TypeScript compiler to build files from src or lib. Files can be found at packages/<name>/dist.

npm run coverage

Runs whatever is on npm run test script, capturing coverage information. By the end, it displays a coverage table. Additional reports can be found at packages/<name>/coverage.

npm run docs:build

Generates package documentation and outputs it to ./packages/<name>/docs.

npm run lint

Checks code style according to the rules defined in ethereumjs-config.

npm run lint:fix

Fixes code style according to the rules.

npm run test

Runs all package tests. Note that the VM has several test scopes - refer to packages/vm/package.json for more info.

npm run clean

Removes root and package node_modules directories. Useful to run before npm i for a fresh install.

Going further

As this project is powered by Lerna, you can install it globally to enjoy lots more options. Refer to Lerna docs for additional commands.

  • npm install -g lerna
  • lerna run
  • lerna exec

Cleaning node_modules

Hoisting is enabled so dependencies are moved to the root node_modules. lerna clean does not remove the root node_modules so for convenience you can use the project script npm run clean.

EthereumJS

See our organizational documentation for an introduction to EthereumJS as well as information on current standards and best practices.

If you want to join for work or do improvements on the libraries have a look at our contribution guidelines.

LICENSE

MIT

ethereumjs-vm's People

Contributors

holgerd77 avatar axic avatar s1na avatar alcuadrado avatar ryanio avatar wanderer avatar evertonfraga avatar kumavis avatar jwasinger avatar jochem-brouwer avatar cdetrio avatar danjm avatar vpulim avatar greenkeeper[bot] avatar youfoundron avatar chikeichan avatar mattdean-digicatapult avatar whymarrh avatar sdtsui avatar greenkeeperio-bot avatar cgewecke avatar fanatid avatar pinkiebell avatar alextsg avatar mikeseese avatar rumkin avatar kvhnuke avatar aakilfernandes avatar hugo-dc avatar yann300 avatar

Stargazers

Roman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.