Lately, I’ve been fully committed to learning about TON chain smart contracts. The process has been filled with challenges, but the rewards have been plentiful. Today, I want to share with everyone my journey of learning over the past month.
Motivation for Learning
The reason for learning was straightforward: in the context of a user base exceeding one billion, not keeping up with the times is simply unacceptable. Here are some insights and experiences from my learning process.
Introduction
Hello everyone, today I want to share a special journey with you all — my path of learning FunC. In the challenging world of TON, after a fierce battle, I have finally mastered the unwieldy FunC!
When I first encountered TON, it reminded me of the days of writing Erlang code, with those familiar Actor models feeling like a warm reunion. This feeling of familiarity sparked a strong interest in FunC and a determination to explore further.
I must say, the path to mastering FunC is not easy. I’ve been devoting myself day and night to learning and debugging FunC lately. Every late-night thought and every debugging session of the code has been a solid step towards the peak of FunC. Now, having crossed this threshold, the sense of achievement is immense, making all the efforts feel worthwhile.
Stages of Learning
My learning journey can be divided into the following stages:
-
One-Day Crash Course in Tact, Laying the Foundation
Before diving into the world of FunC, I spent a day mastering Tact, which laid the groundwork for my subsequent learning.
Pros of Using Tact: It can automatically generate FunC contracts and TypeScript scripts, which is convenient for both front-end and back-end use. The downside is that the Gas fees are more expensive than handcrafted FunC contracts because Tact produces a large number of auxiliary scripts when compiling FunC.- Tact Chinese Tutorial: https://www.tact-lang.cn/
- Tact Examples: https://tact-by-example.org/
-
Digesting Official Documentation, Building a Knowledge Framework
I patiently read through all the official FunC documentation. Though vast, I managed to distill the core points and built a solid knowledge framework for my FunC studies.- Smart Contracts: https://docs.ton.org/mandarin/develop/smart-contracts/
- Smart Contract Addresses: https://docs.ton.org/mandarin/learn/overviews/addresses
- FunC Language: https://docs.ton.org/mandarin/develop/func/overview
- TVM Basics: https://docs.ton.org/mandarin/learn/tvm-instructions/tvm-overview
- Sharding Principles: https://docs.ton.org/mandarin/develop/blockchain/shards
- Gas Fees: https://docs.ton.org/mandarin/develop/smart-contracts/fees
- Exit Codes (Key Points): https://docs.ton.org/mandarin/learn/tvm-instructions/tvm-exit-codes
- Cell Data Structure: https://docs.ton.org/mandarin/develop/data-formats/cell-boc
- Sending Messages: https://docs.ton.org/mandarin/develop/smart-contracts/messages
- All in One Tool: https://github.com/ton-org/blueprint
-
Dialogues Between Tact and FunC, Gaining a Deeper Understanding
Returning to Tact, observing the generated FunC through compiling code deepened my understanding of FunC and showed me the close connection between the two languages. -
Repeated Refinement, Comparative Learning
I continuously wrote and modified FunC code, comparing it with the FunC compiled by Tact. This method of repeated refinement helped me gradually grasp the essence of FunC. -
Hands-On Practice, The Challenge of Jetton and NFT
Ultimately, I made the leap from theory to practice by writing business code, especially by implementing the issuance of Jetton and NFT. These two projects presented me with countless challenges, but they also allowed me to experience the joy of programming.- NFT Tutorial: https://docs.ton.org/mandarin/develop/dapps/tutorials/collection-minting
- Jetton Tutorial: https://docs.ton.org/mandarin/develop/dapps/asset-processing/jettons
- Ton-Dynasty Jetton Tutorial: https://ton-dynasty.github.io/docs.contracts/docs/category/tutorial—jetton
- Ton-Dynasty NFT Tutorial: https://ton-dynasty.github.io/docs.contracts/docs/category/tutorial—nft
- Ton-Dynasty NFT Advanced Tutorial (Fragmented Trading): https://ton-dynasty.github.io/docs.contracts/blog/nft-enforced-royalty/
Conclusion
In the world of TON, I not only rekindled my passion for programming but also grew on my journey of learning FunC. Every successful debugging session, every optimization of the code, is a victory in this fierce battle. I am grateful to FunC for allowing me to take another solid step on the path of programming.
To those of you also striving on the path of programming, I say: Do not fear challenges, persevere, and we can all find our own place in the TON world. Let’s master FunC together and write a new chapter in programming!
Thank you all for reading. I hope my sharing brings you inspiration and motivation. Keep moving forward, and I will see you in the world of programming!