# ERC-721 Minting하기

Remix를 이용하여 ERC-721 Minting이 가능합니다.

사전에 ERC-721 컨트렉트가 배포되어야 합니다. ERC-721 컨트렉트 배포는 [ERC-721 Contract 만들기](https://docs.wemix.com/ko/tutorial/erc-721-token/erc-721-contract)를 참고하십시오.

{% hint style="danger" %}
주의

한번 배포된 컨트랙트는 수정 및 삭제가 불가능합니다.\
필요한 정보를 포함한 Code로 작성하여 배포해주세요.
{% endhint %}

{% hint style="info" %}
아래 예제는 WEMIX3.0 테스트넷을 기반으로 작성되었습니다.
{% endhint %}

### Minting 하기

ERC-721 컨트렉트가 배포된 화면의 'Deployed Contracts' 부분에서 배포된 컨트랙트 내용을 조회할 수 있습니다.

'mintNFT'를 선택하여 recipient, token URL을 입력합니다.

<figure><img src="https://content.gitbook.com/content/iXnTk8WgxaTaNidAuUYQ/blobs/6SqdXniLnOZtyB9HUyr8/00.mintNFT.png" alt=""><figcaption><p>mintNFT</p></figcaption></figure>

{% hint style="info" %}
**token URL 예**

<https://2865074520-files.gitbook.io/\\~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlgX3Uok5fQZcz5UtMhgi%2Fuploads%2Fb0lcXNM4MjmcQgY1kn1K%2Fgyeongbok\\_palace.png?alt=media\\&token=4bbc41b2-b7df-40f3-9fbc-e028268034b5>
{% endhint %}

recipient, token URL 입력이 끝나고 'transact' 을 선택하면 아래와 같이 MetaMask 팝업이 뜨며 이더리움을 기반으로 기본 설정된 'Gas fee'를 보여주는 화면이 나옵니다.&#x20;

WEMIX는 이더리움과는 다른 Fee 정책을 가지고 있으므로 반드시 'Site suggested'을 선택하여 Gas fee를 변경해 주셔야 합니다.

<figure><img src="https://content.gitbook.com/content/iXnTk8WgxaTaNidAuUYQ/blobs/BpY4LWgKYQwhhNrseiNZ/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-21%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%206.46.31.png" alt=""><figcaption><p>MetaMask 기본 설정된 'Gas fee'</p></figcaption></figure>

아래 화면에서 'Advanced'를 선택하면 사용자가 'Max priority fee (GWEI)'와 'Max fee(GWEI)'를 수동으로 설정 할 수 있습니다.

<figure><img src="https://content.gitbook.com/content/iXnTk8WgxaTaNidAuUYQ/blobs/J9uEa1hG4Z0aYYlSeMwv/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-21%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%206.46.38.png" alt=""><figcaption><p>MetaMask 기본 설정된 'Gas fee' 설정 진입화면</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/iXnTk8WgxaTaNidAuUYQ/blobs/avI7sZOmbI1amvHEl5xR/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-21%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%206.46.41.png" alt=""><figcaption><p>“Gas fee” 수동 설정</p></figcaption></figure>

현재 WEMIX는 고정 'Max priority fee(GWEI)'를 사용하고 있으며 값은 100입니다.&#x20;

Max fee는 사용자가 정의하는 값으로 최소값은 MaxPriorityFee+BASE\_FEE입니다.&#x20;

WEMIX의 BASE\_FEE는 EIP-1559를 따라 가변입니다. 따라서, Transaction이 성공적으로 만들어지기 위해서는 아래와 같이 설정해 주시기를 권장 드립니다.&#x20;

1. Max base fee (GWEI) = 101
2. Max priority fee (GWEI) = 100&#x20;

위 그림에서 Fee 설정을 완료하고 'Save'를 선택하면 아래의 그림과 같이 Minting 준비가 완료됩니다.

<figure><img src="https://content.gitbook.com/content/iXnTk8WgxaTaNidAuUYQ/blobs/FkWsflAj1Gd9sjuijAma/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-21%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%206.46.44.png" alt=""><figcaption><p>“Gas fee” 수동 설정 완료</p></figcaption></figure>

위 그림에서 'Confirm'을 선택하면 ERC-721 Token Minting이 완료됩니다.

아래 그림처럼 Remix 화면 하단에 초록색 체크마크가 나오면 정상적으로 Minting이 완료된 것 입니다.

<figure><img src="https://content.gitbook.com/content/iXnTk8WgxaTaNidAuUYQ/blobs/9TIj3Y8frYWE9kDWF2lh/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-21%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%206.47.00.png" alt=""><figcaption><p>ERC-721 예시 minting 완료</p></figcaption></figure>

실행 결과로 나타난 트랜잭션 해시를 통해 [테스트넷 익스플로러](https://explorer.test.wemix.com/)에서도 NFT가 발행된 것을 확인할 수 있습니다.

&#x20;[테스트넷 익스플로러](https://explorer.test.wemix.com/)에 접속하여  트랜잭션 해시를 검색합니다.

아래 그림은 [테스트넷 익스플로러](https://explorer.test.wemix.com/)에서 확인한 예입니다.

<figure><img src="https://content.gitbook.com/content/iXnTk8WgxaTaNidAuUYQ/blobs/hpmOzz5in4Rt4ZGqAGqX/WEMIX3.0%20Testnet%20Explorer%20Tx%E1%84%92%E1%85%AA%E1%86%A8%E1%84%8B%E1%85%B5%E1%86%AB.png" alt=""><figcaption><p>WEMIX3.0 Testnet Explorer Tx확인</p></figcaption></figure>

&#x20;[테스트넷 익스플로러](https://explorer.test.wemix.com/)의 NFTs 탭의 'NFT List' 페이지에서 배포된 NFT명을 선택하면 NFT 상세 페이지로 이동됩니다.&#x20;

해당 화면에서 'Inventory' 탭을 선택하면 Minting된 지갑 주소와 token URL을 확인할 수 있습니다.

<figure><img src="https://content.gitbook.com/content/iXnTk8WgxaTaNidAuUYQ/blobs/XtSNMvIU0WqJVVJzjJe4/WEMIX3.0%20Testnet%20Explorer%20Token%20Inventory.png" alt=""><figcaption><p>WEMIX3.0 Testnet Explorer Token Inventory</p></figcaption></figure>
