> 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* 中有一个测试版本，

而且每个版本都有不同的地址。 [你可以阅读每个合约的完整代码，因为它是区块链上的公开信息。例如，你可以在](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 的完整代码链接，这些可能有助于你构建自己的 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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
