Tact Kitchen
532 subscribers
36 photos
4 videos
60 links
πŸ§‘β€πŸ³ Peek behind the scenes and into the steaming pot of hot updates to Tact compiler, tooling, documentation and ecosystem

⚑️ You know what's cooking β€” Tact!
⌨️ Sources: github.com/tact-lang
πŸ‘‰ t.me/boost/tact_kitchen

Brought to you by the Tact team
Download Telegram
πŸŽ‰ Tact v1.6.10 is released!

Recently, TVM version 10 was rolled out in the mainnet. It introduced a number of new and interesting changes, the most notable being the addition of extra currencies and the removal of anycast addresses in favor of fixed address prefixes, which allows deploying a contract to an arbitrary shard. The Tact team has already begun work on preparing convenient ways to work with both.

However, TVM v10 also effectively removed the variable-length addresses, addr_var, which made the Tact's VarAddress struct and parseVarAddress() function obsolete. We had to adjust to those changes as soon as possible, while bringing other important fixes we've made along the way.

That road was a bit bumpy, as third-party dependencies crippled up and had to be dealt with special care. Two extra patch versions of the Tact compiler were needed along the way to ensure that the resulting version 1.6.10 was stable, well-built and battle-proven.

With that out of the way, let's see the fixes applied:

🧰 Breaking changes in the standard library

With TVM version 10 available in the mainnet, if you try to use the TVM instructions related to the now deprecated addr_var (variable-length addresses), you'll get an exit code 9. That happens because those addresses got deprecated and removed from pretty much any place where they could've been used, and the instructions that work with them did not introduce a special "deprecated" exit code and started re-using the existing one.

Thus, to prevent your new contracts from unwanted failures, the Tact compiler now reports the usage of the VarAddress struct and the parseVarAddress() function as a compilation error.

πŸ›  Bug fixes

Compiler:
β€’ Now, it correctly handles optional slices, builders, and strings when generating serialization logic
β€’ Usage of type identifiers as values in expressions were disallowed, e.g. let x = Int or let x = MyStruct are now prohibited

Formatter:
β€’ Floating comments are now handled correctly
β€’ Inline comments after the last declaration in the file are now handled correctly
β€’ Floating comments after import are now handled correctly
β€’ Finally, formatter now has a better support of comments inside chained method calls

🧳 Miscellaneous improvements

β€’ The latest v2025.04 WASM build of FunC and Fift compilers is now used in Tact. Aside from other things, that update fixed the SDBEGINS and SDBEGINSQ instructions.
β€’ We've did a number of documentation updates, read more here.

πŸ“₯ Upgrade Tact in your projects

New specifications are brewing behind the scenes, with new tools being tested and polished enough to share a public link.

However, the link is out there, and you can trace it from the developers' most frequently opened website.

🍲 sharded jockey
♨️ @tact_kitchen from the @ton_studio
⚑10
Forwarded from Positive Web3
We’ve launched the ultimate hunt for bugs and hacker mastery β€” the epic CTF has begun at positive.com/ctf!

On the menu: blazing challenges in EVM and TON security β€” plus one juicy Bug Bounty worth 100 TON!
⚑4
πŸŽ‰ Tact v1.6.12 is released!

This is another joint release: both v1.6.11 and v1.6.12 were published consecutively. The former focused on fixing bugs and implementing performance optimizations, while the latter introduced new quality-of-life features, such as support for toCell() and toSlice() methods on contract types, as well as improvements in trait-based inheritance attributes.

By using the v1.6.12, you get the benefits of both at once. However, before we begin unpacking both, we'd like to give a big shout-out to our new community contributors: hazyone and lordivash. Major kudos to hazyone for opening seven valuable pull requests, listening to the feedback from the Tact team and working on PRs until completion!

Now, let's get back to the release notes.

⛽️ Gas optimizations

Version 1.6.12 marks a new optimization victory of Tact over FunC. Based on the public benchmarks, Tact's _port_ of Jetton contracts consumes 2515 fewer gas units for transfer, 912 fewer for burn, and 437 fewer gas units for discovery compared to the reference FunC code.

These are our best numbers to date, but we don't intent to stop β€” apart from improving the compiler and the benchmarks, we also tend to our idiomatic Tact implementation of Jettons and other standard contracts.

The latest achievements of v1.6.11 and v1.6.12 were possible in part to those optimizations:

β€’ Compiler now generates more efficient code for Slice serialization and if-throw patterns with throwIf() and throwUnless() function calls
β€’ Deserialization of messages and optional addresses was improved
β€’ Gas consumption of equality comparisons of optionals was reduced

πŸ›  Bug fixes

Most of bugs were found and squished in v1.6.11. That said, here are most notable ones from both releases:

β€’ Now, if two require() calls generate the same error code, there is a clear and informative error message
β€’ Self-inheritance of traits and contracts was disallowed, and the need in explicit overrides of abstract methods and constants in traits was removed
β€’ Arguments of the == and != operators now are evaluated in the left-to-right order
β€’ Special characters in comment receivers are now better escaped
β€’ No-op instructions are no longer added for dump() and dumpStack() when the debug mode is off
β€’ Map size is now correctly counted for the bounced messages, and equivalent as-annotations of map types are now accepted β€” for example, Int is identical to Int as int257, Int as varuint16 is identical to Int as coins, etc.
β€’ Issues with trait return types were resolved
β€’ The special type constructor bounced<M> is now allowed as a return type of assembly functions

For the full list, read the release notes of v1.6.11.

🧰 Standard library additions and changes

In Tact, contracts themselves can be represented as struct types by their persistent state variables. You might've seen the following pattern used to obtain the complete contract's state in a single getter:

get fun state(): ContractName {
return self; // all the contract's variables at once
}


Now, you can also call toCell() and toSlice() methods on the contract types! If a contract doesn’t use parameters, the resulting Cell or Slice will contain a leading one bit representing the lazy initialization bit of the init() function.

🧳 Miscellaneous improvements

β€’ The functions page in the docs got a complete overhaul. Go check it out, your time starts now.

β€’ Described safety-related tact.config.json options on gas and security best practice pages.

β€’ Tact language server and VSCode extensions got a lot of performance updates and feature enhancements.

πŸ“œ See the full release notes for Tact v1.6.11 and v1.6.12
πŸ“₯ And upgrade Tact in your projects

You may have noticed the update of Tact's branding β€” it started with the renewed logo and banner of the X/Twitter account, then continued through our GitHub, Telegram chat, and documentation. How do you find it? Tell us in the comments below.

🍲 tact labubu wen
♨️ @tact_kitchen from the @ton_studio
⚑11
πŸŽ‰ Tact Language Server & VS Code Extension v0.8.0 are live!

Smarter code insight, TL-B support, fresh UI touches and a faster, quieter indexer β€” all wrapped into v0.8.0 release!

πŸš€ Headline features

β–ͺ️ Flexible toolchain picker – point the extension at any local Tact toolchain and switch them on the fly.
β–ͺ️ TL-B first-class citizen – syntax highlighting, completions, document symbols, go-to-references and inline highlighting inside Tact comments.
β–ͺ️ Next level navigation – search for functions by type, easily navigate with code lenses with go-to places where messages were sent and received
β–ͺ️ Fresh inspections – CanBeInline (with quickfix), DeprecatedSymbolUsage, MissedMembersInContract (with quickfix), NamingConvention, OptimalMathFunctions.

πŸ“œ And that's not all 😎, check out our changelog to find all the improvements and fixes in the new release, and also see our X/Twitter thread with the announcement.

πŸ“₯ Upgrade now via VS Code marketplace or Open VSX
✨ Happy hacking!

🍲 intelli-tact, you're next
♨️ @tact_kitchen from the @ton_studio
⚑11