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
Merge branch '3287-we-should-generate-test-template-as-wrappers' of https://github.com/tact-lang/tact into 3287-we-should-generate-test-template-as-wrappers
Copy file name to clipboardExpand all lines: dev-docs/CHANGELOG-DOCS.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
7
7
## Doc: 2025-06
8
8
9
9
- Adjusted inline code tag highlighting to support global Starlight themes, and modified the One Light color theme to support proper highlighting of `keyword.operator.new` TextMate scopes: PR [#3346](https://github.com/tact-lang/tact/pull/3346)
10
+
- Warned that imports are automatically exported: PR [#TBD](https://github.com/tact-lang/tact/pull/TBD)
@@ -34,7 +34,7 @@ Simply add the `$schema` field at the top of your configuration file:
34
34
35
35
A list of Tact projects with respective compilation options. Each `.tact` file represents its own Tact project.
36
36
37
-
```jsonfilename="tact.config.json" {3,4}
37
+
```jsontitle="tact.config.json" {3,4}
38
38
{
39
39
"projects": [
40
40
{ },
@@ -49,7 +49,7 @@ The name of the project. All generated files are prefixed with it.
49
49
50
50
In [Blueprint][bp], `name` refers to the name of the contract itself.
51
51
52
-
```jsonfilename="tact.config.json" {4,7}
52
+
```jsontitle="tact.config.json" {4,7}
53
53
{
54
54
"projects": [
55
55
{
@@ -68,7 +68,7 @@ Path to the project's Tact file. You can specify only one Tact file per project.
68
68
69
69
In [Blueprint][bp], the `path` field is superseded by the `target` field in `wrappers/ContractName.compile.ts` by default, or in `compilables/ContractName.compile.ts` if you have the `separateCompilables` option set in [`blueprint.config.ts`][bp-config].
70
70
71
-
```jsonfilename="tact.config.json" {5}
71
+
```jsontitle="tact.config.json" {5}
72
72
{
73
73
"projects": [
74
74
{
@@ -85,7 +85,7 @@ Path to the directory where all generated files will be placed.
85
85
86
86
In [Blueprint][bp], the `output` field is not used, and all generated files are always placed in `build/ProjectName/`.
87
87
88
-
```jsonfilename="tact.config.json" {6}
88
+
```jsontitle="tact.config.json" {6}
89
89
{
90
90
"projects": [
91
91
{
@@ -103,7 +103,7 @@ Compilation options for the project.
103
103
104
104
In [Blueprint][bp], these options act as defaults unless modified in `wrappers/ContractName.compile.ts` by default, or in `compilables/ContractName.compile.ts` if you have the `separateCompilables` option set in [`blueprint.config.ts`][bp-config].
105
105
106
-
```jsonfilename="tact.config.json" {7,11}
106
+
```jsontitle="tact.config.json" {7,11}
107
107
{
108
108
"projects": [
109
109
{
@@ -128,7 +128,7 @@ If set to `true{:json}`, enables debug output for a contract and allows the usag
128
128
129
129
The `debug` mode implies the activation of the [`nullChecks`](#safety-nullchecks) safety option.
130
130
131
-
```jsonfilename="tact.config.json" {8,14}
131
+
```jsontitle="tact.config.json" {8,14}
132
132
{
133
133
"projects": [
134
134
{
@@ -161,7 +161,7 @@ The `debug` mode implies the activation of the [`nullChecks`](#safety-nullchecks
161
161
162
162
If set to `true{:json}`, enables support for [external](/book/external) message receivers.
163
163
164
-
```jsonfilename="tact.config.json" {8,14}
164
+
```jsontitle="tact.config.json" {8,14}
165
165
{
166
166
"projects": [
167
167
{
@@ -194,7 +194,7 @@ If set to `true{:json}`, enables support for [external](/book/external) message
194
194
195
195
If set to `true{:json}`, enables the generation of a [getter](/book/contracts#getter-functions) with IPFS links describing the contract's ABI.
196
196
197
-
```jsonfilename="tact.config.json" {8,14}
197
+
```jsontitle="tact.config.json" {8,14}
198
198
{
199
199
"projects": [
200
200
{
@@ -227,7 +227,7 @@ If set to `true{:json}`, enables the generation of a [getter](/book/contracts#ge
227
227
228
228
If set to `true{:json}`, enables the generation of a [getter](/book/contracts#getter-functions) with a list of interfaces provided by the contract.
229
229
230
-
```jsonfilename="tact.config.json" {8,14}
230
+
```jsontitle="tact.config.json" {8,14}
231
231
{
232
232
"projects": [
233
233
{
@@ -258,7 +258,7 @@ If set to `true{:json}`, enables the generation of a [getter](/book/contracts#ge
258
258
259
259
Experimental options that might be removed in the future. Use with caution!
260
260
261
-
```jsonfilename="tact.config.json" {8,14}
261
+
```jsontitle="tact.config.json" {8,14}
262
262
{
263
263
"projects": [
264
264
{
@@ -285,7 +285,7 @@ Experimental options that might be removed in the future. Use with caution!
285
285
286
286
If set to `true{:json}`, enables inlining of all functions in contracts. This can reduce gas usage at the cost of larger contracts.
287
287
288
-
```jsonfilename="tact.config.json" {9,17}
288
+
```jsontitle="tact.config.json" {9,17}
289
289
{
290
290
"projects": [
291
291
{
@@ -316,7 +316,7 @@ If set to `true{:json}`, enables inlining of all functions in contracts. This ca
316
316
317
317
Options that affect the safety of contracts.
318
318
319
-
```jsonfilename="tact.config.json" {8,14}
319
+
```jsontitle="tact.config.json" {8,14}
320
320
{
321
321
"projects": [
322
322
{
@@ -347,7 +347,7 @@ If set to `true{:json}`, enables runtime null checks on the arguments of the unw
347
347
348
348
Null checks are always enabled in [`debug`](#options-debug) mode.
349
349
350
-
```jsonfilename="tact.config.json" {9,17}
350
+
```jsontitle="tact.config.json" {9,17}
351
351
{
352
352
"projects": [
353
353
{
@@ -378,7 +378,7 @@ Null checks are always enabled in [`debug`](#options-debug) mode.
378
378
379
379
Options that affect the optimization of contracts.
380
380
381
-
```jsonfilename="tact.config.json" {8,14}
381
+
```jsontitle="tact.config.json" {8,14}
382
382
{
383
383
"projects": [
384
384
{
@@ -409,7 +409,7 @@ If set to `false{:json}`, saves the contract state at the end of a receiver exec
409
409
410
410
This option can be used to provide an extra safety level or for debugging.
411
411
412
-
```jsonfilename="tact.config.json" {9,17}
412
+
```jsontitle="tact.config.json" {9,17}
413
413
{
414
414
"projects": [
415
415
{
@@ -440,11 +440,11 @@ This option can be used to provide an extra safety level or for debugging.
440
440
441
441
`true{:json}` by default.
442
442
443
-
If set to `true{:json}`, stores internal and external receivers outside the methods map.
443
+
If set to `true{:json}`, stores internal and external receivers outside the [methods map](/book/functions#low-level-representation).
444
444
445
445
When enabled, it saves gas but can cause the contract to be incorrectly recognized and misparsed by some explorers and user wallets.
446
446
447
-
```jsonfilename="tact.config.json" {9,17}
447
+
```jsontitle="tact.config.json" {9,17}
448
448
{
449
449
"projects": [
450
450
{
@@ -477,7 +477,7 @@ When enabled, it saves gas but can cause the contract to be incorrectly recogniz
477
477
478
478
If set to `true{:json}`, enables the generation of the `lazy_deployment_completed(){:tact}` getter. This option has no effect if [contract parameters](/book/contracts#parameters) are declared.
479
479
480
-
```jsonfilename="tact.config.json" {8,14}
480
+
```jsontitle="tact.config.json" {8,14}
481
481
{
482
482
"projects": [
483
483
{
@@ -541,7 +541,7 @@ If set to `true{:json}`, disables automatic generation of test files. By default
541
541
542
542
Sets the verbosity level — higher values produce more output.
543
543
544
-
```jsonfilename="tact.config.json" {7}
544
+
```jsontitle="tact.config.json" {7}
545
545
{
546
546
"projects": [
547
547
{
@@ -567,7 +567,7 @@ Value | Description
567
567
568
568
In [Blueprint][bp], `mode` is always set to `"full"{:json}` and cannot be overridden.
569
569
570
-
```jsonfilename="tact.config.json" {7,13}
570
+
```jsontitle="tact.config.json" {7,13}
571
571
{
572
572
"projects": [
573
573
{
@@ -588,7 +588,7 @@ In [Blueprint][bp], `mode` is always set to `"full"{:json}` and cannot be overri
Copy file name to clipboardExpand all lines: docs/src/content/docs/book/gas-best-practices.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -198,7 +198,7 @@ fun example() {
198
198
199
199
To disable runtime `null{:tact}` checks of the `!!` operator, set the [`nullChecks`](/book/config#safety-nullchecks) field to `false{:json}` in your [`tact.config.json`](/book/config).
Copy file name to clipboardExpand all lines: docs/src/content/docs/book/import.mdx
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,29 @@ Additionally, the Tact compiler has a versatile set of standard libraries which
11
11
12
12
All imported code is combined together with yours, so it's important to avoid name collisions and always double-check the sources!
13
13
14
+
Moreover, imports are transitive and are always automatically exported — if an `a.tact` imports `b.tact`, which in turn imports `c.tact`, then all the definitions from `c.tact` are immediately accessible in `a.tact` without an explicit import of `c.tact` to it.
15
+
16
+
```tact title="c.tact"
17
+
trait StatelessGetters {
18
+
get fun bar(): Int { return 42 }
19
+
get fun baz(): Int { return 43 }
20
+
}
21
+
```
22
+
23
+
```tact title="b.tact"
24
+
import "c.tact";
25
+
```
26
+
27
+
```tact title="a.tact"
28
+
import "b.tact";
29
+
30
+
// Definitions available in "c.tact" are now available in this file
31
+
// due to their transitive import from the "b.tact" file.
32
+
contract Transitive() with StatelessGetters {}
33
+
```
34
+
35
+
This behavior may change in future major releases.
Copy file name to clipboardExpand all lines: docs/src/content/docs/book/statements.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,7 +133,7 @@ Some statements, such as [`let{:tact}`](#let) or [`return{:tact}`](#return), mus
133
133
134
134
## Expression
135
135
136
-
An expression statement is an expression used in a place where a statement is expected. The expression is evaluated, and its result is discarded. Therefore, it makes sense only for expressions that have side effects, such as executing a function or updating a variable.
136
+
An expression statement is an expression used in a place where a statement is expected. The expression is evaluated, and its result is discarded. Therefore, it makes sense only for expressions that have side effects, such as [printing to the debug console](/ref/core-debug#dump)or executing an [extension mutation function](/book/functions#mutates).
0 commit comments