這是之前寫的技術文,因為當時是用英文寫的,請容許我就不翻譯了 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!
免責聲明: 本篇文章僅為知識分享教學文,所有交易皆存在風險,尤其加密貨幣和相關合約商品屬於波動性高的產品, 請謹慎投資。本文不構成任何開戶建議,請謹慎選擇具有安全監管保障的交易所與券商。
對加密貨幣有興趣的讀者可以加入》Line 群組-漫談加密貨幣群(區塊鏈、加密貨幣交流)
合作工商
加密貨幣其實就像台股一樣,你可以享有開戶優惠,像是交易手續費折扣、開戶禮包等,不過取得方式卻不一樣。在台股,你可以親自和業務員談開戶的加碼優惠;但在幣圈,你必須透過推薦連結開戶才能享有優惠。
| 交易所 | 這間交易所適合做什麼操作? | 有什麼開戶的交易優惠? | 開戶推薦碼 (點擊複製) |
|---|---|---|---|
| 幣安 Binance | 現貨、合約交易,以及質押領息 | 最高 600 美金開戶禮包、免費 VIP 討論群入群資格 | OFYXKRTS |
| 派網 Pionex | 開網格天地單、抄底寶,用期現套利領高額利息 | 最高 2150U 交易金、免費使用多種量化跟單策略、免費 VIP 討論群入群資格 | RayskyVIP |
| 歐易 OKX | 老牌交易所,現貨、合約交易、註冊享限時盲盒優惠 | 最高 20000U 的萬元盲盒、免費 VIP 討論群入群資格 | taiwaninvite |
| Bitget | 跟單交易、合約交易 | 現貨交易限時 0 手續費、5005 鎂贈金、免費 VIP 討論群入群資格 | mqd3 |
| 拜必特 Bybit | 合約交易、 LaunchPad 認購、流動性挖礦 | 享 20% 手續費折扣(全網最高)、30050U 體驗金、免費 VIP 討論群入群資格 | RAYSKYVIP |
| BingX | 跟單、合約交易與實體福利,享受一百多間在地店家優惠 | 最高 5030 美金贈金、免費使用複製跟單策略、免費 VIP 討論群入群資格 | VFMXLA |
| 抹茶 MEXC | 掛單合約交易不需要手續費 | 享 10% 手續費折扣(全網最高)、最高 1000 美金交易贈金、免費 VIP 討論群入群資格 | mexc-rayskyVIP |
| Gate.io | 量化跟單、LaunchPad 認購 | 最高 6600U 萬元盲盒、免費 VIP 討論群入群資格 | gate-rayskyin |
| 綠葉 Bitfinex | 美元放貸,獲取 18~25% 的利息收入 | 享 6% 手續費折扣 | MkvZwqTRR |
| XREX | 加密貨幣美元出金可認列海外所得,且可用於國際匯款、跨境商業支付等 | 享 10% 手續費折扣 | RAYSKY10 |
| CoinW | 合約交易、網格交易、跟單交易 | 享 1650 開戶贈金 | 2716102 |
【精選專欄】
【其他區塊鏈知識文章】
- 區塊鏈教學:用白話文看懂比特幣與挖礦是什麼?
- 加密貨幣投資第一步:台灣最完整買賣 USDT 入金方式教學
- 新手加密貨幣教學:區塊鏈原理、避免詐騙、可靠交易所統整
- 區塊鏈教學:以太坊 Dapps 事前準備-如何在 Windows 作業系統上設定好開發環境?
- 區塊鏈的資安議題:常見的駭客攻擊有哪些?論文導讀《Exploring the Attack Surface of Blockchain: A Systematic Overview》
- 區塊鏈教學:利用 Windows 部署、開發 ERC-20 加密貨幣
- 區塊鏈知識:比特幣披薩日!第一筆比特幣交易
- The SandBox 是什麼?虛擬土地價值與應用,附帶土地購買教學詳解
- 區塊鏈介紹:PoS 機制是什麼?如何運作?有何風險?
- 公鏈什麼意思?又有哪些加密貨幣可以投資?
【訂閱、追蹤、更了解雷司紀的小道投資在做些什麼】
