# 1. BNB Chain IDE 环境配置

## 1. 新建 BNB Chain 项目

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

<figure><img src="https://2772835953-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZ6_j0WUFnBhwIdP3LR%2Fuploads%2F8m0BC6qpJ3h2fRcMyYWm%2Fimage.png?alt=media&#x26;token=79272b7a-f50a-4647-8da6-521bc2c13526" alt=""><figcaption></figcaption></figure>

这里会选择你的登录方式，有 Github 和 Guest 两种。（选择 GIthub 登录才可使用 Sandbox 功能）

<figure><img src="https://2772835953-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZ6_j0WUFnBhwIdP3LR%2Fuploads%2FbGSUnbCk4Ir9LFfSx7ze%2Fimage.png?alt=media&#x26;token=d7e2ab6b-9b6f-4f26-bfd6-5bacfa7051eb" alt=""><figcaption></figcaption></figure>

点击 New Project 按钮。

<figure><img src="https://2772835953-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZ6_j0WUFnBhwIdP3LR%2Fuploads%2F9FauFUMhpRGKHOAmEOyv%2Fimage.png?alt=media&#x26;token=2674f3f6-a8b2-4708-9532-a6d4cf2ccd4b" alt=""><figcaption></figcaption></figure>

出现一个弹窗，在弹窗的左侧选择 BNB Chain，再点击一个项目模板创建项目。

<figure><img src="https://2772835953-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZ6_j0WUFnBhwIdP3LR%2Fuploads%2FSxPi5g8flqelnsZf5IX5%2Fimage.png?alt=media&#x26;token=b7ad544b-deba-4e50-b6c7-516912db6e89" alt=""><figcaption></figcaption></figure>

## 2. 配置钱包

通过 Metamask 可以轻松的连接到 BNB Chain，以下是 Metamask 的配置教程。

**步骤 1: 安装 MetaMask 扩展**

1. 打开你的浏览器（推荐使用 Google Chrome 或 Mozilla Firefox）。
2. 访问 <https://metamask.io/>
3. 点击 "下载" 按钮，然后选择适用于你的浏览器的版本。
4. 安装 MetaMask 扩展，并按照提示设置密码。

**步骤 2: 创建或恢复账户**

1. 安装完 MetaMask 后，点击浏览器右上角的 MetaMask 图标。
2. 如果你没有 MetaMask 账户，选择 "创建账户"。如果你已经有账户，选择 "导入账户"（如果需要从已有的助记词或私钥导入）或 "导入使用钱包"（如果需要从其他钱包导入）。
3. 如果你是新用户，遵循创建账户的步骤，记得安全地备份你的助记词。

**步骤 3: 探索 MetaMask 界面**

1. 一旦账户创建成功，你将看到 MetaMask 的主界面。这里你可以查看余额、添加资产、查看交易历史等。

**步骤 4: 连接到** BNB Chain **网络**

1. 在下一章节会告诉您如何连接到主网和测试网。

**步骤 5: 获取测试代币**

1. 水龙头是获取测试代币的地方。请使用它们确保您的钱包拥有足够的代币来支付部署和交易费用。

可以在以下链接中领取测试代币。

<table><thead><tr><th width="231">Network</th><th width="486">LINK</th><th data-hidden>AMOUNT</th><th data-hidden></th></tr></thead><tbody><tr><td>BNB Chain Testnet</td><td><a href="https://testnet.bnbchain.org/faucet-smart">https://testnet.bnbchain.org/faucet-smart</a></td><td></td><td></td></tr></tbody></table>


---

# 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-1/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.
