# How to deploy mintless jetton (https://docs-fpm2731fy-ton-core-docs.vercel.app/llms/standard/tokens/jettons/mintless/deploy/content.md)



## Introduction [#introduction]

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.

<Callout>
  Before deploying a mintless jetton, ensure you understand the [basic concepts](/llms/standard/tokens/jettons/mintless/content.md) and have experience with standard jetton deployment.
</Callout>

**Prerequisites**

Before starting the deployment process, ensure you have:

* A TON wallet with sufficient funds for deployment
* Understanding of Merkle trees and cryptographic proofs
* Access to hosting infrastructure for off-chain data
* 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:

<div className="fd-steps">
  <div className="fd-step">
    ### 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]

    ```
    AirdropItem Structure:
    - amount: Coins (allocated tokens)
    - start_from: uint48 (Unix timestamp for claim start)
    - expired_at: uint48 (Unix timestamp for claim expiry)
    ```

    * Generate a Merkle tree with all airdrop recipients and their respective amounts
    * 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
  </div>

  <div className="fd-step">
    ### 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
    * Use the [mintless jetton standard implementation](https://github.com/ton-community/mintless-jetton) as a reference

    #### Storage Extensions [#storage-extensions]

    ```
    Standard jetton storage + {
      merkle_hash: uint256  // Root hash of the Merkle tree
    }
    ```

    #### Deployment Checklist [#deployment-checklist]

    * [ ] 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
  </div>

  <div className="fd-step">
    ### 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
    * **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:

    * Individual Merkle proofs for specific addresses
    * Initialization data for Jetton wallet deployment
    * Verification of claim eligibility

    **API Endpoints:**

    ```
    GET /api/v1/proof/{address}
    Response: {
      "proof": "base64_encoded_merkle_proof",
      "init_data": "base64_encoded_init_data",
      "amount": "1000000000",
      "start_from": 1699123200,
      "expired_at": 1699209600
    }
    ```

    #### Performance Considerations [#performance-considerations]

    * **Caching**: Implement aggressive caching for frequently requested proofs
    * **Load balancing**: Use CDN or load balancers for high-traffic scenarios
    * **Rate limiting**: Protect against abuse while ensuring legitimate access
  </div>

  <div className="fd-step">
    ### 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):

    ```json
    {
      "name": "Your Mintless Token",
      "symbol": "YMT",
      "decimals": "9",
      "description": "Description of your token",
      "image": "https://example.com/token-logo.png",
      "mintless_merkle_dump_uri": "https://example.com/merkle-tree.boc",
      "custom_payload_api_uri": "https://example.com/api/v1/"
    }
    ```

    #### 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
    * **Hosting reliability**: Ensure these URIs remain accessible long-term
    * **HTTPS requirement**: Use secure connections for all external resources
  </div>
</div>

## Development Tools and Utilities [#development-tools-and-utilities]

Several specialized tools can assist with mintless jetton development and auditing.

### mintless-proof-generator (TON Core) [#mintless-proof-generator-ton-core]

Official utility from the TON blockchain core team for Merkle proof generation and verification.

#### Installation [#installation]

1. **Clone and build**:

```bash
git clone https://github.com/ton-blockchain/ton
cd ton
git checkout testnet
mkdir build && cd build
cmake ../
make mintless-proof-generator
```

The compiled utility is located at `build/crypto/mintless-proof-generator`.

#### Usage [#usage]

**Parse and verify Merkle tree:**

```bash
build/crypto/mintless-proof-generator parse <input-boc> <output-file>
```

This command:

* Prints the mintless Merkle dump cell hash
* Stores the airdrop list in `<output-file>`
* Format: `<address> <amount> <start_from> <expired_at>` (one per line)

**Generate all Merkle proofs:**

```bash
build/crypto/mintless-proof-generator make_all_proofs <input-boc> <output-file>
```

Use this for creating the complete proof set needed for `custom_payload_api_uri`.

### mintless-toolbox (Tonkeeper) [#mintless-toolbox-tonkeeper]

Community-developed utility from the Tonkeeper team with additional features.

#### Installation [#installation-1]

```bash
git clone https://github.com/tonkeeper/mintless-toolbox.git
cd mintless-toolbox
make
```

#### Usage [#usage-1]

**Dump airdrop data:**

```bash
./bin/mintless-cli dump <airdrop-filename>
```

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
