> For the complete documentation index, see [llms.txt](https://docs.chiliz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chiliz.com/jp/kaihatsu/kihon/smart-contract-deploy/thirdweb-deploy.md).

# thirdweb でデプロイする

[Thirdweb](https://thirdweb.com/) は、ブロックチェーンアプリの構築とデプロイを簡素化するツール、SDK、そして smart contract テンプレートを提供しています。

Thirdweb は、[Chiliz Chain Mainnet](https://thirdweb.com/chiliz-chain) や [Spicy Testnet](https://thirdweb.com/spicy-chain) を含む、ほとんどの EVM ベースのチェーンに対してサービスを提供しています。

thirdweb のツールを使って Chiliz Chain に contract をデプロイする方法は 2 通りあります。

* 標準的な contract が必要なだけであれば、ウェブベースの Explore ライブラリを使用します。
* カスタム contract をデプロイしたい場合は、CLI 中心のツールを使用します。

ここでは、その両方を見ていきます。

*注: thirdweb チームは、まさにこのトピックについて素晴らしい動画を制作しています。*

{% embed url="<https://www.youtube.com/watch?v=_fghhiFg870>" %}

## thirdweb の Explore を使って smart contract をデプロイする <a href="#deploy-a-smart-contract-using-remix-ide" id="deploy-a-smart-contract-using-remix-ide"></a>

Thirdweb は、監査済みの EVM smart contract のライブラリである [Explore](https://thirdweb.com/explore) を提供しており、これに付随するオンラインツールを使えば、誰でも標準的な contract を任意の EVM チェーンにデプロイできます。

{% hint style="info" %}
[Explore ライブラリに関する thirdweb 公式ドキュメント](https://portal.thirdweb.com/tokens/explore/overview)も参照できます。
{% endhint %}

1. [thirdweb Explore](https://thirdweb.com/explore) にアクセスします。
2. 「Token」contract をクリックします。

<figure><img src="/files/NnqxC2xdGx85IhxczaJj" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
Chiliz の Fan Tokens は CAP-20 トークンであり、これは Ethereum の ERC20 トークン標準を Chiliz Chain 向けに拡張したものです。CAP-20 の詳細はこちら。
{% endhint %}

contract のページが開きます。表示される情報をすべて読むことをお勧めします。

3. 「Deploy Now」ボタン（画面右上）をクリックします。

フォームが開きます。

<figure><img src="/files/9BlKMaJsNsT2BlUsmKZD" alt=""><figcaption></figcaption></figure>

4. 「Contract Metadata」セクションから始めて、各種フォームフィールドに入力します。

残りのセクションは Explore による自動入力に任せても構いませんが、各項目、特に以下の点には注意を払うことをお勧めします。

* Recipient address: ウォレット（MetaMask など）でログインしている場合、このフィールドにはすでにあなたのウォレットのアドレスが表示されているはずです。必ずあなた自身のものであることを確認してください！
* Deploy options: この contract をデプロイするチェーンを選択する場所です。必ず Chiliz Chain（または必要に応じて Spicy Testnet）を選択してください！

5. 「Deploy Now」をクリックして、あなた自身の Token を Chiliz Chain にデプロイします。

{% hint style="warning" %}
トランザクションの支払いに十分な CHZ がウォレットにあることを必ず確認してください！
{% endhint %}

<figure><img src="/files/WRu9VcfL0XKTE4dTB6j2" alt="" width="375"><figcaption></figcaption></figure>

ウォレットから署名すべきトランザクションがいくつかあり、その数は場合によって異なります。

6. 「View Now」をクリックして thirdweb ダッシュボードにアクセスし、デプロイされた contract を確認します。

## thirdweb の CLI ツールを使って smart contract をデプロイする <a href="#deploy-a-smart-contract-using-remix-ide" id="deploy-a-smart-contract-using-remix-ide"></a>

thirdweb の `deploy` ツールは、複雑な技術的詳細を自動的に処理し、単一のコマンドで任意の EVM チェーン（Chiliz Chain を含む）への smart contract デプロイを簡素化します。

これは、非標準的な contract（たとえば[カスタマイズした OpenZeppelin contract](https://www.openzeppelin.com/solidity-contracts)）を使用したい場合に推奨される方法です。

{% hint style="info" %}
[デプロイツールに関する thirdweb 公式ドキュメント](https://portal.thirdweb.com/contracts/deploy/overview)も参照できます。
{% endhint %}

### thirdweb CLI のインストール

thirdweb deploy ツールを使用するには、以下が必要です。

* Node.js とその npm ツールのローカルインストール。
* thirdweb CLI ツールのローカルインストール。

Node.js と npm をインストールするには、[こちらの手順に従ってください](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)。

その後、ターミナルで以下のコマンドを実行することで thirdweb CLI をインストールできます。

```bash
npm i -g @thirdweb-dev/cli
```

thirdweb チームは [thirdweb CLI の詳細解説動画](https://www.youtube.com/watch?v=8ttGHEQ-Ddo)を作成しているので、ぜひチェックしてください！

### thirdweb CLI を使って contract をデプロイする

CLI をインストールしたら、それを使って smart contract をデプロイできます。

1. ターミナルから、smart contract リポジトリのルートに移動します。
2. deploy コマンドを実行します。

```bash
npx thirdweb deploy
```

これにより、contract のデプロイ手順がガイドされます。

1. ブラウザウィンドウを開いて thirdweb ダッシュボードに接続します。
2. ダッシュボードから、デバイスを認可する必要があります。これには、thirdweb で使用しているウォレットを使ってトランザクションに署名する必要があります。

thirdweb チームによるデモもチェックしてください。

{% embed url="<https://www.youtube.com/watch?v=6EqumMCa-E8>" %}


---

# 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:

```
GET https://docs.chiliz.com/jp/kaihatsu/kihon/smart-contract-deploy/thirdweb-deploy.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.
