這是之前寫的技術文,因為當時是用英文寫的,請容許我就不翻譯了 XD 如果真的看不懂英文,可以下載 Chrome 的 Google 翻譯外掛,會有助於理解。本篇目的是讓 Windows 作業系統的使用者,能夠先設定好以太坊 Dapps 的開發環境,以利後續的開發部署。
目錄
Introduction
If you’re thinking of developing decentralized applications on blockchain, the Ethereum Dapps are a good starting.
In this article, I will illustrate the steps you need to follow to setup your Ethereum Dapps development environment for Windows OS with necessary dependencies before developing your first Dapps.
My OS is Windows10(x64) for the following environment construction.
Step 1. Install node.js and npm
npm (i.e., Node Package Manager) is a package manager for JavaScript, and it is the default package manager for Node.js (a JavaScript runtime environment).
Since that you need to install the necessary dependencies and environments of Ethereum Dapps through npm, the first step is to install node.js.


If you have it installed, open the terminal (command prompt) and type command:
>> npm // the command used to install in the following steps
The successful installation looks like this:


Step 2. Install Ganache
Ganache will simulate a local blockchain nodes environment on your device for building such Ethereum applications. It will give you 10 free accounts by default, and each account has 100 fake ethers for testing/deploying purposes.
There are two version for Ganache:
- GUI version (recommend)
- CLI verision
For a beginner, I recommend to install Ganache-GUI version for easy and friendly interface. You can install it from here
If you have already been a developer, you can use CLI version for quick development. The Ganache-CLI installation commands are showed below:
>> npm install -g ganache-cli //install ganache-cli


For testing whether Ganache-CLI is installed successful or not, you can type commands below, and the system should return such version inforamtion:
>> ganache-cli --version // checking ganache installationGanache CLI v6.1.6 (ganache-core: 2.1.5)


Step 3. Install Solidity Compiler
Solidity is the core programming language for developing Ethereum Dapps.
Before using a programming language, you should install it’s compiler first:
>> npm install -g solc


>> solcjs --version (驗證是否安裝成功)


Step 4. Install Truffle
Truffle is the core development environment and testing framework for building Ethereum Dapps easily.
It’s tools that asset pipeline for blockchains using the Ethereum Virtual Machine (EVM), and aims to make life as a developer easier, especially for smart contracts manipulation.
Use the commands in the prompt for installing Truffle:
>> npm install -g truffle // install Truffle
>> truffle version // Check Truffle installation


Step 5. Install web3
>> npm install -g web3


>> node -p 'require("web3")'


Step 6. Install webpack
>> npm install -g webpack // install webpack
>> webpack -v // check webpack installation
>> npm install -g webpack-cli // install webpack-cli






Done!
After the above six steps, you have already prepared an environment for developing Ethereum Dapps on Windows OS.
If you can’t wait to build up your first Dapps, the following article will demonstrate “How to deploy your first ERC-20 smart contracts (cryptocurrency) to Ethereum Testnets!”
Please enjoy it, and feel free to give any comment and feedback!
對投資人來說,加密貨幣是不同於傳統金融(股票、外匯、黃金)、一種新型態的投資資產,因此門檻相對來說也較高。
建議想投入這個市場,先好好花時間來研究背後相關的知識,以及多看網路上的資源文章,充實自己對加密貨幣的認知藍圖。
如果是煩惱該選擇哪間加密貨幣交易所,我可以提供自己的經驗作參考:
- 幣安 Binance:我利用來現貨交易、買幣賣幣投資、質押領幣利息…等用途【幣安系列文】
- 派網 Pionex:我利用來開設網格天地單、放幣期限套利領高額利息【派網系列文】
- FTX 交易所:我利用來購買股權通證(用加密貨幣買美股和 Pre-IPO 股票)【 FTX 系列文】
- Gate.io:我利用來買平台幣 GT、小幣交易,提前布局尚未爆發的潛力項目 【Gate.io 系列文】
- Cabital:適合被動收入,透過儲蓄加密貨幣領到 12-15% 的利息【Cabital 系列文】
- KuCoin 庫幣:我利用閒幣賺息將手中閒置貨幣來收取利息、享有被動收入【KuCoin系列文】
當然不只有這些選擇,你可以再自行做功課研究,挑選適合自己的交易所,但務必留意安全性!
免責聲明: 本篇文章僅為知識分享教學文,所有交易皆存在風險,尤其加密貨幣和相關合約商品屬於波動性高的產品, 請謹慎投資。本文不構成任何開戶建議,請謹慎選擇具有安全監管保障的交易所與券商。
對加密貨幣有興趣的讀者可以加入》Line 群組-漫談加密貨幣群(區塊鏈、加密貨幣交流)
【精選專欄】
【其他區塊鏈知識文章】
- 區塊鏈教學:用白話文看懂比特幣與挖礦是什麼?
- 加密貨幣投資第一步:台灣最完整買賣 USDT 入金方式教學
- 新手加密貨幣教學:區塊鏈原理、避免詐騙、可靠交易所統整
- 區塊鏈教學:以太坊 Dapps 事前準備-如何在 Windows 作業系統上設定好開發環境?
- 區塊鏈的資安議題:常見的駭客攻擊有哪些?論文導讀《Exploring the Attack Surface of Blockchain: A Systematic Overview》
- 區塊鏈教學:利用 Windows 部署、開發 ERC-20 加密貨幣
- 區塊鏈知識:比特幣披薩日!第一筆比特幣交易
- The SandBox 是什麼?虛擬土地價值與應用,附帶土地購買教學詳解
- 區塊鏈介紹:PoS 機制是什麼?如何運作?有何風險?
- 公鏈什麼意思?又有哪些加密貨幣可以投資?
【訂閱、追蹤、更了解雷司紀的小道投資在做些什麼】