Releases: tact-lang/tact
Releases · tact-lang/tact
Release 1.6.13
Language features
- Support
fromCell()
andfromSlice()
methods on contract types: PR #3305
Release contributors
Release 1.6.12
Language features
- Support
toCell()
andtoSlice()
methods on contract types: PR #3274 - No explicit re-declarations for abstract methods and constants in traits: PR #3272
- A more informative error message if two
require()
calls have the same generated error code: PR #3286
Code generation
- Inline message deserialization for better gas consumption: PR #2993
Docs
Release contributors
Release 1.6.11
Language features
- [fix] Balanced quotation in error messages for out-of-project-root imports: PR #3242
- [fix] Disallow self-inheritance for contracts and traits: PR #3094
- [fix] Added fixed-bytes support to bounced message size calculations: PR #3129
- [fix] Fixed compiler errors for trait return types: PR #3197
- [fix] Added checks for trait returns in non-shuffle asm functions: PR #3197
- [fix] Allow equivalent
as
-annotations for maps types: PR #3172 - [fix] Added static/instance checks for core static methods: PR #3119
- [fix] Compiler now correctly counts the size of fields for maps in bounced messages: PR #3255
- [fix] Compiler now allows
bounced<T>
as a return type of assembly functions: PR #3259
Code generation
- Compiler now generates more efficient code for slice serialization: PR #3213
- Improve gas consumption for equality comparisons of optionals: PR #3233
- Improve gas consumption for deserialization of optional addresses: PR #3225
- Compiler now generates more efficient code for
if-throw
pattern withthrow_if/throw_unless
call: PR #3216 - [fix] Detect out-of-range exit codes for the special case of a fallback receiver with
throw
: PR #3244 - [fix] Correct transformation of binary and octal message opcodes to hexadecimal format: PR #3239
- [fix] Added escaping of special-chars in receiver comments break FunC compilation: PR #3234
- [fix] Disable optimization of optional integer comparisons that leads to runtime exceptions: PR #3210
- [fix] Compiler now doesn't generate
__tact_nop()
fordump()
anddumpStack()
in default mode: PR #3218 - [fix] Correct long struct tuple destruction: PR #3105
- [fix] Arguments of the
==
and!=
operators get evaluated in the left-to-right order: PR #3252
Docs
- Changed the title of the "Gas-expensive" badge to "500+ gas" to avoid confusion when discussing relative gas-efficiency: PR #3120
- Added description of
safety
-relatedtact.config.json
options to gas and security best practice pages: PR #3206
Release contributors
Release 1.6.10
Infrastructure
- [fix] Explicit dependencies to fix Blueprint integration: PR #3088
Release contributors
Release 1.6.9
TypeScript third-party API
- [fix] Move logs-related TS files to separate folder: PR #3082
Release contributors
Release 1.6.8
Breaking changes
- [stdlib] Compiler now reports an error if
VarAddress
orparseVarAddress()
is used, since starting
from TVM 10 they are mostly not supported: PR #3067.
Language features
- [fix] Compiler now correctly handles optional slices, builders, and strings when generating serialization logic: PR #3053
- [fix] Compiler now disallows type usages as value (e.g.
let x = Int
orlet x = MyStruct
): PR #3065
Code generation
Tooling
- [fix] Formatter now correctly handles floating comments: PR #2995
- [fix] Formatter now correctly handles inline comments after the last declaration: PR #3064
- [fix] Formatter now correctly handles floating comments after import: PR #3071
- [fix] Formatter now better supports comments inside chained method calls: PR #3070
Docs
- Enabled format checking across the Cookbook: PR #2980
- Added references to https://github.com/tact-lang/defi-cookbook: PR #2985
- Added description of the "unreachable code" errors and enhanced the descriptions of the
return
statement: PR #2750 - Fixed description of the unary plus
+
operator: PR #3016 - Documented that map key-value types and the inner message type of the
bounced<M>
type constructor cannot be nullable: PR #3017 - Lowercased "Struct" everywhere except at the beginning of sentences: PR #3021
- Reworked the optionals page: PR #3002
Release contributors
Release 1.6.7
Language features
- Fixed incorrect error message for bounced messages: PR #2932
- Added compile-time map literals: PR #2881
- Added the
inMsg()
built-in function as an optimized version ofmsg.toSlice()
: PR #2850 - Compiler now generates more efficient code for structure fields serialization: PR #2836
- Compiler now generates more efficient code for
Address?
fields deserialization: PR #2834 - Optimized
self.notify
,self.reply
, andself.forward
inBaseTrait
by using themessage
function directly where possible and avoiding unnecessary use of alias: PR #2515 - Compiler now generates more efficient code for
if
statements: PR #2844 - Any message now has an
opcode()
method to obtain its opcode: PR #2886 - Contract
init
function now can have parameters withas
annotations: PR #2890 - [fix] Compiler now correctly handles get functions with an empty message parameter: PR #2892
Standard Library
- Improved gas consumption of the
cashback
function: PR #2882 - Improved gas efficiency for the
BaseTrait
functions: PR #2913
Tooling
- Formatter now shortens
Foo { value: value }
toFoo { value }
: PR #2884 - Formatter now supports formatting several files and directories: PR #2906
- [fix] Formatter now correctly formats trailing comments after the last field: PR #2912
Docs
- Added
inMsg()
function to the gas best practices page: PR #2850 - Fixed the description of
StateInit.hasSameBasechainAddress()
function: PR #2848
Release contributors
Release 1.6.6
Language features
- Optimized message deserialization with native loading of
Maybe Cell
fields: PR #2661 - Optimized message serialization with native stores of
Maybe Cell
fields: PR #2647 - Zero inequality comparison optimization: PR #2655
- Compiler now generates more readable code for augmented assignment operators: PR #2710
- [fix] Compiler now disallows
ton()
with empty or blank string: PR #2681 - [fix] Compiler now disallows
ton()
with invalid number value or negative numbers: PR #2684 - [fix] Compiler now shows a more informative error message for abstract functions and constants without a body: PR #2688
- [fix] Compiler now correctly processes nested structs with default values in the interpreter: PR #2687
- [fix] Compiler now correctly compiles contracts with optional struct fields with default values: PR #2683
- [fix] Compiler now shows a more informative error message for unsupported assembly functions inside traits and contracts: PR #2689
- [fix] Compiler now shows a more informative error message for
Slice? as remaining
fields: PR #2694 - [fix] Compiler now shows a more informative error message for fields with unsupported trait types: PR #2695
- [fix] Compiler now correctly generates code for functions with several wildcard parameters: PR #2703
- [fix] Compiler now checks that "override" functions and constants have a virtual or abstract modifier in the parent trait: PR #2700
- [fix] Compiler now throws an error if a non-optional method is called on an optional type: PR #2770
- [fix] Compiler now throws an error when inheriting from two traits that have methods with the same name: PR #2773
- [fix] Compiler now correctly generates code for the unary plus operator: PR #2807
- [fix] Compiler now shows a full error message for maps with optional value: PR #2810
- [fix] Compiler now correctly detects mutually recursive types: PR #2814
- [fix] Generated TypeScript wrappers now export all functions for serialization/deserialization: PR #2706
- [fix] Processing of
null
values of optional types in thedump
builtin: PR #2730 - [fix] Support constants as the second parameter of the
require()
function: PR #2808
Standard Library
- Added compute phase exit code constants reserved by the Tact compiler:
TactExitCodeNullReferenceException
,TactExitCodeInvalidSerializationPrefix
,TactExitCodeInvalidIncomingMessage
,TactExitCodeConstraintsError
,TactExitCodeAccessDenied
,TactExitCodeContractStopped
,TactExitCodeInvalidArgument
,TactExitCodeContractCodeNotFound
,TactExitCodeInvalidStandardAddress
,TactExitCodeNotBasechainAddress
: PR #2527 - Added the
SignedBundle
struct and the correspondingverifySignature
method: PR #2627 - Added the
sendRawMessage
andsendRawMessageReturnForwardFee
functions instead of the deprecatednativeSendMessage
andnativeSendMessageReturnForwardFee
functions correspondingly: PR #2755 - Optimized the
sha256()
function to about ~270 less gas used per call and added thekeccak256()
function: PR #2775
Tooling
- Added source code formatter: PR #2768
TypeScript third-party API
- Support contract parameters in the AST printer: PR #2658
Docs
- Fixed code example of the
initOf
expression to highlight support for contract parameters: PR #2550 - Fixed the description of the Tact-reserved exit code 129 and expanded descriptions of functions that can throw it, such as
Message.fromCell()
andMessage.fromSlice()
: PR #2604 - Added "Learn Tact in Y minutes" page to the Book: PR #2375
- Ensured that variables are always shown declared with immediate initialization, and made it clear in the descriptions of the
let
statement: PR #2742 - Fixed the description of the Unicode escape upper bound (U+10FFFF): PR #2752
- Added generation of
llms.txt
,llms-full.txt
(full version), andllms-small.txt
(compact version, with non-essential content removed): PR #2763 - Added description of the specialized math functions, such as
pow2()
andlog2()
, to the gas best practices page: PR #2771 - Added
BasechainAddress
to the gas best practices page: PR #2802
Release contributors
Release 1.6.5
Language features
- Optimized
Context().sender
to usesender()
function for better gas efficiency: PR #2427 - [fix] Ternary operator with struct and null: PR #2432
- [fix] Show an error message for assembly functions with the
get
attribute: PR #2484 - [fix] The parser does not throw an internal compiler error if the error is reported after the end of the file: PR #2485
- [fix] Always show an error when calling the
dump()
function with an argument of the unsupportedStringBuilder
type: PR #2491 - [fix] The grammar now disallows the augmented assignment operators with whitespace between the operator and the equals sign: PR #2492
- [fix] Generated code now short-circuits
&&=
and||=
operators: PR #2494 - [fix] Get methods that return optional contract state now work correctly: PR #2512
- [fix] Get methods that return contract state for empty contracts now work correctly: PR #2517
- [fix] Skip checking if the slice has been parsed completely when parsing a message (
Message.fromSlice()
) with the last field of the typeSlice as remaining
: PR #2524 - [fix] The wildcard symbol (
_
) cannot be used as an identifier in any context, including struct/message fields or contract names: PR #2519
Standard Library
- Deprecated the
SendPayGasSeparately
constant in favor ofSendPayFwdFeesSeparately
: PR #2483 - Time-related functions are now located in the
std/internal/time.tact
file: PR #2507 - [fix] The
Stoppable
trait now usesthrowUnless
with exit code 133 instead ofrequire
with "Contract stopped" message: PR #2503
Code generation
- [fix] Save the contract state on early
return
from receivers: PR #2482
Internal infrastructure
internalExternalReceiversOutsideMethodsMap
has been reworked to ensure compatibility with explorers: PR #2398
Docs
- Fixed description of the
dump()
function, which does not support values ofStringBuilder
type: PR #2463 - Explicitly stated that structs cannot be empty, while message structs can: PR #2464
- Fixed description of the
contractAddressExt()
function, which currently does not resolve constant values at compile-time and allows specifying arbitrarychain
IDs: PR #2497 - Fixed description of
getOriginalFwdFee()
andContext.readForwardFee()
functions, where the latter calls the former at the end of its execution: PR #2521
Release contributors
Special thanks
- Ilya Aksakov and the RSquad team
Release 1.6.4
Language features
- Applied parameters rearrangement only for ASM methods with a single parameter to avoid confusion: PR #2410
- Reduced gas usage for contracts with some special cases of binary and fallback receivers: PR #2396
Standard Library
- Added
forceWorkchain()
function: PR #2387
Compilation report
- [fix] TL-B for
Address?
is notMaybe Address
, but plainAddress
: PR #2386
Internal infrastructure
- Removed
postinstall
frompackage.json
to not run scripts with dev dependencies on the user side: PR #2382
Docs
- Removed the "gas-expensive" badge from
checkSignature()
andcheckDataSignature()
functions and added a caution note when they do become expensive (from 11th call): PR #2380 - Fixed descriptions of
Slice.asString()
andString.asSlice()
functions: PR #2391 - Split Core libraries in the reference:
core-common
andcore-advanced
were removed, and their contents were distributed across other libraries;core-crypto
,core-contextstate
,core-send
,core-gas
, andcore-addresses
were introduced: PR #2391 - Added documentation for
BasechainAddress
,emptyBasechainAddress
,newBasechainAddress
,contractBasechainAddress
,Builder.storeBasechainAddress
: PR #2411