TON Tech
🫧 Tolk v1.2: rich bounced messages, cheap deployment, and a breaking change that you'll love
Tolk v1.2 is here, aligned with TVM 12 — bringing new assembler instructions that make contracts cheaper and cleaner.
This update introduces one breaking change, several powerful new capabilities, and a few quality-of-life improvements across the compiler.
✅ Notable changes in Tolk v1.2:
1. Breaking change: address is now "internal only"
2. Rich bounces: not 256 bits, but the full body on bounce
3. Cheap builder-to-slice, StateInit, and address composition
4. Improved compilation errors
5. Anonymous functions (lambdas)
6. Borrow checker to catch undefined behavior
PR on GitHub with detailed info.
✔ `address` is now "internal only"
Before:
* address meant internal/external/none
Now:
* address — internal only
* address? (nullable) — internal/none, exactly like "maybe address" in @ton/core
* any_address — internal/external/none
In 99% of contracts only internal addresses are used. External ones are rare, and "none" can be expressed as nullable.
struct Storage {
// internal, checked automatically
owner: address
}
With new TVM 12 instructions, addresses are validated automatically during (de)serialization without extra gas — no more manual isInternal() checks.
So yes, it's technically a breaking change, but it removes a ton of noise.
A short migration guide, as well as technical details, available here.
✔ Rich bounced messages
Historically, a bounced message only returned the first 256 bits of the original body.
Now TVM 12 supports rich bounces — which lets you obtain the entire body instead.
createMessage({
bounce: BounceMode.RichBounce,
...
})
In onBouncedMessage, you get access to the original body, exit code, gas used, and more.
Old true/false bounce flags still work for backward compatibility.
Rich bounces simplify complex message flows and inter-contract communication — one of the most painful aspects of TON until now.
✔ Cheap builde
3 · 1.5K ·