# 前端合约部署工具

## Quick Start

### 下载工具

进入github，clone对应仓库

```
git clone git@github.com:relationlabs/sbt-deployment-utils.git
```

### 安装相关依赖

```
yarn
```

### 运行项目

```
yarn dev
```

运行成功后，可以在浏览器输入地址<http://localhost:3000>项目

## 合约部署

### 通过metamask登录

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

### 选择合约要部署的链

这里以Polygon为例

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

### 创建新的SBT合约并进行部署

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

#### 合约的部署流程包括：1.SBT和Verification合约的部署 2. 初始化SBT合约 3. 初始化Verification合约 4. 添加百名单 5. Mint SBT （后续的这些操作需要保证钱包里有足够的gas费）

#### 1. 部署合约

部署SBT合约和对应的Verification合约

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

#### 2. 初始化SBT合约

合约部署成功后，可以看到对应的合约地址，然后就可以进行SBT的初始化步骤了

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

在初始化SBT时，需要根据项目需要填写相应SBT的属性，这里以TestSBT作为例子

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

#### 3. 初始化Verification合约

根据项目需求，填写对应Object名称，这里以Token2049作为例子

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

#### 4. 添加白名单

指定可以mint SBT的地址，支持批量添加

<figure><img src="/files/2df8B7BYX819045V9lKz" alt=""><figcaption></figcaption></figure>

#### 5. Mint SBT

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


---

# 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://relationlabs.gitbook.io/semantic-sbt/semanticsbt-zh/untitled/qian-duan-he-yue-bu-shu-gong-ju.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.
