tondiamonds / ton-nft-deployer

https://tondiamonds.github.io/ton-nft-deployer/
117 stars 33 forks source link

Creating an NFT collection in the TON main network

❤️ The instructions and tools were provided by the TON Diamonds - the first NFT project in TON.

If you are an NFT-collection author for TON but don't have good technical skills, you better wait until when NFT-marketplaces (like https://getgems.io) make their UI for creating collections.

The marketplaces are currently working on this functionality, creating a collection via the marketplace website will be as easy as posting a photo to social networks.

More advanced users can deploy now.

Preparation.

1) Create a new wallet (for example, in Tonkeeper or https://wallet.ton.org).

This wallet will manage the collection.

Only by using this wallet you'll be able to create new NFT tokens for this collection or change the collection's metadata

2) When creating a wallet be sure to write down 24 English words for recovery.

Be sure to save them in a safe place.

If you lose them, you will permanently lose access to your wallet and collection management.

No one but you should know your secret words.

3) Add the TON tokens to your wallet.

You need about ~0.07 TON to create one NFT (for example, if you want to create 1000 NFT, you need about 70 TON).

4) Use a webpage or script to deploy.

Web page.

The source code of the web page can be found in this repository.

Check

Script

This repository contains an open-source script in javascript to deploy the NFT collection.

The script.md describes how to run it.

The parameters of the .env are the same as those of the web page, so you can see the description of the parameters in the previous paragraph.

NFT Deploy Basics

Your smart contracts must be compatible with the NFT standard.

The contracts can be found at https://github.com/ton-blockchain/token-contract/tree/main/nft

nft-collection-editable.fc for a collection and nft-item.fc for a collection item.

The JavaScript SDK TonWeb version 0.0.38 and above (version is important) also uses these smart contracts.

The web page and script above use TonWeb.