基于区块链的毕业设计Hardhat plugin for Ethernal – Ethernel的安全帽插件

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Hardhat plugin for Ethernal – Ethernel的安全帽插件 是一篇很好的国外资料

Hardhat plugin for Ethernal

Ethernal is a block explorer for EVM-based chains. You can use it with your local chains (the Hardhat network for example), or for chains deployed on remote servers.

It allows you to interact with contracts by automatically generating an UI for all read/write methods. You can also read contract variables in any blocks.

To use Ethernal, you need to synchronize blocks, transactions & artifacts with the dashboard. This plugin allows you to easily do that instead of having to run the CLI separately.

If you are looking for more detailed doc about Ethernal: https://doc.tryethernal.com

Installation

Add hardhat-ethernal to your package.json, and run npm install or yarn

Synchronize blocks & transactions

In your hardhat-config.jsfile, require the plugin:

require('hardhat-ethernal');

That’s it! Blocks and transactions will now be synchronized.

Options

It’s possible to disable the synchronization by setting ethernalSync to false on the hre object.

You can also specify which workspace you want to synchronize blocks & transactions to (default to the last one used in the dashboard).

By default, transactions will be traced using experimentalAddHardhatNetworkMessageTraceHook, showing CALLx and CREATEx operations in the dashboard. You can disable this feature with the ethernalTrace flag.

extendEnvironment((hre) => {     hre.ethernalSync = true;     hre.ethernalWorkspace = 'Workspace';     hre.ethernalTrace = false; });

Synchronize artifacts

In your deploy script, first require the plugin:

const ethernal = require('hardhat-ethernal');

Then, push your artifacts to Ethernal, after deploying your contract:

/! The name parameter needs to match the name of the contract

const Greeter = await hre.ethers.getContractFactory("Greeter"); const greeter = await Greeter.deploy("Hello, Hardhat!"); await hre.ethernal.push({     name: 'Greeter',     address: greeter.address });

The following fields will be synchronized:

  • contractName
  • abi
  • ast
  • source

用于Ethernel的Hardhat插件

Ethernal是基于EVM的链的块资源管理器。您可以将它用于本地链(例如Hardhat网络),也可以用于部署在远程服务器上的链

它允许您通过为所有读/写方法自动生成UI来与契约交互。您还可以读取任何块中的契约变量

要使用Ethernal,需要同步块、事务和;仪表板上的工件。这个插件允许您轻松地完成这项工作,而不必单独运行CLI

如果您正在寻找有关Ethernal的更详细的文档:https://doc.tryethernal.com

安装

将hardhat ethernal添加到package.json,并在hardhat-config.jsfile中运行npm install或yarn,需要插件:

同步块&事务

就是这样!块和事务现在将同步

require('hardhat-ethernal');

可以通过在hre对象上将ethernalSync设置为false来禁用同步

选项

您还可以指定要同步块的工作区&事务到(默认为仪表板中使用的最后一个事务)

默认情况下,将使用experimentalAddHardhatNetworkMessageTraceHook跟踪事务,在仪表板中显示CALLx和CREATEx操作。您可以使用ethernalTrace标志禁用此功能

在部署脚本中,首先需要插件:

extendEnvironment((hre) => {     hre.ethernalSync = true;     hre.ethernalWorkspace = 'Workspace';     hre.ethernalTrace = false; });

同步工件

然后,在部署契约后,将工件推送到Ethernal:

const ethernal = require('hardhat-ethernal');

/!name参数需要与合同的名称匹配

将同步以下字段:

const Greeter = await hre.ethers.getContractFactory("Greeter"); const greeter = await Greeter.deploy("Hello, Hardhat!"); await hre.ethernal.push({     name: 'Greeter',     address: greeter.address });

The following fields will be synchronized:

  • 合同名称
  • abi
  • ast

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

www.interchains.cc

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

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

提供最优质的资源集合

立即查看 了解详情