如何在离线模式下运行混音项目?

发布于 2025-02-07 05:44:58 字数 670 浏览 2 评论 0 原文

最近,我试图在本地环境中运行混音项目 - 离线状态。 https://github.com/ethereum/ethereum/remix-project 您可以从此URL获取源代码。 下拉后,我在PC中安装了所有NPM模块,然后尝试在离线模式下运行该项目。 但是只有黑屏保留在http:// localhost:8080。

如果在线,它运行良好。

有什么解决方案吗?

“

Recently I tried to run the Remix-project in local environment - offline status.
https://github.com/ethereum/remix-project
You can get the source code from this url.
After pull down it, I have installed all of the npm modules in my pc, then I tried to run the project under the offline mode.
But only black screen remains on the http://localhost:8080.

If online, it works well.

Are there any solutions for it?

Online

Offline

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

青春如此纠结 2025-02-14 05:44:58

使用HardHat来编译本地

HardHat是一个开发环境,可以编译,部署,测试和调试您的以太坊软件。它可以帮助开发人员管理和自动化建立智能合约和DAPP过程固有的重复任务,并轻松地围绕此工作流引入更多功能。这意味着要以核心进行编译,运行和测试智能合约。

HardHat与Hardhat Network一起内置,这是一个专为开发设计的本地以太坊网络。它的功能侧重于实心调试,以堆栈跟踪,console.log()和显式错误消息失败。

Hardhat Runner是与HardHat互动的CLI命令,是一个可扩展的任务跑者。它围绕任务和插件的概念而设计。每次您从CLI运行硬汉时,您都可以运行一个任务。例如NPX HardHat编译正在运行内置编译任务。任务可以调用其他任务,从而允许定义复杂的工作流程。用户和插件可以覆盖现有任务,从而使这些工作流可自定义和扩展。

using hardhat for compile local

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software. It helps developers manage and automate the recurring tasks that are inherent to the process of building smart contracts and dApps, as well as easily introducing more functionality around this workflow. This means compiling, running and testing smart contracts at the very core.

Hardhat comes built-in with Hardhat Network, a local Ethereum network designed for development. Its functionality focuses around Solidity debugging, featuring stack traces, console.log() and explicit error messages when transactions fail.

Hardhat Runner, the CLI command to interact with Hardhat, is an extensible task runner. It's designed around the concepts of tasks and plugins. Every time you're running Hardhat from the CLI you're running a task. E.g. npx hardhat compile is running the built-in compile task. Tasks can call other tasks, allowing complex workflows to be defined. Users and plugins can override existing tasks, making those workflows customizable and extendable.

ゞ记忆︶ㄣ 2025-02-14 05:44:58

使用松露来编译本地。

这是说明。

1.安装松露

2.弥补您使用Visual Studio代码,并且您知道要操作Node.js,请安装Solidity插件的VS代码。

3.创建一个.sol文件并将您的程序粘贴在其中。

4.在VS代码中打开终端,类型

Truffle Init

  1. 将创建一个迁移子文件夹。在其下的迁移.sol文件中,将伪影名称更改为您的.sol文件名

  2. 在松露配置文件中,您会找到一个值得称赞的“开发”对象。不建议它,给出适当的端口号等

  3. 执行“松露编译”

  4. 执行“松露迁移”

  5. “ npm start”

  6. 休息你知道如何...

Use truffle for compiling local.

Here are the instructions.

1.Install truffle

2.Assuming you use Visual Studio Code and you know to operate node.js, install the solidity plugin for VS code.

3.Create a .sol file and paste your program in it.

4.Open the terminal in VS code, type

truffle init

  1. a migrations subfolder will be created. In the Migrations.sol file under it, change the artefact name to your.sol file name

  2. in the truffle configuration file, you will find a commended "development" object. Uncommend it, give appropriate port numbers etc

  3. execute "truffle compile"

  4. execute "truffle migrate"

  5. "npm start"

  6. rest you know how to...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文