Skip to content

Configuration

The behavior of the Tact compiler can be customized using its configuration file, tact.config.json — a JSON file that contains a list of settings according to the specific schema.

This page lists all the configuration options as they’re structured in the schema. Look for the 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 at the top of your configuration file:

{
"$schema": "http://raw.githubusercontent.com/tact-lang/tact/main/src/config/configSchema.json",
"projects": []
}

projects

A list of Tact projects with respective compilation options. Each .tact file represents its own Tact project.

{
"projects": [
{ },
{ }
]
}

name

The name of the project. All generated files are prefixed with it.

In Blueprint, name refers to the name of the contract itself.

{
"projects": [
{
"name": "some_prefix"
},
{
"name": "ContractUnderBlueprint"
}
]
}

path

Path to the project’s Tact file. You can specify only one Tact file per project.

In Blueprint, 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.

{
"projects": [
{
"name": "some_prefix",
"path": "./contract.tact"
}
]
}

output

Path to the directory where all generated files will be placed.

In Blueprint, the output field is not used, and all generated files are always placed in build/ProjectName/.

{
"projects": [
{
"name": "some_prefix",
"path": "./contract.tact",
"output": "./contract_output"
}
]
}

options

Compilation options for the project.

In Blueprint, 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.

{
"projects": [
{
"name": "some_prefix",
"path": "./contract.tact",
"output": "./contract_output",
"options": {}
},
{
"name": "ContractUnderBlueprint",
"options": {}
}
]
}

debug

false by default.

If set to true, enables debug output for a contract and allows the usage of the 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.

The debug mode implies the activation of the nullChecks safety option.

{
"projects": [
{
"name": "some_prefix",
"path": "./contract.tact",
"output": "./contract_output",
"options": {
"debug": true
}
},
{
"name": "ContractUnderBlueprint",
"options": {
"debug": true
}
}
]
}

external

false by default.

If set to true, enables support for external message receivers.

{
"projects": [
{
"name": "some_prefix",
"path": "./contract.tact",
"output": "./contract_output",
"options": {
"external": true
}
},
{
"name": "ContractUnderBlueprint",
"options": {
"external": true
}
}
]
}

ipfsAbiGetter

false by default.

If set to true, enables the generation of a getter with IPFS links describing the contract’s ABI.

{
"projects": [
{
"name": "some_prefix",
"path": "./contract.tact",
"output": "./contract_output",
"options": {
"ipfsAbiGetter": true
}
},
{
"name": "ContractUnderBlueprint",
"options": {
"ipfsAbiGetter": true
}
}
]
}

interfacesGetter

false by default.

If set to true, enables the generation of a getter with a list of interfaces provided by the contract.

{
"projects": [
{
"name": "some_prefix",
"path": "./contract.tact",
"output": "./contract_output",
"options": {
"interfacesGetter": true
}
},
{
"name": "ContractUnderBlueprint",
"options": {
"interfacesGetter": true
}
}
]
}

experimental

Experimental options that might be removed in the future. Use with caution!

{
"projects": [
{
"name": "some_prefix",
"path": "./contract.tact",
"output": "./contract_output",
"options": {
"experimental": {}
}
},
{
"name": "ContractUnderBlueprint",
"options": {
"experimental": {}
}
}
]
}
inline

false by default.

If set to true, enables inlining of all functions in contracts. This can reduce gas usage at the cost of larger contracts.

{
"projects": [
{
"name": "some_prefix",
"path": "./contract.tact",
"output": "./contract_output",
"options": {
"experimental": {
"inline": true
}
}
},
{
"name": "ContractUnderBlueprint",
"options": {
"experimental": {
"inline": true
}
}
}
]
}

safety

Available since Tact 1.6

Options that affect the safety of contracts.

{
"projects": [
{
"name": "contract",
"path": "./contract.tact",
"output": "./output",
"options": {
"safety": {}
}
}
]
}
nullChecks
Available since Tact 1.6

true by default.

If set to true, enables runtime null checks on the arguments of the unwrapping non-null assertion !! operator. Setting the option to false disables these checks and decreases gas consumption.

Null checks are always enabled in debug mode.

{
"projects": [
{
"name": "contract",
"path": "./contract.tact",
"output": "./output",
"options": {
"safety": {
"nullChecks": false
}
}
}
]
}

optimizations

Available since Tact 1.6

Options that affect the optimization of contracts.

{
"projects": [
{
"name": "contract",
"path": "./contract.tact",
"output": "./output",
"options": {
"optimizations": {}
}
}
]
}
alwaysSaveContractData
Available since Tact 1.6

false by default.

If set to false, saves the contract state at the end of a receiver execution only if the contract state was modified. Otherwise, the contract data cell is not overwritten. Setting the option to true results in each receiver updating the contract data cell regardless of contract state modifications, thus increasing gas consumption.

This option can be used to provide an extra safety level or for debugging.

{
"projects": [
{
"name": "contract",
"path": "./contract.tact",
"output": "./output",
"options": {
"optimizations": {
"alwaysSaveContractData": false
}
}
}
]
}
internalExternalReceiversOutsideMethodsMap
Available since Tact 1.6.3

true by default.

If set to true, stores internal and external receivers outside the methods map.

Saves gas, but as a result of this optimization, the contract might not be correctly recognized and parsed by explorers and user wallets.

{
"projects": [
{
"name": "contract",
"path": "./contract.tact",
"output": "./output",
"options": {
"optimizations": {
"internalExternalReceiversOutsideMethodsMap": true
}
}
}
]
}

enableLazyDeploymentCompletedGetter

Available since Tact 1.6

false by default.

If set to true, enables the generation of the lazy_deployment_completed() getter. This option has no effect if contract parameters are declared.

{
"projects": [
{
"name": "contract",
"path": "./contract.tact",
"output": "./output",
"options": {
"enableLazyDeploymentCompletedGetter": true
}
}
]
}

verbose

Available since Tact 1.6

1 by default.

Sets the verbosity level. Higher values produce more output.

{
"projects": [
{
"name": "func_only",
"path": "./contract.tact",
"output": "./contract_output",
"verbose": 2
}
]
}

mode

Compilation mode of the project. Valid values are:

ValueDescription
"full"(default) Runs the entire compilation pipeline and emits FunC code, BoC, and various utility files, including wrappers for TypeScript.
"fullWithDecompilation"Runs the entire compilation pipeline like "full" and also decompiles the produced binary code in BoC format.
"funcOnly"Outputs only intermediate FunC code, preventing further compilation.
"checkOnly"Performs only syntax and type checking, preventing further compilation.

In Blueprint, mode is always set to "full" and cannot be overridden.

{
"projects": [
{
"name": "some_prefix",
"path": "./contract.tact",
"output": "./contract_output",
"mode": "full"
},
{
"name": "func_only",
"path": "./contract.tact",
"output": "./contract_output",
"mode": "funcOnly"
}
]
}

Full example

{
"$schema": "http://raw.githubusercontent.com/tact-lang/tact/main/src/config/configSchema.json",
"projects": [
{
"name": "basic",
"path": "./basic.tact",
"output": "./basic_output",
"mode": "full"
},
{
"name": "func_only",
"path": "./basic.tact",
"output": "./basic_output",
"mode": "funcOnly"
},
{
"name": "debugPrefix",
"path": "./contracts/contract.tact",
"output": "./contracts/output",
"options": {
"debug": true
}
},
{
"name": "ContractUnderBlueprint",
"options": {
"debug": false,
"external": false,
"ipfsAbiGetter": true,
"interfacesGetter": true,
"experimental": {
"inline": false
},
"safety": {
"nullChecks": false
}
}
}
]
}