基于区块链的毕业设计EthereumJS Monorepo – 以太坊单一回购

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计EthereumJS Monorepo – 以太坊单一回购 是一篇很好的国外资料

EthereumJS Monorepo - <a href=以太坊eth单一回购”>

EthereumJS Monorepo

EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>

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/block EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
@ethereumjs/blockchain EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
@ethereumjs/client EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
@ethereumjs/common EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
@ethereumjs/devp2p EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
@ethereumjs/ethash EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
merkle-patricia-tree EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
@ethereumjs/tx EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
@ethereumjs/vm EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>

Coverage report

Detailed version can be seen on Codecov.io

EthereumJS Monorepo - <a href=以太坊eth单一回购”>

Package dependency relationship

EthereumJS Monorepo - <a href=以太坊eth单一回购”>

Development quick start

First, make sure you have the ethereum-tests git submodule, by running:

git submodule init git submodule update

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

TLDR: Setup

npm install npm run build

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

npm run bootstrap npm run 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

Builds all monorepo packages by default. If a scope is provided, it will only build that particular package.

Scoped example, that will only build the VM package: npm run build — –scope @ethereumjs/vm

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

Builds all local packages that the provided package depends on (e.g.: @ethereumjs/blockchain), and builds itself.

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

npm run clean

Removes root and packages node_modules directories, and other generated files, like coverage, dist and others. This is useful to run after changing branches, to have a clean slate to work with.

npm run lint and npm run lint:fix

These scripts execute lint and lint:fix respectively, to all monorepo packages. Worth noting that there is a git hook in place that runs npm run lint for every git push. This check can be skipped using git push [command] --no-verify.

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 source files. The resulting files can be found at packages/<name>/dist.

npm run coverage

Runs whatever is on npm run test script, capturing testing 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 saves them 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. Differently from npm run lint, this command actually writes to files.

npm run test

Runs the package tests.

Note that the VM has several test scopes – refer to packages/vm/package.json for more info.

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.

Testing packages locally on other projects

There are some ways you can link this repository packages to other projects before publishing. You can symlink dependencies with npm link <package>, or install packages from the filesystem using npm install <folder>. But they are subject to some externalities and most importantly with how your package manager handles the lifecycle of packages during installs.

Note: Git references do not work with monorepo setups out of the box due to the lack of directory traversal on the syntax. E.g.:

npm install git@github.com:ethereumjs/ethereumjs-vm.git

One way to fetch packages remotely from GitHub before publishing is using gitpkg.now.sh.

But there’s a cleaner way to manage your dependencies using Verdaccio.

Install Verdaccio

Verdaccio is an npm registry and proxy that can be of great help to test packages locally. Check out their Getting Started guide.

Installs, hoists dependencies and builds packages

npm install

Publish monorepo packages to Verdaccio

lerna exec “npm publish –registry http://localhost:4873 –ignore-scripts”

Unpublish all monorepo packages from Verdaccio

lerna exec “npm unpublish $LERNA_PACKAGE_NAME –registry http://localhost:4873 –force”

Setup @ethereumjs scope to local Verdaccio server

npm config set @ethereumjs:registry http://localhost:4873

Teardown @ethereumjs scope to local Verdaccio server

npm config delete @ethereumjs:registry

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

Merge pull request


EthereumJS Monorepo - <a href=以太坊eth单一回购”>

EthereumJS Monorepo

EthereumJS Monorepo - <a href=以太坊eth单一回购”>EthereumJS Monorepo - <a href=以太坊eth单一回购”>

这最初是以太坊ethJS虚拟机存储库。在2020年第1季度,我们将其一些构建模块整合在一起,以简化开发。您可以在下面找到此存储库中包含的包。

🚧 请注意,主分支每天都会更新,要检查与特定包版本相关的代码,请参阅标记。

package npm issues tests coverage
EthereumJS Monorepo - <a href=以太坊eth单一回购”> @ethereumjs/客户端 <EthereumJS Monorepo> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
@ethereumjs/blockchain <EthereumJS Monorepo> @ethereumjs/公用img18标签标签 EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
<EthereumJS Monorepo> <EthereumJS Monorepo> @ethereumjs/tx @ethereumjs/vm <EthereumJS Monorepo>
EthereumJS Monorepo - <a href=以太坊eth单一回购”> <EthereumJS Monorepo> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
@ethereumjs/devp2p EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
@ethereumjs/ethash EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
merkle-patricia-tree EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
@ethereumjs/tx EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>
@ethereumjs/vm EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”>

覆盖率报告

详细版本见编解码器io

EthereumJS Monorepo - <a href=以太坊eth单一回购”>

包依赖关系

EthereumJS Monorepo - <a href=以太坊eth单一回购”>

开发快速启动

首先,通过运行:

git submodule init git submodule update

此monorepo使用Lerna,确保您拥有以太坊eth测试git子模块。它将本地包连接在一起,使开发变得更加容易。

TLDR:设置

npm install npm run build

TLDR:更新依赖项和(重新)链接包

npm run bootstrap npm run build

以上是最快速的设置方法。接下来有两组命令:项目特定命令和包特定命令。你可以在那里找到他们/包.json和/包/*/包.json分别是。下面是一个细分:

项目脚本-从存储库根运行

npm安装

添加根包中列出的依赖项。此外,它还执行下面描述的引导脚本,安装所有子包依赖项。

npm运行引导

安装所有子包的依赖项,并将它们链接起来以创建集成开发环境。

npm运行构建

默认情况下构建所有monorepo包。如果提供了一个作用域,它将只构建那个特定的包。

作用域示例,仅构建VM包:npm run build–scope@ethereumjs/VM构建所提供包依赖的所有本地包(例如:@ethereumjs/blockchain),并构建自身。

npm运行构建:树—-范围@以太坊eth/区块链blockchain线头:固定

如果没有提供范围,则运行npm构建:树,将生成所有子包。

删除根和包节点模块目录,以及其他生成的文件,如coverage、dist和其他文件。这对于在更改分支后运行非常有用,以便有一个干净的工作环境。

程序包脚本-从运行./packages/&lt;name&gt;

这些脚本执行lint和线头:分别固定,适用于所有monorepo包。值得注意的是,有一个git钩子,它为每次git推送运行npm run lint。可以使用git push[command]——no verify跳过此检查。

npm运行构建

⚠️ 重要提示:如果从包目录运行npm install,它将删除指向本地包的所有链接,并从npm中提取所有依赖项。仅从根目录运行npm install。

npm运行覆盖率

在这个存储库的每个包中都有一组相当标准化的命令。

使用TypeScript编译器构建源文件。结果文件可以在packages/&lt;name&gt;/dist中找到。

npm运行文档:生成

运行npm运行测试脚本上的任何内容,捕获测试覆盖率信息。最后,它将显示一个覆盖率表。其他报告可在packages/&lt;name&gt;/coverage/中找到。

npm运行皮棉

生成程序包文档并将其保存到./packages/&lt;name&gt;/docs。

npm运行线头:固定

根据ethereumjs config中定义的规则检查代码样式。

npm运行测试

根据规则修复代码样式。与npm run lint不同,这个命令实际上写入文件。

进一步

运行包测试。

清理节点单元模块

请注意,VM有多个测试范围-请参阅包/VM/包.json更多信息。

由于此项目由Lerna提供支持,因此您可以在全球范围内安装它以享受更多选项。有关其他命令,请参阅Lerna文档。

在其他项目上本地测试包

提升已启用,因此依赖项将移动到根节点u模块。lerna clean不会删除根节点模块,因此为了方便起见,可以使用项目脚本npm run clean。

  • npm install-glerna运行EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> @ethereumjs/客户端 <EthereumJS Monorepo> EthereumJS Monorepo - <a href=以太坊eth单一回购”> EthereumJS Monorepo - <a href=以太坊eth单一回购”> <EthereumJS Monorepo> @ethereumjs/公用img18标签标签 EthereumJS Monorepo - <a href=以太坊eth单一回购”>

    EthereumJS Monorepo - <a href=以太坊eth单一回购”>

    EthereumJS Monorepo - <a href=以太坊eth单一回购”> <EthereumJS Monorepo>

    EthereumJS Monorepo - <a href=以太坊eth单一回购”> <EthereumJS Monorepo> @ethereumjs/tx

    EthereumJS Monorepo - <a href=以太坊eth单一回购”><EthereumJS MonorepoEthereumJS Monorepo - <a href=以太坊eth单一回购”>

    EthereumJS Monorepo - <a href=以太坊eth单一回购”> @ethereumjs/vm <EthereumJS Monorepo> EthereumJS Monorepo - <a href=以太坊eth单一回购”> <EthereumJS Monorepo> EthereumJS Monorepo - <a href=以太坊eth单一回购”>

  • lerna run
  • lerna exec

安装Verdaccio

在发布之前,有一些方法可以将此存储库包链接到其他项目。您可以使用npm link&lt;package&gt;对依赖项进行符号链接,或者使用npm install&lt;folder&gt;从文件系统安装包;。但是它们会受到一些外部因素的影响,最重要的是包管理器在安装过程中如何处理包的生命周期。

安装,提升依赖项并生成包

注意:由于缺少对语法的目录遍历,Git引用不适用于monorepo开箱即用的设置。E、 g.:

npm安装git@github.com:以太坊ethJS/以太坊ethJS-虚拟机.git

在发布之前从GitHub远程获取包的一种方法是使用吉普克.now.sh.

但是有一种更干净的方法可以使用Verdaccio管理依赖项。Verdaccio是一个npm注册表和代理,对本地测试包非常有帮助。查看他们的入门指南。

npm安装

将monorepo包发布到Verdaccio

lerna exec“npm发布–注册表http://localhost:4873–忽略脚本“

取消将所有monorepo包从Verdaccio

lerna exec”npm unpublish$lernau PACKAGEu NAME–注册表http://localhost:4873—强制“

Setup@ethereumjs scope发布到本地Verdaccio服务器

npm config set@e注册http://本地主机:4873

将ethereumjs scope撕下到本地Verdaccio服务器

npm配置删除@eMJS:注册表

ethereumjs

查看我们的介绍EthereumJS的组织文档以及有关当前标准和最佳实践的信息。

许可证

如果您想加入我们的工作或改进图书馆,请查看我们的贡献指南。

EthereumJS

MIT

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

LICENSE

MIT

Merge pull request

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/20319.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计EthereumJS Monorepo – 以太坊单一回购

提供最优质的资源集合

立即查看 了解详情