> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/qu-kuai-lian/create-a-dapp.md).

# 创建 dApp

创建你自己的去中心化应用的参考资料

你可以创建自己的去中心化应用（dApp），以与 Decentraland 的智能合约进行交互，并以更复杂、更友好的方式展示其功能。

## 什么是 dApp

去中心化应用，或 dApp，是运行在分布式点对点网络上，而不是运行在中心服务器上的应用。

在区块链语境中，dApp 使用智能合约，可能还会使用 P2P 网络，而不是 Web API 服务。dApp 也可能提供前端，并临时缓存来自区块链的信息，但其输出最终会反映在链上。

参见 [本网站](https://blockchainhub.net/decentralized-applications-dapps/) 以获取关于 dApp 的更完整概述。

## Decentraland 智能合约

Decentraland 编写并维护了多个智能合约，这些合约与 LAND 和 MANA 代币进行交互。

LAND 和 MANA 代币本身由 *LANDregistry* 和 *MANAtoken* 这些合约分别定义。列表中还包括一些更具体的合约，例如将多个地块创建为一个地产，或对地块进行抵押。

* [Decentraland 智能合约](https://contracts.decentraland.org/addresses.json)：你可以找到我们每个合约及其地址的完整列表。

请注意，每个合约在 *主网* 上都有一个生产版本，并在 *Sepolia* 上都有一个测试版本，而且每个版本的地址都不同。

你可以阅读每个合约的完整代码，因为它是区块链上的公开信息。例如，你可以在 [Etherscan](https://etherscan.io/contractsVerified) 上按名称查找该合约并阅读其内容。

## dApp 脚手架代码

* [脚手架代码](https://github.com/decentraland/dapp-boilerplate)：这份脚手架代码可以作为构建你自己的 dApp 的起点。请注意，这个仓库已归档且不再维护，因此请将其视为参考，而不是最新模板。

## 辅助库

在内部构建我们自己的 dApp 时，我们整理了一些你也可能会觉得有用的辅助库。

* [Decentraland-dapps](https://github.com/decentraland/decentraland-dapps)：这是一个更高层的库，包含 dApp 常用模块，并被 Decentraland 自己的应用程序积极使用。
* [Decentraland UI](https://ui.decentraland.org/)：这个库包含一组可复用的 UI 元素，这些元素被包含在 Decentraland 的项目中。
* [Decentraland-eth](https://github.com/decentraland/decentraland-eth)：这是一个底层库，包含与以太坊区块链交互的实用函数。请注意，这个仓库已归档且不再维护。

## 示例 dApp

下面是我们围绕 Decentraland 构建的几个 dApp 的完整代码链接，这些可能会帮助你构建自己的应用：

* [Gate](https://github.com/decentraland/gate)：这个基础 dApp 会创建一个邀请 NFT，该 NFT 曾在 Decentraland 处于封闭测试阶段时使用。早期，持有这个 NFT 的白名单玩家是唯一能够进入元宇宙的人。
* [市场](https://github.com/decentraland/marketplace)：这是运行 Decentraland 的完整应用程序 [市场](https://market.decentraland.org/)。为了让它运行更快，它需要一个数据库和一个连接到以太坊网络的后端服务器，以创建包含 LAND 信息的索引。

## dApp 测试框架

在将你的 dApp 投入生产环境之前，我们建议先进行测试。

* [Dappeteer](https://github.com/decentraland/dappeteer)：我们搭建了这个框架，帮助你对 dApp 运行测试。请注意，这个仓库已归档且不再维护。

## Decentraland 智能合约

在下面的链接中，你可以找到与 Decentraland 生态系统相关的一系列以太坊智能合约。该列表包括主网以及其他以太坊测试网络上的合约。

[contracts.decentraland.org](https://contracts.decentraland.org/links)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/qu-kuai-lian/create-a-dapp.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
