TGViewer
Tact Kitchen Tact Kitchen @tact_kitchen · 505 subscribers
Post #34 477
🎉 Tact 1.5.2 has just landed on NPM!

Remember, that we've introduced asm functions in version 1.5.0 for you to write TVM assembly right in your Tact code?


asm fun keccak256(s: Slice): Int {
1 INT HASHEXT_KECCAK256
}


🐞 With this bugfix release, you now can use full* range of its syntax just like you could in similar asm functions of FunC. Just don't do anything too crazy, like trying to shadow (re-define) { or }, or using char } inside your newly defined instructions.

Other than that, have it your way. Note, that support of full Fift+TVM syntax is highly experimental, and will be reworked in future releases, in particular the following works now, but most likely won’t work at some point:

fun onchainSha256(data: String): Int {
_onchainShaPush(data);
while (_onchainShaShouldProceed()) {
_onchainShaOperate();
}
return _onchainShaHashExt();
}

// Helper assembly functions,
// each manipulating the stack in their own ways
// in different parts of the `onchainSha256()` function
asm fun _onchainShaPush(data: String) { ONE }
asm fun _onchainShaShouldProceed(): Bool {
OVER SREFS 0 NEQINT
}
asm fun _onchainShaOperate() {
OVER LDREF s0 POP CTOS s0 s1 XCHG INC
}
asm fun _onchainShaHashExt(): Int {
HASHEXT_SHA256
}


🐞 Additionally, all new installations of @tact-lang/compiler or @ton/blueprint via npm should work as expected. All other package managers continue to work fine, so create more awesome projects! We'll handle the rest ❤️

👀 And keep an eye on the docs, something big might happen very soon!

🍲 every contract is open source if you can read bytecode
♨️ @tact_kitchen
  • ⚡ 8
More from @tact_kitchen
  1. May 30, 2025🎉 Tact Language Server & VS Code Extension v0.8.0 are live! Smarter code insight, TL-B su…
  2. May 28, 2025🎉 Tact v1.6.12 is released! This is another joint release: both v1.6.11 and v1.6.12 were…
  3. May 22, 2025We’ve launched the ultimate hunt for bugs and hacker mastery — the epic CTF has begun at p…
  4. May 19, 2025🎉 Tact v1.6.10 is released! Recently, TVM version 10 was rolled out in the mainnet. It in…
  5. May 7, 2025For you all, JetBrains IDEs lovers: intelli-tact plugin release 📸 🍲 got IDEA? ♨️ @tact_k…
  6. May 7, 2025🎉 Tact v1.6.7 is released! We've been listening to your feedback and analyzing the code w…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →