> For the complete documentation index, see [llms.txt](https://www.0x1.academy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.0x1.academy/gei-kai-fa-zhe-de-zhi-nan/public-chain/shang.md).

# 上鏈

### 上鏈是將資料或交易記錄永久寫入區塊鏈的過程。一旦上鏈，資料就成為區塊鏈歷史的一部分，無法刪除或竄改。

***

## 什麼可以上鏈？

| 類型   | 範例         |
| ---- | ---------- |
| 交易記錄 | 轉帳、智能合約調用  |
| 數位資產 | NFT、代幣     |
| 雜湊指紋 | 文件存證、證明    |
| 智能合約 | DApp 程式碼   |
| 資料記錄 | 供應鏈追蹤、投票記錄 |

***

## 上鏈的意義

### 1. 不可竄改

上鏈的資料成為永久紀錄，沒有任何人能修改或刪除。

### 2. 可驗證

任何人都可以驗證上鏈資料的真實性和時間戳記。

### 3. 去中心化存證

不依賴任何中心化機構，資料由全網節點共同保管。

{% hint style="info" %}
**上鏈 ≠ 存檔**

上鏈不是把整份文件存到區塊鏈上（那太貴了）。通常是把文件的雜湊值（指紋）上鏈，用來證明「這份文件在某個時間點存在過」。
{% endhint %}

***

## 上鏈的成本

上鏈需要支付交易費（Gas），費用取決於：

| 因素   | 影響       |
| ---- | -------- |
| 資料大小 | 越大越貴     |
| 網路擁堵 | 越忙越貴     |
| 選擇的鏈 | 不同鏈費用差異大 |

### 不同鏈的上鏈成本比較

| 區塊鏈      | 典型交易費  |
| -------- | ------ |
| Ethereum | $1-50  |
| Polygon  | $0.01  |
| Solana   | $0.001 |
| Bitcoin  | $1-10  |

***

## 上鏈的應用場景

### 1. 版權存證

創作者將作品雜湊上鏈，證明創作時間和所有權。

### 2. 供應鏈追蹤

產品的每個環節都上鏈記錄，從原料到消費者全程可追溯。

### 3. 學歷認證

畢業證書的雜湊上鏈，用人單位可以驗證真偽。

### 4. 投票系統

投票記錄上鏈，確保透明且無法竄改。

***

## 延伸閱讀

* [創世區塊](/gei-kai-fa-zhe-de-zhi-nan/public-chain/genesis-block.md) — 第一個上鏈的區塊
* [智能合約](/zhi-neng-he-yue-de-shi-jie/smart-contract.md) — 上鏈的程式碼
* [分片](/gei-kai-fa-zhe-de-zhi-nan/public-chain/fen-pian.md) — 提高上鏈效率的技術

***

#### 參考資料

* [Ethereum Gas](https://ethereum.org/en/developers/docs/gas/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.0x1.academy/gei-kai-fa-zhe-de-zhi-nan/public-chain/shang.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
