From 1444cff30b8a0ec6493475081a60d2df5f5dee90 Mon Sep 17 00:00:00 2001 From: Gusarich Date: Tue, 14 Oct 2025 22:30:15 +0300 Subject: [PATCH] [AI] fix: how-to-deploy.mdx --- .../tokens/jettons/mintless/how-to-deploy.mdx | 100 ++++++++++-------- 1 file changed, 57 insertions(+), 43 deletions(-) diff --git a/standard/tokens/jettons/mintless/how-to-deploy.mdx b/standard/tokens/jettons/mintless/how-to-deploy.mdx index 29c0b13ef..2b9fe349e 100644 --- a/standard/tokens/jettons/mintless/how-to-deploy.mdx +++ b/standard/tokens/jettons/mintless/how-to-deploy.mdx @@ -1,21 +1,25 @@ --- -title: "How to deploy mintless Jetton" -sidebarTitle: "Deploy mintless Jetton" +title: "How to deploy Mintless Jetton" +sidebarTitle: "Deploy Mintless Jetton" --- import { Aside } from "/snippets/aside.jsx" -## Introduction + + +## Goal -Mintless jettons represent a revolutionary approach to token distribution on the TON blockchain. This guide provides a comprehensive walkthrough for deploying mintless jettons, from initial setup to production deployment and ongoing maintenance. +Mintless jettons are a token distribution method on The Open Network (TON) blockchain. This guide provides a walkthrough for deploying mintless jettons, from initial setup to production deployment and ongoing maintenance. -**Prerequisites** +## Prerequisites -Before starting the deployment process, ensure you have: +You need: - A TON wallet with sufficient funds for deployment - Understanding of Merkle trees and cryptographic proofs @@ -23,23 +27,23 @@ Before starting the deployment process, ensure you have: - List of airdrop recipients with their allocated amounts - Development environment set up for TON smart contracts -## Step-by-Step Deployment Guide +## Step-by-step deployment guide Deploying a mintless jetton involves several critical steps: -### 1. Prepare the Merkle Tree +### 1. Prepare the Merkle tree The foundation of any mintless jetton is a properly constructed Merkle tree containing all airdrop data. -#### Data Collection +#### Data collection - **Compile recipient list**: Gather all wallet addresses eligible for the airdrop - **Determine allocations**: Assign token amounts to each recipient based on your distribution criteria - **Set time constraints**: Define `start_from` and `expired_at` timestamps for claim availability -#### Tree Generation Process +#### Tree generation process -``` +```text AirdropItem Structure: - amount: Coins (allocated tokens) - start_from: uint48 (Unix timestamp for claim start) @@ -50,61 +54,61 @@ AirdropItem Structure: - Each leaf contains an `AirdropItem` with amount, start time, and expiry - Compute the root `merkle_hash` that will be stored on-chain -#### Best Practices +#### Best practices - **Validate addresses**: Ensure all recipient addresses are valid TON addresses - **Check allocations**: Verify total allocation doesn't exceed intended supply - **Test tree generation**: Use small datasets first to validate your tree construction process -### 2. Deploy the Jetton Master Contract +### 2. Deploy the Jetton master contract The jetton master contract must be extended to support mintless functionality. -#### Contract Requirements +#### Contract requirements - Include the `merkle_hash` in the contract's storage - Implement the `get_mintless_airdrop_hashmap_root` get-method -- Ensure compatibility with [TEP-177](https://github.com/ton-blockchain/TEPs/pull/177) standard +- Ensure compatibility with the [Mintless Jetton overview](/standard/tokens/jettons/mintless/overview) and [TEP-177](https://github.com/ton-blockchain/TEPs/pull/177) standard - Use the [mintless jetton standard implementation](https://github.com/ton-community/mintless-jetton) as reference -#### Storage Extensions +#### Storage extensions -``` +```text Standard jetton storage + { merkle_hash: uint256 // Root hash of the Merkle tree } ``` -#### Deployment Checklist +#### Deployment checklist -- [ ] Contract includes merkle\_hash in storage +- [ ] Contract includes `merkle_hash` in storage - [ ] All standard jetton methods are implemented - [ ] Mintless-specific get-methods are available - [ ] Contract has been thoroughly tested - [ ] Deployment transaction has sufficient gas -### 3. Set Up Off-Chain Infrastructure +### 3. Set up off-chain infrastructure Mintless jettons require robust off-chain infrastructure to serve Merkle proofs and tree data. -#### Merkle Tree Hosting +#### Merkle tree hosting - **Storage options**: TON Storage, IPFS, AWS S3, or other reliable hosting -- **File format**: Store complete tree as BoC (Bag of Cells) file +- **File format**: Store complete tree as BoC (bag of cells) file - **Accessibility**: Ensure high availability and fast access times - **Redundancy**: Consider multiple hosting locations for reliability -#### Custom Payload API Implementation +#### Custom payload API implementation -Implement an API endpoint that provides: +Implement an application programming interface (API) endpoint that provides: - Individual Merkle proofs for specific addresses - Initialization data for jetton wallet deployment - Verification of claim eligibility -**API Endpoints:** +##### API endpoints -``` +```text GET /api/v1/proof/{address} Response: { "proof": "base64_encoded_merkle_proof", @@ -115,19 +119,21 @@ Response: { } ``` -#### Performance Considerations +
— target TON account address. + +#### Performance considerations - **Caching**: Implement aggressive caching for frequently requested proofs -- **Load balancing**: Use CDN or load balancers for high-traffic scenarios +- **Load balancing**: Use content delivery network (CDN) or load balancers for high-traffic scenarios - **Rate limiting**: Protect against abuse while ensuring legitimate access -### 4. Configure Metadata +### 4. Configure metadata Update your jetton's metadata to include mintless-specific fields. -#### Required Metadata Fields +#### Required metadata fields -According to the [metadata standard](https://github.com/ton-blockchain/TEPs/blob/master/text/0064-token-data-standard.md): +According to the [metadata standard](/standard/tokens/metadata): ```json { @@ -141,14 +147,14 @@ According to the [metadata standard](https://github.com/ton-blockchain/TEPs/blob } ``` -#### Key Considerations +#### Key considerations -- **mintless\_merkle\_dump\_uri**: Direct link to the complete Merkle tree data -- **custom\_payload\_api\_uri**: Base URL for the custom payload API +- `mintless_merkle_dump_uri`: Direct link to the complete Merkle tree data +- `custom_payload_api_uri`: Base URL for the custom payload API - **Hosting reliability**: Ensure these URIs remain accessible long-term - **HTTPS requirement**: Use secure connections for all external resources -## Development Tools and Utilities +## Development tools and utilities Several specialized tools can assist with mintless jetton development and auditing. @@ -156,7 +162,7 @@ Several specialized tools can assist with mintless jetton development and auditi Official utility from the TON blockchain core team for Merkle proof generation and verification. -#### Installation +#### Installation (TON Core) 1. **Clone and build**: @@ -171,9 +177,9 @@ make mintless-proof-generator The compiled utility is located at `build/crypto/mintless-proof-generator`. -#### Usage +#### Usage (TON Core) -**Parse and verify Merkle tree:** +#### Parse and verify Merkle tree ```bash build/crypto/mintless-proof-generator parse @@ -185,7 +191,11 @@ This command: - Stores the airdrop list in `` - Format: `
` (one per line) -**Generate all Merkle proofs:** + + — path to the input BoC file; — path to the output file. + + +#### Generate all Merkle proofs ```bash build/crypto/mintless-proof-generator make_all_proofs @@ -197,7 +207,7 @@ Use this for creating the complete proof set needed for `custom_payload_api_uri` Community-developed utility from the Tonkeeper team with additional features. -#### Installation +#### Installation (Tonkeeper) ```bash git clone https://github.com/tonkeeper/mintless-toolbox.git @@ -205,9 +215,9 @@ cd mintless-toolbox make ``` -#### Usage +#### Usage (Tonkeeper) -**Dump airdrop data:** +#### Dump airdrop data ```bash ./bin/mintless-cli dump @@ -218,3 +228,7 @@ This utility: - Reads airdrop files in various formats - Outputs data in CSV format: `address,amount,start_from,expired_at` - Provides additional validation and formatting options + + + — path to the airdrop file. +