Mint your first jetton
Welcome, dev! It's great to have you here. ๐
You'll learn how to create your first token on TON using TON Minter. To mint a token, we will use the TON Minter.
๐ What you'll learnโ
By the end of this tutorial, you'll be able to:
- deploy a token using TON Minter
- customize your token
- manage and use the token
- edit token parameters
๐ Prepare before you startโ
Before you start, make sure you have the following:
- A Tonhub / Tonkeeper wallet or any other TON-compatible wallet. At least 0.25 Toncoin in your wallet (plus extra for blockchain fees)
~0.5 TON should be enough for this tutorial.
๐ Let's get started!โ
Use your web browser to open the service TON Minter / TON Minter testnet.
Deploy a jetton using your browserโ
Connect walletโ
Open TON Minter or TON Minter testnet in your web browser. Click "Connect Wallet" and link your Tonhub or another supported wallet.
โ
Scan the QR-code in a Mobile wallet (Tonhub e.g.)
Fill in the blanks with relevant informationโ
- Name (usually 1-3 words).
- Symbol (usually 3-5 uppercase characters).
- Amount (for example, 1,000,000).
- Description of the token (optional).
Token logo URL (optional)โ
If you want your token to stand out, youโll need to host an attractive logo online.
You can easily find out about the URL placement of the logo in the repository in the 'Where is this metadata stored' paragraph.
- On-chain.
- Off-chain IPFS.
- Off-chain website.
How to create your logo URL?โ
- Prepare a 256x256 PNG image of the token logo with a transparent background.
- Host it online using, for example, GitHub Pages.
- Create a new public repository with the name
website
. - Upload your prepared image to git and enable
GitHub Pages
. - If possible, purchase a custom domain for your project. Use any domain seller like Google Domains or GoDaddy. Then, connect your custom domain to the repository in the previous step, you can follow the instructions here.
- If you have a custom domain, your image URL should be
https://bitcoincash.org/logo.png
instead of thegithub.io
one. This prevents dependency on GitHub and gives you full control over hosting.
๐ธ Send jettonsโ
On the right side of the screen, you can send tokens to multi-currency wallets such as Tonkeeper or Tonhub.
You also can burn your tokens to reduce their amount.
๐ฑ Send tokens from your phone using Tonkeeperโ
Prerequisites:
- You must have Jettons in your wallet.
- You need at least 0.1 Toncoin to cover transaction fees.
Step-by-step guideโ
Then, go to your token, set the amount to send, and enter the recipient address.
๐ Using the token on the siteโ
You can manage your token by entering its address in the search bar at the top of the TON Minter site.
The address can be found on the right side if you are already in the owner panel, or you can find the token address when receiving an airdrop.
โ๏ธ Jetton (token) customizationโ
With the FunC language, you can change a token's behavior in your favor.
To make any changes, start here:
Step-by-step guide for developersโ
- Ensure you have all dependencies from the tonstarter-contracts repository.
- Clone the minter-contract repository and rename the project.
- To install, open a terminal at the root and run:
- npm
- Yarn
- pnpm
npm install
yarn install
pnpm install
-
Edit the smart contract files. All contract files are in
contracts/*.fc
-
Build a project by using:
- npm
- Yarn
- pnpm
npm run build
yarn build
pnpm run build
The result will describe the process of creating the necessary files and the search for smart contracts.
Read the console, there are a lot of tips!
- You can test your changes using:
- npm
- Yarn
- pnpm
npm run test
yarn run test
pnpm run test
- Edit the name and other metadata of the token in
build/jetton-minter.deploy.ts
by changing the JettonParams object.
// This is example data - Modify these parameters for your jetton!
// - Data is stored on-chain (except for the image data itself)
// - Owner should usually be the deploying wallet's address.
const jettonParams = {
owner: Address.parse("EQD4gS-Nj2Gjr2FYtg-s3fXUvjzKbzHGZ5_1Xe_V0-GCp0p2"),
name: "MyJetton",
symbol: "JET1",
image: "https://www.linkpicture.com/q/download_183.png", // Image URL
description: "My jetton",
};
- To deploy a token, use the following command:
- npm
- Yarn
- pnpm
npm run deploy
yarn deploy
pnpm run deploy
The result of running your project:
> @ton-defi.org/jetton-deployer-contracts@0.0.2 deploy
> ts-node ./build/_deploy.ts
=================================================================
Deploy script running, let's find some contracts to deploy..
* We are working with 'mainnet'
* Config file '.env' found and will be used for deployment!
- Wallet address used to deploy from is: YOUR-ADDRESS
- Wallet balance is YOUR-BALANCE TON, which will be used for gas
* Found root contract 'build/jetton-minter.deploy.ts - let's deploy it':
- Based on your init code+data, your new contract address is: YOUR-ADDRESS
- Let's deploy the contract on-chain.
- Deploy transaction sent successfully
- Block explorer link: https://tonwhales.com/explorer/address/YOUR-ADDRESS
- Waiting up to 20 seconds to check if the contract was actually deployed.
- SUCCESS! Contract deployed successfully to address: YOUR-ADDRESS
- New contract balance is now YOUR-BALANCE TON, make sure it has enough to pay rent
- Running a post deployment test:
{
name: 'MyJetton',
description: 'My jetton',
image: 'https://www.linkpicture.com/q/download_183.png',
symbol: 'JET1'
}
What's next?โ
If you want to dive deeper, read this article by Tal Kol:
If you want to learn more about other token-minting solutions, read this article: