---
title: "成為區塊鏈開發者：你需要知道的事"
description: "在區塊鏈上開發你需要知道的事"
---

# 成為區塊鏈開發者：你需要知道的事

想像一下你回到了 90 年代末，網際網路正要成為家喻戶曉的東西，而你有機會提早卡位。

假設你有機會成為 Yahoo 最早的 12 名員工之一，你會接受嗎？
以現在的眼光來看，你很可能會接受。

雖然我們無法回到過去，但幸運的是，對於站在科技創新最前線的人來說，仍然持續有絕佳的機會。說實話，我們現在正處於歷史上類似的時刻。

加密貨幣，以及像 DeFi（去中心化金融）、NFT（非同質化代幣）和 [DAO](https://www.alchemy.com/dapps/top/daos)（去中心化自治組織）這類基於區塊鏈的技術，在 2022 年我們做生意與互動的方式中，持續扮演重要角色。

數十億甚至上百億美元的投資資金正流入加密貨幣領域，而且沒有放緩的跡象。

以下僅是眾多正在打造 Web3 未來的新興公司中的幾個例子。

<EmbeddedTable
  table={{
    columns: [
      { key: "1", width: 200, title: "Layer", dataType: "object" },
      { key: "2", width: 200, title: "Category", dataType: "object" },
      { key: "3", width: 200, title: "Projects/Services", dataType: "object" },
    ],
    data: [
      {
        "1": { title: "<p>Decentralized Applications</p>", tooltip: "", icon: "" },
        "2": { title: "<p>DeFi</p>", tooltip: "", icon: "" },
        "3": { title: "<p>UNISWAP, AAVE, SUSHISWAP</p>", tooltip: "", icon: "" },
        id: 0,
      },
      {
        "1": { title: "<p>Decentralized Applications</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Identity & Auth.</p>", tooltip: "", icon: "" },
        "3": { title: "<p>ENS, METAMASK, ARGENT</p>", tooltip: "", icon: "" },
        id: 1,
      },
      {
        "1": { title: "<p>Decentralized Applications</p>", tooltip: "", icon: "" },
        "2": { title: "<p>NFTs</p>", tooltip: "", icon: "" },
        "3": { title: "<p>OPENSEA, NIFTY GATEWAY, RARIBLE</p>", tooltip: "", icon: "" },
        id: 2,
      },
      {
        "1": { title: "<p>Decentralized Applications</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Data</p>", tooltip: "", icon: "" },
        "3": { title: "<p>HANSEN, CHAINLINK, THE GRAPH</p>", tooltip: "", icon: "" },
        id: 3,
      },
      {
        "1": { title: "<p>Presentation Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Web3 Native Libraries</p>", tooltip: "", icon: "" },
        "3": { title: "<p>ETHER.JS, WEB3.JS, ALCHEMY WEB3</p>", tooltip: "", icon: "" },
        id: 4,
      },
      {
        "1": { title: "<p>Presentation Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Developer Environments</p>", tooltip: "", icon: "" },
        "3": { title: "<p>HARDHAT, TRUFFLE, BROWNIE</p>", tooltip: "", icon: "" },
        id: 5,
      },
      {
        "1": { title: "<p>Presentation Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>File Storage</p>", tooltip: "", icon: "" },
        "3": { title: "<p>IPFS, FILBASE, ARWEAVE</p>", tooltip: "", icon: "" },
        id: 6,
      },
      {
        "1": { title: "<p>Blockchain Interaction Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Data Access</p>", tooltip: "", icon: "" },
        "3": { title: "<p>SUPERNODE, BUILD, MONITOR, NOTIFY, APIS, NFT API</p>", tooltip: "", icon: "" },
        id: 7,
      },
      {
        "1": { title: "<p>Blockchain Interaction Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Self-Hosted Nodes</p>", tooltip: "", icon: "" },
        "3": { title: "<p>Self-Hosted Nodes</p>", tooltip: "", icon: "" },
        id: 8,
      },
      {
        "1": { title: "<p>Blockchain Interaction Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Block Explorers</p>", tooltip: "", icon: "" },
        "3": { title: "<p>SNOWTRACE, ETHERSCAN, POLYGONSCAN</p>", tooltip: "", icon: "" },
        id: 9,
      },
      {
        "1": { title: "<p>Network Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>EVM Blockchains</p>", tooltip: "", icon: "" },
        "3": { title: "<p>ETHEREUM, POLYGON, ARBITRUM, AVALANCHE, STARNET, CRONOS, OPTIMISM, ZK SYNC</p>", tooltip: "", icon: "" },
        id: 10,
      },
      {
        "1": { title: "<p>Network Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Non-EVM Blockchains</p>", tooltip: "", icon: "" },
        "3": { title: "<p>NEAR, FLOW, SOLANA, TERRA</p>", tooltip: "", icon: "" },
        id: 11,
      },
    ],
  }}
/>

根據加密資產價格追蹤網站 CoinGecko 的數據，全球加密貨幣的總市值已接近 2 兆美元（截至 2022 年上半年）。

<ImageBlock
  src="https://media.alchemy.com/1703830571-cryptocurrency-global-charts.png"
  alt="CoinGecko 圖表：全球加密貨幣市值逼近 2 兆美元"
  width={1600}
  height={688}
  caption="資料來源"
/>

但數字先講到這，這對你來說意味著什麼？

## 區塊鏈開發是不是一份好職業？

目前**最賺錢的職涯選擇之一**就是成為區塊鏈開發者。根據 Talent 的資料，[區塊鏈開發者平均年薪為 14.5 萬美元](https://www.talent.com/salary?job=blockchain+developer)。隨著對區塊鏈開發者的需求持續成長，現在正是投入的好時機。

身為區塊鏈開發者，你也處於能提早掌握許多機會的獨特位置，例如投資早期專案。

參與區塊鏈開發能幫助你辨識出可能成功的專案，並避開那些沒有實際動能的專案。你能即時看見什麼有用、什麼沒用，親手打造 Web3 的未來。

## 區塊鏈開發者需要知道什麼？

身為區塊鏈開發者，你需要具備的技能包括 Javascript、Python、[Solidity](https://www.alchemy.com/overviews/solidity) 等程式語言，以及區塊鏈、共識機制、雜湊函式、gas 等關鍵概念的知識。

如果你擅長學習新技術，骨子裡是個開發者，那麼在職業生涯上成功的機會多得是。但你需要一些技能，也需要理解區塊鏈開發中的一些關鍵概念，才能走完剩下的路。

以下是你應該重點掌握的一些基礎知識。

## 成為區塊鏈開發者需要具備的 5 項技能

### 1. 常見的區塊鏈程式語言

身為區塊鏈開發者，你很可能需要學習多種程式語言，但精通 Javascript 是無可迴避的。

Javascript 是一種多功能且可移植的語言，在區塊鏈生態系中被廣泛使用。舉例來說，你可以直接使用 Javascript 函式庫來建構與現有[智能合約](https://www.web3.university/article/a-developers-guide-to-securing-ethereum-smart-contracts)互動的[去中心化應用程式](https://www.alchemy.com/dapps/top/defi-dapps)。

如果你也精通其他語言會更好：例如 C++（傳奇性的 Bitcoin 就是用這種非常靈活的語言撰寫的）或 Python。後者在你想專注於後端開發與進階腳本撰寫時非常有用。

我們強烈建議你花時間研讀 [Ethereum Javascript](https://www.web3.university/article/web3-stack) 相關資源，幫助你快速上手。當然，你也應該投入時間學習 Solidity，我們在[這裡](https://www.web3.university/article/web3-stack)有深入介紹。

學習多種程式語言的樂趣還不僅止於此。

### 2. 區塊鏈技術的基礎

理解區塊鏈技術的基礎對區塊鏈開發者來說至關重要。閱讀 [Bitcoin](https://ethereum.org/en/whitepaper/) 與 [Ethereum](https://ethereum.org/en/whitepaper/) 的白皮書是必要功課。但你也需要理解幾個關鍵概念。

舉例來說，重要的是要知道，區塊鏈本質上是一種**分散式帳本技術（DLT）**。它是一種協定，讓資料庫得以在沒有中央管理者的情況下運作，資料區塊分散儲存在多個位置或實體上。區塊鏈當然可以用於加密貨幣，但用途遠不止於此。未來，我們很可能會持續看到各組織甚至各國家使用區塊鏈來舉行選舉、決定各種政府資金的用途。區塊鏈也提供了一種問責機制，因為大多數區塊鏈都是任何人都能查看的公開帳本。可以想見，隨著使用範圍愈來愈廣，這將如何影響政治與商業環境。雖然區塊鏈無法解決世界上所有的問題，但我們才剛開始了解它能提供的眾多強大應用場景。

### 3. 區塊鏈共識機制

區塊鏈與加密貨幣最關鍵的發明就是共識機制。這是一種讓沒有中央權威的去中心化點對點系統做出決策的程序，用來就要新增哪些交易、以何種順序新增到帳本上達成共識。
以下是一個簡單的例子：

<ImageBlock
  src="https://media.alchemy.com/1703830684-blockchain-consensus-mechanisms.png"
  alt="區塊鏈共識機制如何讓分散式節點保持一致的示意圖"
  width={737}
  height={663}
/>

Proof of Work 與 Proof of Stake

雖然如上所述，區塊鏈通常有多種共識機制，但它們都服務於同一個目標——確保帳本上的紀錄是可信的。

兩種最普遍的共識機制：

- [Proof of Work（PoW）](https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/)
- [**Proof of Stake（PoS）。**](https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/)

Proof of work 以驅動 Bitcoin 網路而聞名，指的是利用運算能力（透過礦工）來解決複雜的數學方程式，藉此確保區塊鏈既安全又準確的過程。

作為回報，投入資源解出這些方程式的礦工會獲得 Bitcoin 獎勵。

雖然 proof of work 驅動著 Bitcoin，但事實證明它相當耗能，這也是許多新的區塊鏈（如 Solana）試圖避免的問題。話雖如此，採用 proof of work 的區塊鏈往往具有高度的安全性，並提供一種去中心化的方式來驗證網路上的交易。

另一方面，proof of stake 是 proof of work 的替代方案，能源成本明顯較低。Proof-of-Stake 不是靠消耗能源來驗證交易，而是使用金錢懲罰機制來確保驗證者行為正確。

「_能源消耗是這兩種共識機制的一大差異。由於 proof-of-stake 區塊鏈不需要礦工花費電力去進行重複的運算（彼此競爭解出同一道題目），proof of stake 讓網路能以顯著更低的資源消耗運作，_」[Coinbase 寫道](https://www.coinbase.com/learn/crypto-basics/what-is-proof-of-work-or-proof-of-stake#:~:text=In%20proof%20of%20work%2C%20the,in%20the%20network%27s%20best%20interests.)。

Ethereum 原本是以 proof of work 啟動，現在則已改用 Proof-of-Stake。

以下進一步比較這兩種共識機制。

<EmbeddedTable
  table={{
    columns: [
      { key: "1", width: 200, title: "Proof of Work", dataType: "object" },
      { key: "2", width: 200, title: "Proof of Stake", dataType: "object" },
    ],
    data: [
      {
        "1": { title: "<p>Proof of work is a requirement to define an expensive computer calculation, also called mining</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Proof of stake, the creator of a new block is chosen in a deterministic way, depending on its wealth, also defined as stake.</p>", tooltip: "", icon: "" },
        id: 0,
      },
      {
        "1": { title: "<p>A reward is given to the first miner who solves each blocks problem.</p>", tooltip: "", icon: "" },
        "2": { title: "<p>The PoS system there is no block reward, so, the miners take the transaction fees.</p>", tooltip: "", icon: "" },
        id: 1,
      },
      {
        "1": { title: "<p>Network miners compete to be the first to find a solution for the mathematical problem</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Proof of Stake currencies can be several thousand times more cost effective.</p>", tooltip: "", icon: "" },
        id: 2,
      },
    ],
  }}
/>

<EmbeddedTable
  table={{
    columns: [
      { key: "1", width: 200, title: "Aspect", dataType: "object" },
      { key: "2", width: 200, title: "PoS (Proof of Stake)", dataType: "object" },
      { key: "3", width: 200, title: "PoW (Proof of Work)", dataType: "object" },
    ],
    data: [
      {
        "1": { title: "<p>Full Name</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Proof of Stake</p>", tooltip: "", icon: "" },
        "3": { title: "<p>Proof of Work</p>", tooltip: "", icon: "" },
        id: 0,
      },
      {
        "1": { title: "<p>How It Works</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Owners of the cryptocurrency can stake their coins, then the protocol selects a validator who adds a new block of transactions and earns rewards.</p>", tooltip: "", icon: "" },
        "3": { title: "<p>The first miner to solve the puzzle (finding a target hash) gets to add a block of transactions and earn rewards.</p>", tooltip: "", icon: "" },
        id: 1,
      },
      {
        "1": { title: "<p>Energy Usage</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Low</p>", tooltip: "", icon: "" },
        "3": { title: "<p>High</p>", tooltip: "", icon: "" },
        id: 2,
      },
      {
        "1": { title: "<p>Equipment & Resources Required</p>", tooltip: "", icon: "" },
        "2": { title: "<p>PoS doesn't require validators to purchase specialized equipments or to solve complex equations.</p>", tooltip: "", icon: "" },
        "3": { title: "<p>PoW requires hardwares and energy, because mining capacity depends largely on a miner's computational power.</p>", tooltip: "", icon: "" },
        id: 3,
      },
    ],
  }}
/>

網路上有[許多很棒的資源](https://www.youtube.com/watch?v=3QCykHU89To)可以幫助你理解這兩種共識機制的基礎知識，我們強烈建議你花時間研讀。

當然，隨著加密貨幣與區塊鏈持續演進，未來勢必會有[更多新的共識機制被創造並投入使用](https://www.youtube.com/watch?v=3QCykHU89To)。

### 4. 雜湊函式

除了共識機制之外，你還需要理解雜湊函式。

[雜湊函式](https://www.youtube.com/watch?v=jmtzX-NPFDc)被用來將新交易寫入區塊鏈，並確保編碼的資料是安全的。

雜湊運算是透過數學函式，將任意輸入的資料轉換成固定長度字串的操作。簡單來說，這代表一段文字會透過演算法轉換成一組固定的數字與字母組合。

這些函式最終確保了區塊鏈的不可竄改性——維持交易永久紀錄的能力。但這也正是為什麼區塊鏈開發比在中心化生態系中撰寫程式要困難一些。

設計這些協定需要花很長時間，因為你必須做到近乎完美。理論上，程式碼上傳後，除了極少數例外，你幾乎無法再修改。

我們建議你盡量多參加線上課程，以更深入理解這項技術。

入門推薦：

- 普林斯頓大學提供一門很棒的[加密貨幣免費課程](https://www.coursera.org/learn/cryptocurrency)。
- 麻省理工學院也有[一些很棒的課程](https://www.youtube.com/playlist?list=PLUl4u3cNGP63UUkfL0onkxF6MYgVa04Fn)。
- Vitalik Buterin（Ethereum 共同創辦人）的[這場演講](https://www.youtube.com/watch?v=gjwr-7PgpN8)也對區塊鏈的一些技術層面做了很好的說明與介紹。

除了影片講座與課程之外，也有一些不錯的書籍。

- [The Basics of Bitcoins and Blockchains by Antony Lewis](https://www.amazon.com/dp/B08RWTV6BW/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1)
- [The Blockchain Developer by Elad Elrom](https://www.amazon.com/Blockchain-Developer-Implementing-Distributed-Blockchain-based/dp/1484248465)
- [Cryptoassets by Chris Burniske and Jack Tatar](https://www.amazon.com/dp/B0743MPV9R/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1)

這份清單當然並不完整，但如果你閱讀並實踐上述內容，你就已經在成為區塊鏈開發者的路上邁出了紮實的一步。

### 5. Gas、礦工，以及執行智能合約的成本

<ImageBlock
  src="https://media.alchemy.com/1703830895-gas-miners-cost-of-running-smart-contracts.png"
  alt="Ethereum gas 費支付給礦工以執行智能合約的示意圖"
  width={881}
  height={465}
/>

身為區塊鏈開發者，你也需要理解「gas」在 [Ethereum 生態系](https://www.alchemy.com/dapps/ecosystem/ethereum)中扮演的角色。

Ethereum Virtual Machine（所有交易在運算上執行的地方）的空間非常有限。在任何時間點，對這有限的運算空間供給，都存在著不同程度的需求。

這裡持續進行著一場拍賣：使用者可以付費購買「gas」，也就是 Ethereum 上的運算能力單位。

身為使用者，[了解如何節省 gas 費用](https://newsletter.banklesshq.com/p/6-ways-to-save-on-ethereum-gas-fees?s=r)對你的加密貨幣資產組合更有利。讓 gas 更划算，同時也公平地支持礦工，是加密貨幣領域許多開發者的優先目標。

## 如何與區塊鏈開發者社群建立聯繫？

與區塊鏈開發者社群建立聯繫最好的方式，是加入 Discord 伺服器與社群、在 Twitter 上與 web3 開發者及意見領袖互動，並參與 web3 黑客松與研討會。

眾所皆知，會不會寫程式將是決定區塊鏈開發者能否成功的最大因素，但也有很多不需要寫一行程式碼就能做的事。

區塊鏈創作者社群主要聚集在網路上的兩個地方：Discord [和 Twitter](http://www.meetbunch.com/the-twitter-guide)。最重要的討論都在那裡進行，你也能在那裡建立人脈、尋找工作機會。

與傳統職場不同，你不需要在 LinkedIn 上放一張正經八百的西裝照。在 Web3 的世界裡，最重要的是你的實質知識——你在區塊鏈領域累積的「血汗股權」，主要來自實作經驗、追蹤加密貨幣意見領袖、上課、參加黑客松等等。

如果你發布關於加密貨幣與區塊鏈的有趣內容，即使你用一張搞笑圖片當頭像、以匿名身分出現，你也能認識到人、被人注意到。

以下是一些你應該加入的優質 Discord 伺服器與社群：

- [Ethereum.org](https://twitter.com/VitalikButerin)
- [Solidity](https://zpl.in/discord)
- [CryptoDevHub](https://discord.gg/FRVxrbFKT9)
- [Openzeppelin](https://zpl.in/discord)
- [Bankless](https://discord.com/invite/mMGsVgd)
- [Alchemy](https://discord.com/invite/mMGsVgd)

以下是一些值得追蹤的頂尖加密貨幣與區塊鏈意見領袖：

- [Vitalik Buterin](https://twitter.com/VitalikButerin)
- [Arianna Simpson](https://twitter.com/ariannasimpson)
- [Elizabeth Stark](https://twitter.com/LexSokolin)
- [Lex Sokolin](https://twitter.com/LexSokolin)
- [Brian Armstrong](https://twitter.com/brian_armstrong)
- [Laura Shin](https://twitter.com/laurashin)
- [Charlie Lee](https://twitter.com/SatoshiLite)
- [Roger Ver](https://twitter.com/rogerkver)
- [Tyler Winklevoss](https://twitter.com/tyler)
- [Andreas M. Antonopoulos](https://twitter.com/aantonop)
- [Anthony Pompliano](https://twitter.com/APompliano)

此外，雖然不見得人人都愛，但參加研討會能是與人當面建立聯繫、發展職業關係的好方法。我們不可能一一列出所有研討會，但這裡有一份[豐富的清單可供你參考](https://crowdcreate.us/best-crypto-blockchain-conference-events-in-2022/)。

## 你正在成為未來的區塊鏈開發者

無論你是剛接觸程式設計的新手，還是想提升自己的區塊鏈職涯，都無法迴避一件事——你需要投入實際的努力。
話雖如此，加密貨幣與區塊鏈技術正在改變金融、商業、文化等各個領域，機會可說是無窮無盡。

依照這份指南中的建議與提示去做，會讓你在成為站在這場全球變革最前線的開發者這條路上，走得更加穩健。Alchemy 是 Web3 領先的節點服務供應商之一。我們的其他產品還包括 [Enhanced APIs](https://www.alchemy.com/enhanced-apis)、[Notify API](https://www.alchemy.com/notify)，以及我們最新推出的 [NFT API](https://www.alchemy.com/nft-api)。
