This is happening today.
I managed not only to finish up the compiler, but also to migrate standard contracts from FunC to Tolk.
I covered every contract with gas metrics to check whether it's more efficient than FunC or not. I didn't believe my eyes. I double-checked, triple-checked, but nothing changed. The results are correct. And now I am ready to present them to you.
π§ͺ Benchmarks!
Every contract has several metrics. For example, "basic jetton β mint".
FunC: 19278. Tolk: 11611.
Gas savings: -39.77%
|βββββββββββββββββ-
| 01 β Jetton (mint, transfer, burn, discover)
| -39.77% | -30.32% | -33.66% | -26.75%
|βββββββββββββββββ-
| 02 β NFT (deploy, transfer, onchain get)
| -43.79% | -37.47% | -44.28%
|βββββββββββββββββ-
| 03 β Notcoin
| -35.72% | -27.98% | ...
|βββββββββββββββββ-
| 04 β tgBTC
| -23.94% | -26.99% | ...
|βββββββββββββββββ-
| 05 β Wallet v5
| -21.66% | -22.92% | ...
|βββββββββββββββββ-
| 06 β Vesting
| -45.30% | -29.61% | ...
|βββββββββββββββββ-
| 07 β Telegram gifts
| -54.81% | -39.39% | ...
|βββββββββββββββββ-
I have migrated 7 contracts β preserving the original behavior and passing the same tests.
All benchmarks are open. No cheating. Just a smart compiler β and a language designed to be optimized.
β Even wallet?! But it's very low-level and tricky!
Even wallet. You just express your thoughts without any tricks β and it works automatically.
β But how? How is it possible to achieve such numbers?
Of course, I've put a lot of smartness into the compiler. A strong type system. Automatic inlining. Built-in serialization. The magic
lazy keyword.But first of all, Tolk is built for readability. These contracts aren't "just cleaner" than their FunC equivalents β they're elegant. No magic. No low-level intrigues. Just clean, consistent logic β whether it's a Jetton or a Wallet.
And gas savings? They are a consequence. I didn't micro-optimize. Each contract was rewritten in about a day β just focusing on clarity. The core principle is simple: once you make it elegant, it automatically becomes efficient.
β Notable changes in Tolk v1.0:
1. Lazy loading β only read what you actually use
2. AST-based inlining β zero-cost getters and methods
3. Peephole optimizations, TVM-11 β smaller code, lower gas
PR on GitHub with detailed info.
Just take a look:
val st = lazy Storage.load();
// the compiler skips everything and loads only what you access
return st.publicKey;
That's it. Lazy loading and partial updates (calculating immutable slices for writing) β one magic
lazy keyword to rule them all.βοΈ The Release. What's inside
- JetBrains IDE plugin β with completion, resolving, etc... β done
- VS Code Extension β with suggestions, stdlib integration, etc... β done
- Language server β for any LSP-compatible editor... β done
- FunC-to-Tolk converter β migrate a project in 10 seconds... β done
- Documentation β for smooth transition from FunC... β done
And the TOLK language itself β exactly as I've visioned it... 7 months ago
π The essence of Numbers
At this moment, abstract yourself from the text. Take a look at the calendar.
Today is 07/07/25 (I mean 2+5, of course).
After the TON Gateway, throughout all November, I was laying out the roadmap towards Tolk v1.0. On December 1, I started working. It means, that the journey till now took exactly 7 months 7 days. If you scroll this channel to the top, you'll see an announcement... Of Tolk v0.7
πͺ What's next?
I could have written about my plans β for the language, TVM, ABI, TypeScript wrappers... but I won't.
Because today, instead of rushing into the future, maybe we can allow ourselves to look back.
To pause the endless race β just for a moment.
To notice how many beautiful coincidences pass us by β unnoticed in our constant hurry.
Just step outside.
Close your eyes.
Count to seven.
Feel it.
When you're ready β
Let's Tolk