address to send the money to,
and the amount to send. The method does not return a value, indicated by () to the left of the method name send_money.
The method uses the impure and inline specifiers, which are flags that tell the compiler to process
the method in specific ways.
The method first creates the message to send msg by using a cell builder, since the message is encoded as a cell.
A new cell builder is created with function begin_cell. Then, some message flags are set, indicated at the line
with the single-line comment ;; nobounce. Then, function store_slice stores the receiving address,
followed by function store_coins
which stores the amount to send. The builder finalizes the cell with a call to the end_cell function.
Finally, function send_raw_message sends the message, where the parameter 64 describes a sending mode.
Compiler
The compiler converts FunC programs into Fift assembler code, generating the corresponding bitcode for the TON Virtual Machine. Developers and engineers can use its bitcode, which is structured as a tree of cells like all data in the TON Blockchain, to create smart contracts or run it on a local instance of the TVM.Compile with JS
Using the Blueprint framework is the most convenient and quickest way to begin developing and compiling smart contracts. Read more in the Blueprint section. The following command installs all JS dependencies and creates a template project in the current working directory:Compile with original binaries
FunC compiler binaries for Windows, macOS (Intel or Arm64), and Ubuntu can be downloaded from GitHub.TON Blockchain course
The TON Blockchain course covers FunC and smart contract development in its 4th module.TON Blockchain course in English
(Chinese)
(Russian)
Tutorials
Below, you can find additional materials shared by community experts:- Challenge 1: Simple NFT deploy
- Challenge 2: Chatbot contract
- Challenge 3: Jetton vending machine
- Challenge 4: Lottery/raffle
- Challenge 5: Create UI to interact with the contract in 5 minutes
- Challenge 6: Analyzing NFT sales on the Getgems marketplace
-
Func & Blueprint -
@MarcoDaTr0p0je - TON hello world: step-by-step guide for writing your first smart contract
- TON hello world: step-by-step guide for testing your first smart contract
-
10 FunC lessons -
@romanovichim, using Blueprint -
10 FunC lessons (RU) -
@romanovichim, using Blueprint - FunC quiz - Vadim. It is good for self-checking and will take 10–15 minutes. The questions are mainly about FunС, with a few general questions about TON.
- FunC quiz (RU) - Vadim