Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install the ethernet development environment with one click of EthBox

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how EthBox installs the ethernet development environment with one click, which has a certain reference value, and interested friends can refer to it. I hope you will gain a lot after reading this article.

EthBox not only supports rapid development and verification using simulators, but also supports the use of standard node software to build private chain testing, or access public chain for deployment.

The current version of EthBox is 0.0.1 and is currently available only for the windows operating system.

Installation

Execute the ethbox-setup.exe startup installer that you downloaded locally:

Click the "accept" button to enter the installation directory and select:

Click the "install" button to start the installation process:

After the installation, you can see the EthBox icon on the desktop:

Start the simulator

Click the EthBox icon on the desktop to enter the EthBox environment:

Execute the ganache-cli startup simulator:

C:\ Users\ user > ganache-cli

The following results are displayed to indicate a successful startup:

Create a truffle project

Click the EthBox icon on the desktop again to enter the EthBox environment.

Create a project directory, and then execute truffle unbox webpack to initialize the project file:

C:\ Users\ user > md demoC:\ Users\ hubwiz\ demo > truffle.cmd unbox webpack

You will see the following results:

In Setting up... You will have to wait a while because you need to download the project dependency package from the network.

Run the truffle project

First modify the default truffle.js configuration file to change the node port to 8545-because the listening port for ganache-cli is 8545:

Module.exports = {networks: {development: {port: 8545}

Then modify the node URL in app/javascripts/app.js, and also change the port to 8545:

Window.web3 = new Web3 (new Web3.providers.HttpProvider ("http://localhost:8545"));

Now execute the truffle compile command to compile the contract:

C:\ Users\ user\ demo > truffle.cmd compile

There are some warnings during compilation, which can be ignored for the time being.

Then execute the truffle migrate deployment contract:

C:\ Users\ user\ demo > truffle.cmd migrate

The results are as follows:

During deployment, if you switch to the ganache window, you will see some transaction information-a deployment contract is also a transaction:

We're all set! You can start the web server:

C:\ Users\ user\ demo > npm run dev

This command performs memory packaging and starts a web server listening on port 8080:

Now, just visit http://localhost:8080!

Pay attention to this sentence:

You have 10000 META

This 10000 is taken from the chain (ganache-cli), so seeing this number means that your ethernet development environment has been deployed successfully!

Thank you for reading this article carefully. I hope the article "how to install the development environment of Ethernet Square with one click" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report