Configuration
The behavior of Tact compiler can be customized using its configuration file, tact.config.json
— a JSON file that contains the list of settings according to the specific schema.
This page lists all the configuration options as they’re structured in the schema. Look for table of contents on the right to easily navigate them.
$schema
A JSON schema file is available for editors to provide autocompletion and hover hints: configSchema.json.
Simply add the $schema
field on top your configuration file:
projects
List of Tact projects with respective compilation options. Each .tact
file represents its own Tact project.
name
Name of the project. All generated files are prefixed with it.
In Blueprint, name
refers to the name of the contract itself.
path
Path to the project’s Tact file. You can only specify one Tact file per project.
In Blueprint, path
is superseded by the target
field in wrappers/ContractName.compile.ts
.
output
Path to the directory where all generated files will be placed.
In Blueprint, output
is not used and all generated files are always placed in build/ProjectName/
.
options
Compilation options for the project.
In Blueprint, they act as default unless modified in wrappers/ContractName.compile.ts
.
debug
false
by default.
If set to true
, enables debug output of a contract and allows usage of dump()
function, which is useful for debugging purposes. With this option enabled, the contract will report that it was compiled in debug mode using the supported_interfaces
method.
masterchain
false
by default.
If set to true
, enables masterchain support.
external
false
by default.
If set to true
, enables support of external message receivers.
ipfsAbiGetter
false
by default.
If set to true
, enables generation of a getter with IPFS links describing the contract’s ABI.
interfacesGetter
false
by default.
If set to true
, enables generation of a getter with a list of interfaces provided by the contract.
experimental
Experimental options that might be removed in the future. Use with caution!
inline
false
by default.
If set to true
, enables inlining of all functions in contracts. This can reduce gas usage at the cost of bigger contracts.
mode
Compilation mode of the project. Valid values are:
Value | Description |
---|---|
"full" | (default) Runs the whole compilation pipeline and emits FunC code, BoC, and various utility files, including wrappers for TypeScript. |
"fullWithDecompilation" | Runs the whole compilation pipeline like "full" , and also decompiles produced binary code in the BoC format. |
"funcOnly" | Only outputs intermediate FunC code, preventing further compilation. |
"checkOnly" | Only performs syntax and type checking, preventing further compilation. |
In Blueprint, mode
is always set to "full"
and cannot be overwritten.