Advanced Guide to Jetton Implementation on TON Blockchain

In this comprehensive technical article, we delve into the intricacies of implementing Jetton tokens on the TON Blockchain, offering developers a robust template and essential guidelines for effective development and deployment. This guide is meticulously designed to assist developers in navigating through the Jetton implementation process, providing a seamless start point for integrating this innovative token system within their applications.

:blue_book: Overview

Jetton tokens represent a versatile mechanism for asset management on the TON Blockchain, offering enhanced functionality and flexibility for developers and users alike. This guide introduces a detailed template for Jetton implementation, accompanied by clear instructions and best practices to ensure a smooth development journey.

:rocket: Getting Started

To kickstart your Jetton implementation, the following commands are crucial:

yarn build # Compiles the contract
yarn test # Executes test cases
yarn deploy # Deploys the contract to the blockchain
---
yarn read # Reads contract data
yarn d1 # (Optional) Transfers Jetton Token to a new account
yarn d2 # (Optional) Generates a Transfer URL for Jetton Token redistribution

Additional details are accessible in the package.json file, offering developers a comprehensive toolkit for effective Jetton management.

:hammer_and_wrench: Key Implementation Insights

  • Data Storage: Jetton content is efficiently stored using the Cell data structure, optimizing space and access.
  • Naming Conventions: Following TEP-74, it’s critical to use lowercase for names in get_jetton_data() to ensure compatibility with major explorers.
  • Supply Management: The max_supply parameter offers flexibility in controlling token issuance, though the Jetton Root Contract’s Total Supply remains the primary metric.
  • Token Transfer: Uniquely, transferring Jetton Tokens requires sending a message to the sender’s Jetton Wallet, not directly to the recipient’s.
  • Minimum TON Amount: Setting the forward_ton_amount to as low as 1e-9 TON is possible, aligning with practices from TelemintNFT.

:books: References

To deepen your understanding and explore further into Jetton implementation, the following resources are invaluable:

:earth_africa: Community Support

Engage with the vibrant TON developer community for support, insights, and collaboration:

:ship: Deployment Guidelines

For successful contract deployment, adhere to the following steps:

  1. Ensure contract.tact is set as the entry point.
  2. Tailor contract.deploy.ts to match your contract.tact structure, particularly the Init() function call.

Modifications to contract.tact necessitate updates in tact.config.json, as detailed in the Tact Documentation.

:white_check_mark: Testing Framework

Incorporate contract tests via contract.spec.ts, with extensive guidelines available in the Tact Documentation. New test files should mimic the provided template for automatic inclusion.

:page_facing_up: License

This Jetton implementation template is freely available under the MIT license, promoting open and accessible development within the TON ecosystem.

This guide serves as a foundational resource for developers embarking on Jetton implementation projects, combining detailed technical instructions with essential community resources for a holistic approach to blockchain development on the TON platform.

1 Like

Good good good!

Tact is good for TON