Skip to content

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:

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

projects

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

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

name

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 only specify one Tact file per project.

In Blueprint, path is superseded by the target field in wrappers/ContractName.compile.ts.

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

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/.

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

options

Compilation options for the project.

In Blueprint, they act as default unless modified in wrappers/ContractName.compile.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 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.

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

masterchain

false by default.

If set to true, enables masterchain support.

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

external

false by default.

If set to true, enables support of 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 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 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 bigger contracts.

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

mode

Compilation mode of the project. Valid values are:

ValueDescription
"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.

{
"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/schemas/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,
"masterchain": false,
"external": false,
"ipfsAbiGetter": true,
"interfacesGetter": true,
"experimental": {
"inline": false
}
}
}
]
}