> 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/ko/gaebal/gibon/seumateu-keonteulaekteu-baepoe/remix-baepoe.md).

# Remix로 배포

[Remix](https://remix.live/)는 스마트 컨트랙트 개발을 위한 설치 불필요 툴셋입니다. 전문가와 입문자 모두가 사용하며, 빠르게 시작할 수 있습니다.

Remix는 [웹 기반 환경](https://remix.ethereum.org/), [데스크톱 프로그램](https://github.com/remix-project-org/remix-desktop), [CLI 도구](https://www.npmjs.com/package/@remix-project/remixd) 형태로 제공됩니다.\
이 페이지에서는 웹 기반 버전을 사용합니다.

{% hint style="info" %}
[컨트랙트 생성 및 배포를 위한 공식 Remix IDE 문서](https://remix-ide.readthedocs.io/en/latest/create_deploy.html)도 참고할 수 있습니다.
{% endhint %}

Remix Online IDE를 이용한 스마트 컨트랙트 배포 방법은 다음과 같습니다.

1. [<mark style="color:blue;">https://remix.ethereum.org</mark>](https://remix.ethereum.org)으로 이동합니다. 브라우저에 Remix IDE가 열립니다.<br>

   <figure><img src="/files/55q5pbUUVotDGBTD9EJl" alt=""><figcaption></figcaption></figure>
2. "새 워크스페이스 생성" 버튼을 클릭한 후 옵션을 선택합니다: 빈 워크스페이스, AI 생성 워크스페이스, 컨트랙트 마법사, 프로젝트 가져오기, 또는 git 저장소 클론. 분류된 워크스페이스 템플릿도 활용할 수 있습니다.\
   이 튜토리얼에서는 OpenZeppelin ERC20 워크스페이스 템플릿을 사용합니다. 물론 빈 워크스페이스를 사용하여 자신의 스마트 컨트랙트를 배포할 수도 있습니다.

{% hint style="info" %}
Chiliz Fan Tokens는 CAP-20 토큰으로, Ethereum ERC20 토큰 표준의 Chiliz Chain 전용 확장입니다. [CAP-20에 대해 자세히 알아보기](/ko/baeuggi/yongeo/cap-20.md).
{% endhint %}

3. "OpenZeppelin" 템플릿 카테고리까지 스크롤하여 "ERC20" 템플릿을 클릭합니다.

<figure><img src="/files/32PyBM8hVOr7b8DgeGXd" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
[OpenZeppelin](https://www.openzeppelin.com/)은 안전한 dApp 구축을 위한 오픈소스 플랫폼입니다.

여러 보안 및 감사 서비스 외에도 커뮤니티에서 검증된 [스마트 컨트랙트 라이브러리](https://docs.openzeppelin.com/contracts/)를 무료로 제공합니다.

OpenZeppelin 컨트랙트는 업계 표준으로 여겨지므로 안전하게 사용할 수 있습니다.
{% endhint %}

4. Remix가 표시하는 양식에 ERC20 토큰 이름을 입력하고 "워크스페이스 유효성 검사" 버튼을 클릭합니다.

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

선택을 확인하면 Remix가 왼쪽 파일 탐색기에 폴더와 파일이 있는 표준 워크스페이스를 로드합니다. `/contracts/{토큰이름}.sol` 파일을 클릭하면 배포할 ERC20 컨트랙트가 표시됩니다.

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

기본 `MyToken.sol` 스마트 컨트랙트는 OpenZeppelin에서 `ERC20.sol` 컨트랙트를 가져옵니다.\
\&#xNAN;*`.deps/npm/@openzeppelin/contracts/token/ERC20/ERC20.sol` 파일을 열면 ERC20 컨트랙트 자체를 확인할 수 있습니다.*

`MyToken.sol` 컨트랙트를 원하는 대로 수정할 수 있습니다.\
예를 들어, Chiliz Chain EVM에서 작동하려면 컨트랙트가 최대 Solidity 0.8.30을 사용해야 하므로 다음과 같이 변경합니다.

```solidity
pragma solidity ^0.8.30;
```

... 그리고 관련 컴파일러를 선택합니다.

<div align="left"><figure><img src="/files/Y7u4w5OAKEnLPTkCVPVL" alt="" width="277"><figcaption></figcaption></figure></div>

5. 컨트랙트 파일 위의 "컴파일\*\*"\*\*을 클릭합니다.\
   ![](/files/H28ctj1cczbeKFeZK4CP)

변경 사항에 오류가 없다면 Remix IDE는 왼쪽 "Solidity Compiler" 메뉴에 초록색 체크 표시를 표시합니다.

<div align="left"><figure><img src="/files/elxQyYpegziKcWTTmh84" alt="" width="338"><figcaption></figcaption></figure></div>

6. "배포 및 트랜잭션 실행" 섹션을 엽니다.<br>

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

* "환경" 드롭다운 메뉴에서 "Browser Extension > Injected Provider - MetaMask"를 선택합니다. 이렇게 하면 배포된 토큰이 MetaMask 계정에 연결됩니다. MetaMask는 이미 Chiliz Chain에서 작동하도록 구성되어 있어야 합니다(그렇지 않다면 [여기를 참조](/ko/baeuggi/jigap/metamask-sayong/chiliz-metamask-yeongyeol.md)).
* Remix에 올바른 네트워크가 표시되는지 확인합니다: Chiliz Chain Mainnet.\
  ![](/files/8atyidvMSJEwPYN6ox3e)
* 컨트랙트 파일이 선택되어 있고 선택된 EVM 버전이 "Prague"인지 확인합니다.\
  그렇지 않다면 컴파일러 버전이 v0.8.30으로 설정되지 않은 것이므로(위 참조) 4단계로 돌아가세요.\
  ![](/files/KBznzgkvmH8PMlMLsRWz)
* "배포 및 검증"을 클릭합니다.\
  \&#xNAN;*컨트랙트만 배포하고 나중에 직접 검증하려면 "탐색기에서 컨트랙트 검증" 체크박스를 해제하고 배포할 수 있습니다.*

{% hint style="warning" %}
배포 트랜잭션 비용을 지불하기 위해 지갑에 CHZ가 충분한지 확인하세요!
{% endhint %}

7. MetaMask 지갑이 자동으로 열립니다.

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

8\. "확인"을 클릭하여 MetaMask 지갑을 토큰의 스마트 컨트랙트와 연결합니다.\
몇 초 내에 트랜잭션을 확인하는 알림과 함께 [Chiliscan](https://chiliscan.com/) 블록 탐색기에서 트랜잭션을 보라는 안내가 표시됩니다.

트랜잭션에서 배포된 컨트랙트 자체에 접근할 수 있습니다(여기서 "Contract" 뒤의 링크).

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

MetaMask 지갑의 \_"\_활동" 탭에서 컨트랙트 배포 정보를 확인할 수 있습니다. 클릭하면 모든 정보가 표시됩니다.

<figure><img src="/files/bKk74jVV3V49xKPpb6s5" alt="" width="329"><figcaption></figcaption></figure>

축하합니다! 컨트랙트가 Chiliz Chain에 배포되었습니다!

이제 검증을 진행할 차례입니다.

{% content-ref url="/pages/nsWrQabw0Uxfup8ISrim" %}
[스마트 컨트랙트 검증](/ko/gaebal/gibon/seumateu-keonteulaekteu-geomjeung.md)
{% endcontent-ref %}


---

# 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.chiliz.com/ko/gaebal/gibon/seumateu-keonteulaekteu-baepoe/remix-baepoe.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.
