⚡️ Remember those weird
Like, when you tried to write this:
Or something similar, but still got that error?
✅ Well, not anymore!
Now you can freely use
🧑🍳 Contributor: Gusarich
👉 Released in: v1.3.1
🆙 To upgrade your projects, use
🍲 Gotta Stay Cookin'
♨️ @tact_kitchen
lvalue expected before ~load_int errors?Like, when you tried to write this:
beginCell().storeInt(42, 7).asSlice().loadInt(7);
Or something similar, but still got that error?
✅ Well, not anymore!
Now you can freely use
.load() or any other extension function on Slices and compile your code successfully!🧑🍳 Contributor: Gusarich
👉 Released in: v1.3.1
🆙 To upgrade your projects, use
npm upgrade, or a similar command in other Node.js package managers.🍲 Gotta Stay Cookin'
♨️ @tact_kitchen
⚡7
⚡️ 0. Cleared invalid return type from
If you've previously tried to assign it's results somewhere, it failed with an unwieldy FunC error. But now, the return type is cleared, so one more unreadable error got out of the way!
If you need its return value for some reason, take a look at Slice.preloadBits()
🧑🍳 Contributor: Gusarich
🐙 Implementation: #388
🍽 To be released in: v1.4.0
⚡️ 1. Added bitwise NOT
🧑🍳 Contributor: Gusarich
🐙 Implementation: #337
🍽 To be released in: v1.4.0
⚡️ 2. Added
They combine operations (
To this:
🧑🍳🎉 Community contributor: Alejandbel
🐙 Implementation: #350
🍽 To be released in: v1.4.0
🍲 When cooking, make sure not to leave the trail of bits
♨️ @tact_kitchen
Slice.skipBits()If you've previously tried to assign it's results somewhere, it failed with an unwieldy FunC error. But now, the return type is cleared, so one more unreadable error got out of the way!
If you need its return value for some reason, take a look at Slice.preloadBits()
🧑🍳 Contributor: Gusarich
🐙 Implementation: #388
🍽 To be released in: v1.4.0
⚡️ 1. Added bitwise NOT
~ operator// Let's flip some bits! (~˘▾˘)~
let nice: Int = ~~~~42 + ~~~~27;
// ~(˘▾˘~)
dump(nice);
🧑🍳 Contributor: Gusarich
🐙 Implementation: #337
🍽 To be released in: v1.4.0
⚡️ 2. Added
&=, |= and ^= operatorsThey combine operations (
&, |, ^) with an assignment, so that you can move from this:a = a & 01000101; // bitwise AND
b = b | 01000101; // bitwise OR
c = c ^ 01000101; // bitwise XOR
To this:
a &= 01000101;
b |= 01000101;
c ^= 01000101;
🧑🍳🎉 Community contributor: Alejandbel
🐙 Implementation: #350
🍽 To be released in: v1.4.0
🍲 When cooking, make sure not to leave the trail of bits
♨️ @tact_kitchen
⚡6
⚡️ Made last semicolon optional in Struct and Message field declarations
🧑🍳 Contributor: anton-trunov
🐙 Implementation: #395
🍽 To be released in: v1.4.0
🍲 The more you shave away, the clearer things become
♨️ @tact_kitchen
// This now works:
struct You { likeJazz: Bool }
// And that works too:
message GuessCoin {
probably: Int as coins;
nothing: Int as coins
// no trailing semicolon above!
}
🧑🍳 Contributor: anton-trunov
🐙 Implementation: #395
🍽 To be released in: v1.4.0
🍲 The more you shave away, the clearer things become
♨️ @tact_kitchen
⚡4
⚡️ Added local type inference for
It's a fancy way of saying that let statements can now be used without specifying a type after the colon. Tact will infer the type from the value of expression on the right.
🧑🍳 Contributor: Gusarich
🐙 Implementation: #198
🍽 To be released in: v1.4.0
🍲 Hey, that's my type!
♨️ @tact_kitchen
let statementsIt's a fancy way of saying that let statements can now be used without specifying a type after the colon. Tact will infer the type from the value of expression on the right.
// Now you can omit the obvious:
let a = 42;
let b = 27;
let c = a + b; // nice
// Explicit approach continues to work:
let d: Int = a + b; // also nice
🧑🍳 Contributor: Gusarich
🐙 Implementation: #198
🍽 To be released in: v1.4.0
🍲 Hey, that's my type!
♨️ @tact_kitchen
⚡8
⚡️ 0. Added a
It nicely mirrors the existing Builder.storeBool() function, loading a single bit as a signed Int and producing
💡 Inspired by a discussion with a community member
🧑🍳 Contributor: Gusarich
🐙 Implementation: #412
🍽 To be released in: v1.4.0
⚡️ 1. Fixed a compilation failure with
Previously, if you've tried to compile the following (or similar):
It produced a compilation error, telling you that
✅ And now it is, so the snippet above compiles just fine.
⁉️ Reported by: howardpen9
🧑🍳 Fixed by: Gusarich
🐙 Implementation: #413
🍽 To be released in: v1.4.0
🍲 Gimme, gimme, gimme your bugs after midnight
♨️ @tact_kitchen
Slice.loadBool() function to the core libraryIt nicely mirrors the existing Builder.storeBool() function, loading a single bit as a signed Int and producing
true if it's 1 in binary, and false otherwise.let slice = beginCell().storeBool(true).asSlice();
let dice = slice.loadBool(); // true
💡 Inspired by a discussion with a community member
🧑🍳 Contributor: Gusarich
🐙 Implementation: #412
🍽 To be released in: v1.4.0
⚡️ 1. Fixed a compilation failure with
as coins serialization in mapsPreviously, if you've tried to compile the following (or similar):
import "@stdlib/deploy";
contract WhatCoin with Deployable {
c: map<Address, Int as coins>; // ← 👀
}
It produced a compilation error, telling you that
coins is unsupported in map values. But that wasn't right, coins serialization format for Ints as map keys and values should've been supported!✅ And now it is, so the snippet above compiles just fine.
⁉️ Reported by: howardpen9
🧑🍳 Fixed by: Gusarich
🐙 Implementation: #413
🍽 To be released in: v1.4.0
🍲 Gimme, gimme, gimme your bugs after midnight
♨️ @tact_kitchen
⚡6
Tact Kitchen
⚡️ 0. Added a Slice.loadBool() function to the core library It nicely mirrors the existing Builder.storeBool() function, loading a single bit as a signed Int and producing true if it's 1 in binary, and false otherwise. let slice = beginCell().storeBool(…
💡 Both those things are somewhat small, but in no way are they minor. That's because they were a direct result of community discussions in Tact chat and elsewhere.
👀 We, as Tact devs, keep an eye on every message left in that chat. And even if they don't get an answer from us or other community members sometimes, their existence provides a great fuel and reference for future improvements, fixes and documentation updates.
❤️ Keep your quality questions and feedback coming, and cool stuff won't have to wait!
🍲 Cooking with great care
♨️ @tact_kitchen
👀 We, as Tact devs, keep an eye on every message left in that chat. And even if they don't get an answer from us or other community members sometimes, their existence provides a great fuel and reference for future improvements, fixes and documentation updates.
❤️ Keep your quality questions and feedback coming, and cool stuff won't have to wait!
🍲 Cooking with great care
♨️ @tact_kitchen
❤7
⚡️ Added extension functions
Got tired of parsing Cells and you're certain of their structure?
Now you'll be able to call
Note, that those functions throw exceptions when the layout of a given Cell or Slice doesn't match the Struct's one.
Let's see them in action:
🧑🍳 Contributor: Gusarich
🐙 Implementation: #418
🍽 To be released in: v1.4.0 (right around the corner!)
🍲 You shall just parse!
♨️ @tact_kitchen
Struct.fromCell() and Struct.fromSlice()Got tired of parsing Cells and you're certain of their structure?
Now you'll be able to call
YourStruct.fromCell() and automagically get your Cells parsed! And it also works on Slices, with YourStruct.fromSlice()Note, that those functions throw exceptions when the layout of a given Cell or Slice doesn't match the Struct's one.
Let's see them in action:
struct Profit {
big: String?;
dict: map<Int, Int as uint64>;
energy: Int;
}
contract MilkMoney with Deployable {
// 100% sure here
get fun gotProfit(src: Cell): Profit {
let profit = Profit.fromCell(src);
return profit;
}
// not 100% sure here,
// being cautious for good reasons
get fun gotProfitSlice(src: Slice): Profit? {
let profit: Profit? = null;
try {
profit = Profit.fromSlice(src);
catch (e) {
dump("Slice doesn't match Profit!");
}
return profit;
}
}🧑🍳 Contributor: Gusarich
🐙 Implementation: #418
🍽 To be released in: v1.4.0 (right around the corner!)
🍲 You shall just parse!
♨️ @tact_kitchen
⚡11
⚡️ hey, pssst, look what they got on the chef's table: https://www.npmjs.com/package/@tact-lang/compiler/v/1.4.0
👉 Some uncooked release notes
🤐 Have a taste, but don’t tell anyone just yet
♨️ @tact_kitchen
👉 Some uncooked release notes
🤐 Have a taste, but don’t tell anyone just yet
♨️ @tact_kitchen
npm
npm: @tact-lang/compiler
Tact is a next-gen smart contract language for TON. Latest version: 1.6.4, last published: 2 days ago. Start using @tact-lang/compiler in your project by running `npm i @tact-lang/compiler`. There are 4 other projects in the npm registry using @tact-lang/compiler.
⚡9
⚡️ Introduced underscores
🧑🍳 Contributor: Gusarich
🐙 Implementation: #338
🍣 Released in: v1.4.0
🍲mic value drop
♨️ @tact_kitchen
_ as unused variable identifiers in foreach and let statements, as well as in catch () clauses try {
// If you don't need the return value
let _ = myReturnIsUseless();
// If you found yourself looking for map length,
// and don't care about neither keys nor values
let counter = 0;
foreach (_, _ in map) {
counter += 1;
}
// If you never wanted that exit code anyways
catch (_) { }🧑🍳 Contributor: Gusarich
🐙 Implementation: #338
🍣 Released in: v1.4.0
🍲
♨️ @tact_kitchen
⚡11
⚡️ Added Mermaid diagrams of trait inheritance and contract dependencies to the compilation report
Did you know, that Tact produces a report of each compilation in markdown format? If not, take a quick look at what it offers:
• Resulting BoC size of the contract in bytes
• TL-B schemes of all Structs and Messages alongside with their Tact signatures
• List of all getter functions
• List of exit codes, both default and produced by calls to require()
And now, Tact also automatically generates neat Mermaid diagrams of trait inheritance and contract dependencies, and puts them in that
🧑🍳 Contributor: Gusarich
🐙 Implementation: #560
🍽 To be released in: v1.4.1
🍲 Look at thisphotograph
♨️ @tact_kitchen
Did you know, that Tact produces a report of each compilation in markdown format? If not, take a quick look at what it offers:
• Resulting BoC size of the contract in bytes
• TL-B schemes of all Structs and Messages alongside with their Tact signatures
• List of all getter functions
• List of exit codes, both default and produced by calls to require()
And now, Tact also automatically generates neat Mermaid diagrams of trait inheritance and contract dependencies, and puts them in that
.md file! Check your build folders once in a while, it's definitely worth it.🧑🍳 Contributor: Gusarich
🐙 Implementation: #560
🍽 To be released in: v1.4.1
🍲 Look at this
♨️ @tact_kitchen
⚡13
🎉 Tact 1.4.1 has just landed on NPM!
🐞 We fixed a gazillion bugs reported by the TON builders and TOL hackathon participants
❤️🔥 Thanks so much for your helpful feedback! It means so much to have such a vibrant community of Tacticians
🍳 Now that bug squashing is out of the way, we are on to adding more exciting features (and inevitably introducing some more bugs along the way). Tact 1.5.0 ingredients are out of the fridge and into the pan.
— The Tact team
🍲 Don’t let update bit rot, go get it!
♨️ @tact_kitchen
🐞 We fixed a gazillion bugs reported by the TON builders and TOL hackathon participants
❤️🔥 Thanks so much for your helpful feedback! It means so much to have such a vibrant community of Tacticians
— The Tact team
🍲 Don’t let update bit rot, go get it!
♨️ @tact_kitchen
Please open Telegram to view this post
VIEW IN TELEGRAM
⚡21
Hey Tacticians, we are hungry for your honest opinion ⚡️
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from TON Dev News
Attention Developers!
We need your valuable insights to make the TON & Telegram Apps platform even better! 🚀
As a token of our appreciation, every developer who completes our questionnaire will receive an exclusive SBT from TON Society! 🎁
Your feedback is crucial in shaping the future of our ecosystem. Take a few minutes to share your thoughts and experiences with us.
👉 Start the Questionnaire Now
Thank you for being a vital part of our community and helping us build a stronger, more vibrant platform!
We need your valuable insights to make the TON & Telegram Apps platform even better! 🚀
As a token of our appreciation, every developer who completes our questionnaire will receive an exclusive SBT from TON Society! 🎁
Your feedback is crucial in shaping the future of our ecosystem. Take a few minutes to share your thoughts and experiences with us.
👉 Start the Questionnaire Now
Thank you for being a vital part of our community and helping us build a stronger, more vibrant platform!
Forwarded from TON Dev News
🐞 Misti – TON Static Program Analyzer
The first release of Misti – a static program analyzer for the TON blockchain has landed!
🐛 Detect Vulnerabilities: Identify and fix potential security flaws early in the development cycle.
🛠 Create Custom Detectors: Solve specific problems in your code or provide a thorough security review if you are an auditor.
📄 Improve Code Quality: Maintain high standards by catching bugs and enforcing best practices automatically.
🚀 Streamline Development: Integrate Misti into your CI/CD pipeline to ensure continuous code quality checks.
💎 Language Support: Tact ⚡ is supported; FunC support is planned.
- GitHub: https://github.com/nowarp/misti, contributions are very welcome!
- Documentation: https://nowarp.github.io/tools/misti/docs
- Telegram Group: @misti_dev
The first release of Misti – a static program analyzer for the TON blockchain has landed!
🐛 Detect Vulnerabilities: Identify and fix potential security flaws early in the development cycle.
🛠 Create Custom Detectors: Solve specific problems in your code or provide a thorough security review if you are an auditor.
📄 Improve Code Quality: Maintain high standards by catching bugs and enforcing best practices automatically.
🚀 Streamline Development: Integrate Misti into your CI/CD pipeline to ensure continuous code quality checks.
💎 Language Support: Tact ⚡ is supported; FunC support is planned.
- GitHub: https://github.com/nowarp/misti, contributions are very welcome!
- Documentation: https://nowarp.github.io/tools/misti/docs
- Telegram Group: @misti_dev
GitHub
GitHub - nowarp/misti: TON Static Analyzer
TON Static Analyzer. Contribute to nowarp/misti development by creating an account on GitHub.
⚡10
🎉 Tact 1.4.2 has just landed on NPM!
🐞 We fixed a few type-checking and code generation bugs. One of the most important fixes is that getters again return flattened types for structs as it used to be. We broke it while trying to allow structs with more than 15 fields. Please give it a try and let us know if the issue is gone now — all your bug reports are really appreciated.
🛠 A bunch of the other changes include improved support for the misti static smart-contract analyzer — give it a try, it’s in early stage of development but already found some issues in soon-to-be released projects.
— The Tact team
♨️ @tact_kitchen
🐞 We fixed a few type-checking and code generation bugs. One of the most important fixes is that getters again return flattened types for structs as it used to be. We broke it while trying to allow structs with more than 15 fields. Please give it a try and let us know if the issue is gone now — all your bug reports are really appreciated.
🛠 A bunch of the other changes include improved support for the misti static smart-contract analyzer — give it a try, it’s in early stage of development but already found some issues in soon-to-be released projects.
— The Tact team
♨️ @tact_kitchen
⚡14
🎉 Tact 1.4.3 has just landed on NPM!
🐞 We fixed a couple more issues and provided a fix for a special case of optional types in getter return types. Happy hacking, Tacticians!
— The Tact team
♨️ @tact_kitchen
🐞 We fixed a couple more issues and provided a fix for a special case of optional types in getter return types. Happy hacking, Tacticians!
— The Tact team
♨️ @tact_kitchen
⚡11
🎉 Tact 1.4.4 has just landed on NPM!
Fixed a few bugs and added AST equality comparison API mostly for third-party tools, like the misti static smart-contract analyzer. The API also be used to compare contracts without taking into account whitespace, comments or even order of definitions and declarations.
More details as always can be found in the changelog.
— The Tact team
♨️ @tact_kitchen
Fixed a few bugs and added AST equality comparison API mostly for third-party tools, like the misti static smart-contract analyzer. The API also be used to compare contracts without taking into account whitespace, comments or even order of definitions and declarations.
More details as always can be found in the changelog.
— The Tact team
♨️ @tact_kitchen
⚡8
🎉 Misti 0.2 has just landed on NPM!
🔍 Five New Tact Detectors: Сonstant Address, Branch Duplicate, `dump` Is Used, Field Initialized Twice, Prefer Augmented Assignment.
🛠 Blueprint Support: Introducing the new Blueprint Plugin.
🔧 Fixes & Enhancements: More configuration options and various fixes. Check out the full changelog.
♨️ @tact_kitchen
🔍 Five New Tact Detectors: Сonstant Address, Branch Duplicate, `dump` Is Used, Field Initialized Twice, Prefer Augmented Assignment.
🛠 Blueprint Support: Introducing the new Blueprint Plugin.
🔧 Fixes & Enhancements: More configuration options and various fixes. Check out the full changelog.
♨️ @tact_kitchen
nowarp.io
Welcome to Misti | Misti
The TON Static Analyzer
⚡8
asm-functions are coming in the future Tact v1.5.0 release, so you can tap into the power of TVM directly.This will be valid Tact code
asm fun keccak256(s: Slice): Int {
1 INT HASHEXT_KECCAK256
}
// … more stuff …
let h = keccak256(yourSlice);— The Tact team
♨️ @tact_kitchen
Please open Telegram to view this post
VIEW IN TELEGRAM
⚡14
Forwarded from TON Dev News
🎉 Tact v1.5.0 has just been released
The new Tact release v1.5.0 just landed on NPM! Here are the highlights of the most important features.
🛠 New Tact features
asm functions allow you to access the deep dark corners of TVM for more features or better performance:
- A wider range of serialization options for integers can now be used, not just 8, 16, 32, 64, 128 and 256-bit integers, but anything in between:
- Constant definitions now support calls to user-defined functions and references to other constants:
👩💻 New builtin and stdlib functions and methods
- The exists method for the
- The
- The
- The new
- The new stdlib functions to help with fee calculations:
- The
🐞 The new release also includes a bunch of bugfixes. Thanks to all the Tacticians for all the issues you open!
📜 Full changelog for Tact v1.5.0: https://github.com/tact-lang/tact/blob/main/CHANGELOG.md#150---2024-09-15
The new Tact release v1.5.0 just landed on NPM! Here are the highlights of the most important features.
🛠 New Tact features
asm functions allow you to access the deep dark corners of TVM for more features or better performance:
asm fun keccak256(s: Slice): Int {
1 INT HASHEXT_KECCAK256
}
asm functions have some limitations at this point and the Tact team will make them even more powerful in the next releases.- A wider range of serialization options for integers can now be used, not just 8, 16, 32, 64, 128 and 256-bit integers, but anything in between:
uint1 through uint256 and int1 through int257. For instance, a 48-bit timestamp can be defined now if you'd like to build contracts that can work after the year 2038:
contract Contract {
timestamp: Int as uint48
}
- Constant definitions now support calls to user-defined functions and references to other constants:
const CONSTANT: Int =
myFunction(OTHER_CONSTANT)
👩💻 New builtin and stdlib functions and methods
- The exists method for the
Map type: m.exists(key) which is equivalent to m.get(key) != null.- The
deepEquals method for the Map type: m1.deepEquals(m2) -- you can now easily compare two maps with the same key-value pairs and get true as the result, even if their internal representations are different, so the hash-based == comparison would return false.- The
toSlice method for structs and messages: struct.toSlice().- The new
slice, rawSlice, ascii and crc32 built-in compile-time functions to help you define constant integers and slices more conveniently.- The new stdlib functions to help with fee calculations:
gasConsumed, getComputeFee, getStorageFee, getForwardFee, getSimpleComputeFee, getSimpleForwardFee, getOriginalFwdFee, myStorageDue. This brings you access to the TVM instructions from 2023.07 and 2024.04 upgrades.- The
parseStdAddress and parseVarAddress stdlib functions allow you to parse slices into structured addresses.🐞 The new release also includes a bunch of bugfixes. Thanks to all the Tacticians for all the issues you open!
📜 Full changelog for Tact v1.5.0: https://github.com/tact-lang/tact/blob/main/CHANGELOG.md#150---2024-09-15
⚡14
🎉 Misti 0.3 has just landed on NPM!
⚡️Tact 1.5 Support
🔍 Five New Tact Detectors: String Receivers Overlap, Asm Is Used, Preferred Stdlib API, Inherited State Mutation, Argument Copy Mutation.
🔧 Fixes & Enhancements: More configuration options, optimization and API improvements. Check out the full changelog.
♨️ @tact_kitchen
⚡️Tact 1.5 Support
🔍 Five New Tact Detectors: String Receivers Overlap, Asm Is Used, Preferred Stdlib API, Inherited State Mutation, Argument Copy Mutation.
🔧 Fixes & Enhancements: More configuration options, optimization and API improvements. Check out the full changelog.
♨️ @tact_kitchen
nowarp.io
Misti
TON Static Analyzer
⚡8