# 1. XDC IDE 环境配置

## 1. 新建 XDC 项目

首先进入  [ChainIDE](https://chainide.com/)  的入口页面，点击 Code Smarter。

<figure><img src="/files/zwindB8HvqIBe9HFtfDh" alt=""><figcaption></figcaption></figure>

这里会选择你的登录方式，有 Github 和 Guest 两种。教程中选择 GIthub 登录，因为后面 Sandbox 的使用必须是采用 GIthub 登录的用户才能使用。

<figure><img src="/files/SrRDpJm8bsxZId30IWFV" alt=""><figcaption></figcaption></figure>

点击 New Project。

<figure><img src="/files/On5bcr861KD2rK3746zl" alt=""><figcaption></figcaption></figure>

出现一个弹窗，在弹窗的左侧选择 XDC，右侧选择一个项目模板创建一个 XDC 项目。

<figure><img src="/files/7k0WcTDSt1FzfaMnY2uc" alt=""><figcaption></figcaption></figure>

## 2. 配置钱包

XDC IDE 提供了对 Metamask 和 XDCPay 2.0 两种钱包的支持。但是请注意 Metamask 和 XDCPay 是不兼容的，两种钱包同时存在时，只会唤醒 Metamask。

### I. Metamask

> Metamask 官方下载网址: <https://metamask.io/>&#x20;

### II. XDCPay 2.0

> XDCPay 2.0 官方 Chrome 商店地址：<https://chrome.google.com/webstore/detail/xdcpay-20/iidmfamdbddcbjmemafekkohbnfiblhp>

钱包安装完成后，刷新页面。

<figure><img src="/files/FhoRGNnyB6lePdKAzR6x" alt=""><figcaption></figcaption></figure>

点击右上角的 connect Wallet 按钮, 选择 Injected Web3 Provider, 即可选择相关钱包连接。

<figure><img src="/files/cXbPMZRUEUBW36vH2B4t" alt=""><figcaption></figcaption></figure>

Metemask 用户可以根据提示，将钱包切换到 XDC 主网/测试网。

<figure><img src="/files/VVQo1NG8FwczYYLx07gb" alt=""><figcaption></figcaption></figure>

XDC Pay 用户则需在钱包中进行网络切换。

<figure><img src="/files/NzGp9Sc0MRx3DipM9FNQ" alt=""><figcaption></figcaption></figure>

用户可以在此 <https://faucet.apothem.network/> 开头的地址来领取测试币。（如果你的 metamask 的地址为：0x82825C3fa24116F6ED719dd1e820DBD952c4D237，那么此处你需要填入：xdc82825C3fa24116F6ED719dd1e820DBD952c4D237）


---

# Agent Instructions: 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://chainide.gitbook.io/chainide-chinese/chainide/1.-ethereum-ide-2/ethereum.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.
