Introduction
Smart contract creation, development, and deployment on TON Blockchain leverages the FunC programming language and TON Virtual Machine (TVM). This section will give software engineers an overview of smart contract development on TON.
Quick Start
Write and deploy your first smart contract with either Blueprint or toncli frameworks.
Blueprint
Blueprint — is a development environment for writing, testing, and deploying smart contracts. To create a new demo project use the following command:
npm create ton@latest
toncli
Toncli — is a TON cross-platform smart contract command line interface. Install this and run test project via following command:
toncli start wallet
Getting Started
Fast Track Tutorials
TON Hello World guide is the easiest way to start with smart contracts development:
Comprehensive and Detailed Tutorials
Detailed and cautionary explanations of smart contract basics:
Smart Contract Guidelines
Learn principals of designing and architecture of TON.
TON’s systemized smart contract development allows engineers to build smart contracts for many uses. That said, to unlock the full capabilities of smart contract iteration on TON, it's necessary to follow our predetermined smart contract guidelines to ensure their correct composition.
TON Virtual Machine
TON smart contracts are executed on TON Virtual Machine (TVM). The TVM is a stack-based virtual machine that employs many qualities that make it efficient and easy to implement.
To get a better understanding of how the TVM works, consider reading the TVM Overview section of our documentation.
TVM OverviewProgramming Languages
FunC Language
FunC is TON’s high-level programming language used to program smart contracts on TON Blockchain. The proprietary in-house language is a domain-specific statically typed framework which exhibits many characteristics simply not found in competing language types.
FunC OverviewFift language
This information is very low level and may be challenging for newcomers to understand. Therefore, we suggest that you read about it later at your convenience.
Messages to smart contracts are binary data. To construct such messages, you can use one of the SDKs or the special programming language Fift.
Fift OverviewTact language
The Tact language is developed by independent developers. Use at your own risk.
Smart Contract Examples
Feel free to focus on smart contracts written using FunC. it's often better to focus on smart contracts written using FunC (.fc) instead of the lower-level Fift (.fif) language.
Standard examples of smart contracts on TON include wallets, electors (which manage validation on TON), multi-signature wallets can be a reference when studying.
If you're familiar with smart contracts, consider discover the following list:
- Fungible (Jettons), Non-Fungible (NFT), Semi-Fungible Tokens smart contracts
- Getgems NFT, sale, auctions smart contracts (FunC)
- Wallet V4 smart contract example
- Standard smart contracts examples
- Super Simple Chatbot: doge.fc
Learn more examples on the Examples of Smart Contracts page.
Additionally, discover more FunC libraries and SDK in the FunC section of our documentation.
Environment
The installation process for Local Environments may require more knowledge and time, but they are better suited for everyday use and eliminate the need for internet dependency. These include IDE plugins, various SDKs, binaries, syntax highlighting, and more. Check out our local environment installation guide to learn more.
Development Toolkit
Development toolkits play a pivotal role in the development of smart contracts on TON Blockchain. To begin developing, testing, and debugging smart contracts on TON, we’ll make use of these products and services:
SDKs
- Blueprint - JS SDK for development and testing Smart Contracts.
- SDKs - The Open Network SDKs list for applications.
Other Tools
- disintar/toncli — The toncli is the command line interface used to build, deploy, and test FunC contracts.
- MyLocalTON — MyLocalTON is used to run a private TON Blockchain in your local environment.
- tonwhales.com/tools/boc — BOC parser.
- tonwhales.com/tools/introspection-id — crc32 generator.
- @orbs-network/ton-access — decentralized API gateway.
References
Educational content from the TON community:
- TON Learn FunC journey: 10 zero-to-hero lessons (Ru version)
- [YouTube] TON Dev Study [EN]
- [YouTube] TON Dev Study [RU]
- Introduction to FunC: how to start developing on TON?
- TON Hello World part 4: Step by step guide for testing your first smart contract