You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dev-docs/CHANGELOG.md
+39-1
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
24
-`nullChecks` config option to disable run-time null checks for the `!!` operator in order to save gas: PR [#1660](https://github.com/tact-lang/tact/pull/1660)
25
25
-`loadVarInt16`, `loadVarUint16`, `loadVarInt32`, `loadVarUint32` methods for the `Slice` type: PR [#1667](https://github.com/tact-lang/tact/pull/1667)
26
26
- New functions in stdlib from `stdlib.fc` and `math.fc`: `Builder.depth`, `Slice.skipLastBits`, `Slice.firstBits`, `Slice.lastBits`, `Slice.depth`, `Cell.computeDataSize`, `Slice.computeDataSize`, `Cell.depth`, `curLt`, `blockLt`, `setGasLimit`, `getSeed`, `setSeed`, `myCode`, `sign`, `divc`, `muldivc`, `mulShiftRight`, `mulShiftRightRound`, `mulShiftRightCeil`, `sqrt`: PR [#986](https://github.com/tact-lang/tact/pull/986)
27
+
- The `--output` CLI flag for specifying custom output directory in single-contract compilation: PR [#1793](https://github.com/tact-lang/tact/pull/1793)
28
+
- New functions `Slice.asAddressUnsafe` and `contractHash` in stdlib: PR [#1766](https://github.com/tact-lang/tact/pull/1766)
27
29
28
30
### Changed
29
31
@@ -45,6 +47,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
45
47
- Better error message for `unresolved name` error: PR [#1595](https://github.com/tact-lang/tact/pull/1595)
46
48
- Better error message for `unresolved global function` error: PR [#1610](https://github.com/tact-lang/tact/pull/1610)
47
49
- Better error message for `extend function without parameters` error: PR [#1624](https://github.com/tact-lang/tact/pull/1624)
50
+
- Don't generate `lazy_deployment_completed` by default: PR [#1717](https://github.com/tact-lang/tact/pull/1717)
51
+
- Optimized `emptyCell()` and `emptySlice()` functions: PR [#1696](https://github.com/tact-lang/tact/pull/1696)
52
+
- Internal `crc16` function is now verifiable and covered with tests: PR [#1739](https://github.com/tact-lang/tact/pull/1739)
53
+
- Rearrange parameters of some asm methods in order described in `AsmShuffle`: PR [#1702](https://github.com/tact-lang/tact/pull/1702)
54
+
- Error message for invalid type for function argument now shows expected type: PR [#1738](https://github.com/tact-lang/tact/pull/1738)
48
55
49
56
### Fixed
50
57
@@ -80,13 +87,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
80
87
- Runtime `sha256` now work for arbitrary strings with length >= 128: PR [#1626](https://github.com/tact-lang/tact/pull/1626)
81
88
- Generated code in TypeScript wrappers for contract with `init(init: Init)`: PR [#1709](https://github.com/tact-lang/tact/pull/1709)
82
89
- Error message for comment (text) receivers with 124 bytes or more: PR [#1711](https://github.com/tact-lang/tact/pull/1711)
90
+
- Support overriding constants and methods of BaseTrait: PR [#1591](https://github.com/tact-lang/tact/pull/1591)
91
+
- Forbid traits inherit implicitly from BaseTrait: PR [#1591](https://github.com/tact-lang/tact/pull/1591)
92
+
- Forbid the `override` modifier for constants without the corresponding super-constant: PR [#1591](https://github.com/tact-lang/tact/pull/1591)
93
+
- Check map types for `deepEquals` method: PR [#1718](https://github.com/tact-lang/tact/pull/1718)
94
+
- Remove "remainder" from error messages: PR [#1699](https://github.com/tact-lang/tact/pull/1699)
95
+
- Check map types for `deepEquals` method: PR [#1718](https://github.com/tact-lang/tact/pull/1718)
83
96
84
97
### Docs
85
98
86
99
- Added the `description` property to the frontmatter of the each page for better SEO: PR [#916](https://github.com/tact-lang/tact/pull/916)
87
100
- Added Google Analytics tags per every page: PR [#921](https://github.com/tact-lang/tact/pull/921)
- Added security best practices: PR [#1070](https://github.com/tact-lang/tact/pull/1070)
91
104
- Added automatic links to Web IDE from all code blocks: PR [#994](https://github.com/tact-lang/tact/pull/994)
92
105
- Added initial semi-automated Chinese translation of the documentation: PR [#942](https://github.com/tact-lang/tact/pull/942)
@@ -116,9 +129,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
116
129
- Removed the notion of the non-standard TL-B syntax `remainder<X>`: PR [#1599](https://github.com/tact-lang/tact/pull/1599)
117
130
- Added description of `.boc`, `.ts`, `.abi`, `.pkg` files and completed Compilation page: PR [#1676](https://github.com/tact-lang/tact/pull/1676)
118
131
- Marked gas-expensive functions and expressions: PR [#1703](https://github.com/tact-lang/tact/pull/1703)
132
+
- Added a Security audits page, with the first assessment from the Trail of Bits: PR [#1791](https://github.com/tact-lang/tact/pull/1791)
133
+
- Listed functions with implicit mode and further clarified the interactions of message sending functions and their modes: PR [#1634](https://github.com/tact-lang/tact/pull/1634)
119
134
120
135
### Release contributors
121
136
137
+
## [1.5.4] - 2025-02-04
138
+
139
+
### Fixed
140
+
141
+
- Allowed importing FunC files with `.func` extension. Resolves the `TOB-TACT-1` issue
142
+
- Issue understandable error on circular trait dependencies. Resolves the `TOB-TACT-2` issue
143
+
- Forbade accessing files via symlinks. Resolves the `TOB-TACT-3` issue
144
+
- Bit shift FunC compilation errors for incorrect bit widths. Partially resolves the `TOB-TACT-5` issue
145
+
- Streamlined `renameModuleItems` function. Resolves the `TOB-TACT-6` issue
146
+
- Documented the parser limitations for nested expressions. Alleviates the `TOB-TACT-7` issue
147
+
- Bit shift FunC compilation errors for incorrect bit widths
148
+
- Throwing from functions with non-trivial branching in the `try` statement
149
+
150
+
### Notes
151
+
152
+
Handling the Unicode in the Tact grammar as per the `TOB-TACT-4` issue has been left unchanged and will be addressed in the future Tact releases.
-[@verytactical](https://github.com/verytactical): internal review of the security audit fixes
158
+
-[Trail of Bits](https://www.trailofbits.com): the security audit of the Tact compiler v1.5.0 (commit 0106ea14857bcf3c40dd10135243d0de96012871) and the audit of the fixes
Copy file name to clipboardExpand all lines: dev-docs/CONTRIBUTING.md
-2
Original file line number
Diff line number
Diff line change
@@ -210,8 +210,6 @@ Some other codegen tests are as follows:
210
210
211
211
The entry point to the Tact AST pretty-printer is [src/ast/ast-printer.ts](../src/ast/ast-printer.ts). It is going to be used for the Tact source code formatter once the parser keeps comments and other relevant information.
212
212
213
-
The AST comparator is defined in [src/ast/compare.ts](../src/ast/compare.ts). This is useful, for instance, for static analysis tools which can re-use the Tact TypeScript API.
214
-
215
213
The corresponding test spec files can be found in [src/test](../src/test) folder with the test contracts in [src/test/contracts](../src/test/contracts) folder.
Copy file name to clipboardExpand all lines: docs/src/content/docs/book/assembly-functions.mdx
+9-3
Original file line number
Diff line number
Diff line change
@@ -478,7 +478,7 @@ When there are literals involved, they'll be shown as is. Additionally, when val
478
478
479
479
```tact
480
480
// Computes and returns the Keccak-256 hash as an 256-bit unsigned `Int`
481
-
// from a passed `Slice` `s`. Uses the Ethereum-compatible implementation.
481
+
// from a passed `Slice` `s`. Uses the Ethereum-compatible* implementation.
482
482
asm fun keccak256(s: Slice): Int {
483
483
// s:Slice → s:Slice, 1
484
484
// —————————————————————
@@ -498,8 +498,8 @@ The [`HASHEXT_KECCAK512`](https://docs.ton.org/v3/documentation/tvm/instructions
498
498
499
499
```tact
500
500
// Computes and returns the Keccak-512 hash in two 256-bit unsigned `Int`
501
-
// values from a passed `Slice` `s`. Uses the Ethereum-compatible implementation.
502
-
asm fun keccak256(s: Slice): Hash512 {
501
+
// values from a passed `Slice` `s`. Uses the Ethereum-compatible* implementation.
502
+
asm fun keccak512(s: Slice): Hash512 {
503
503
// s:Slice → s:Slice, 1
504
504
// —————————————————————
505
505
// s0 → s1 s0
@@ -520,6 +520,12 @@ asm fun keccak256(s: Slice): Hash512 {
520
520
struct Hash512 { h1: Int; h2: Int }
521
521
```
522
522
523
+
While it is said that these sample `keccak256(){:tact}` and `keccak512(){:tact}` functions use the Ethereum-compatible implementation, note that the underlying `HASHEXT` family of [TVM][tvm] instructions has its own drawbacks.
524
+
525
+
These drawbacks stem from the limitations of the [`Slice{:tact}`][slice] type itself — `HASHEXT_KECCAK256` and other hashing instructions of the `HASHEXT` family ignore any references present in the passed slice(s), i.e. only up to $1023$ bits of its data are used.
526
+
527
+
To work around this, you can recursively load all the refs from the given [`Slice{:tact}`][slice], and then hash them all at once by specifying their exact number instead of the `ONE`[TVM][tvm] instruction used earlier. See an example below: [`onchainSha256`](#onchainsha256).
Copy file name to clipboardExpand all lines: docs/src/content/docs/book/compile.mdx
+9-1
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,15 @@ If you want to pin down a specific version of the compiler, run the following co
95
95
96
96
A number of build artifacts can be produced per compilation of each contract. Some of the artifacts can be omitted using [configuration settings](/book/config).
97
97
98
-
The location of the artifacts depends on the [`output`](/book/config#projects-output) field of the [`tact.config.json`](/book/config). In [Blueprint][bp]-based projects, `output` is not used and all generated files are always placed in `build/ProjectName/`.
98
+
The location of the artifacts depends on the compilation method:
99
+
- For projects using `tact.config.json`, use the [`output`](/book/config#projects-output) field in the config file
100
+
- For single contract compilation, you can specify the output directory using the `-o` or `--output` flag:
101
+
```shell
102
+
tact contract.tact --output ./custom-output
103
+
```
104
+
If not specified, the files will be generated in the same directory as the input file.
105
+
106
+
In [Blueprint][bp]-based projects, `output` is not used and all generated files are always placed in `build/ProjectName/`.
0 commit comments