---
title: Configuration
description: "The behavior of the Tact compiler can be customized using its configuration file"
tableOfContents:
  maxHeadingLevel: 5
---

import { Badge } from '@astrojs/starlight/components';

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](#schema).

This page lists all the configuration options as they're structured in the [schema](#schema). Look for the table of contents on the right to easily navigate them.

:::note

  The only requirement for that file is to be valid JSON with [proper fields](#schema), so it can be named arbitrarily. However, naming your config file as `tact.config.json` is a common convention encouraged and supported by all tools working with Tact.

:::

## `$schema` {#schema}

A [JSON schema](https://json-schema.org/) file is available for editors to provide autocompletion and hover hints: [configSchema.json](http://raw.githubusercontent.com/tact-lang/tact/main/src/config/configSchema.json).

Simply add the `$schema` field at the top of your configuration file:

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

## `projects` {#projects}

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

```json filename="tact.config.json" {3,4}
{
  "projects": [
    { },
    { }
  ]
}
```

### `name` {#projects-name}

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

In [Blueprint][bp], `name` refers to the name of the contract itself.

```json filename="tact.config.json" {4,7}
{
  "projects": [
    {
      "name": "some_prefix"
    },
    {
      "name": "ContractUnderBlueprint"
    }
  ]
}
```

### `path` {#projects-path}

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

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

```json filename="tact.config.json" {5}
{
  "projects": [
    {
      "name": "some_prefix",
      "path": "./contract.tact"
    }
  ]
}
```

### `output` {#projects-output}

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

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

```json filename="tact.config.json" {6}
{
  "projects": [
    {
      "name": "some_prefix",
      "path": "./contract.tact",
      "output": "./contract_output"
    }
  ]
}
```

### `options` {#projects-options}

Compilation options for the project.

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

```json filename="tact.config.json" {7,11}
{
  "projects": [
    {
      "name": "some_prefix",
      "path": "./contract.tact",
      "output": "./contract_output",
      "options": {}
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {}
    }
  ]
}
```

#### `debug` {#options-debug}

`false{:json}` by default.

If set to `true{:json}`, enables debug output for a contract and allows the usage of the [`dump(){:tact}`](/ref/core-debug#dump) function, which is useful for [debugging purposes](/book/debug). 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-nullchecks) safety option.

```json filename="tact.config.json" {8,14}
{
  "projects": [
    {
      "name": "some_prefix",
      "path": "./contract.tact",
      "output": "./contract_output",
      "options": {
        "debug": true
      }
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "debug": true
      }
    }
  ]
}
```

:::note

  Read more on the dedicated page: [Debugging](/book/debug).

:::

#### `external` {#options-external}

`false{:json}` by default.

If set to `true{:json}`, enables support for [external](/book/external) message receivers.

```json filename="tact.config.json" {8,14}
{
  "projects": [
    {
      "name": "some_prefix",
      "path": "./contract.tact",
      "output": "./contract_output",
      "options": {
        "external": true
      }
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "external": true
      }
    }
  ]
}
```

:::note

  Read more on the dedicated page: [External messages](/book/external).

:::

#### `ipfsAbiGetter` {#options-ipfsabigetter}

`false{:json}` by default.

If set to `true{:json}`, enables the generation of a [getter](/book/contracts#getter-functions) with IPFS links describing the contract's ABI.

```json filename="tact.config.json" {8,14}
{
  "projects": [
    {
      "name": "some_prefix",
      "path": "./contract.tact",
      "output": "./contract_output",
      "options": {
        "ipfsAbiGetter": true
      }
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "ipfsAbiGetter": true
      }
    }
  ]
}
```

:::note

  Read more on the dedicated page: [OTP-003: Self-ABI reporting](/ref/evolution/otp-003).

:::

#### `interfacesGetter` {#options-interfacesgetter}

`false{:json}` by default.

If set to `true{:json}`, enables the generation of a [getter](/book/contracts#getter-functions) with a list of interfaces provided by the contract.

```json filename="tact.config.json" {8,14}
{
  "projects": [
    {
      "name": "some_prefix",
      "path": "./contract.tact",
      "output": "./contract_output",
      "options": {
        "interfacesGetter": true
      }
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "interfacesGetter": true
      }
    }
  ]
}
```

:::note

  Read more: [Supported interfaces](/book/contracts#interfaces).

:::

#### `experimental` {#options-experimental}

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

```json filename="tact.config.json" {8,14}
{
  "projects": [
    {
      "name": "some_prefix",
      "path": "./contract.tact",
      "output": "./contract_output",
      "options": {
        "experimental": {}
      }
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "experimental": {}
      }
    }
  ]
}
```

##### `inline` {#experimental-inline}

`false{:json}` by default.

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

```json filename="tact.config.json" {9,17}
{
  "projects": [
    {
      "name": "some_prefix",
      "path": "./contract.tact",
      "output": "./contract_output",
      "options": {
        "experimental": {
          "inline": true
        }
      }
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "experimental": {
          "inline": true
        }
      }
    }
  ]
}
```

#### `safety` {#options-safety}

<Badge text="Available since Tact 1.6" variant="tip" size="medium"/><p/>

Options that affect the safety of contracts.

```json filename="tact.config.json" {8,14}
{
  "projects": [
    {
      "name": "contract",
      "path": "./contract.tact",
      "output": "./output",
      "options": {
        "safety": {}
      }
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "safety": {}
      }
    }
  ]
}
```

##### `nullChecks` {#safety-nullchecks}

<Badge text="Available since Tact 1.6" variant="tip" size="medium"/><p/>

`true{:json}` by default.

If set to `true{:json}`, enables runtime null checks on the arguments of the unwrapping [non-null assertion `!!`](/book/operators/#unary-non-null-assert) operator. Setting the option to `false{:json}` disables these checks and decreases gas consumption.

Null checks are always enabled in [`debug`](#options-debug) mode.

```json filename="tact.config.json" {9,17}
{
  "projects": [
    {
      "name": "contract",
      "path": "./contract.tact",
      "output": "./output",
      "options": {
        "safety": {
          "nullChecks": false
        }
      }
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "safety": {
          "nullChecks": false
        }
      }
    }
  ]
}
```

#### `optimizations` {#options-optimizations}

<Badge text="Available since Tact 1.6" variant="tip" size="medium"/><p/>

Options that affect the optimization of contracts.

```json filename="tact.config.json" {8,14}
{
  "projects": [
    {
      "name": "contract",
      "path": "./contract.tact",
      "output": "./output",
      "options": {
        "optimizations": {}
      }
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "optimizations": {}
      }
    }
  ]
}
```

##### `alwaysSaveContractData` {#optimizations-alwayssavecontractdata}

<Badge text="Available since Tact 1.6" variant="tip" size="medium"/><p/>

`false{:json}` by default.

If set to `false{:json}`, 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{:json}` 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.

```json filename="tact.config.json" {9,17}
{
  "projects": [
    {
      "name": "contract",
      "path": "./contract.tact",
      "output": "./output",
      "options": {
        "optimizations": {
          "alwaysSaveContractData": true
        }
      }
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "optimizations": {
          "alwaysSaveContractData": true
        }
      }
    }
  ]
}
```

##### `internalExternalReceiversOutsideMethodsMap` {#optimizations-internalexternalreceiversoutsidemethodsmap}

<Badge text="Available since Tact 1.6.3" variant="tip" size="medium"/><p/>

`true{:json}` by default.

If set to `true{:json}`, stores internal and external receivers outside the methods map.

When enabled, it saves gas but can cause the contract to be incorrectly recognized and misparsed by some explorers and user wallets.

```json filename="tact.config.json" {9,17}
{
  "projects": [
    {
      "name": "contract",
      "path": "./contract.tact",
      "output": "./output",
      "options": {
        "optimizations": {
          "internalExternalReceiversOutsideMethodsMap": false
        }
      }
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "optimizations": {
          "internalExternalReceiversOutsideMethodsMap": false
        }
      }
    }
  ]
}
```

#### `enableLazyDeploymentCompletedGetter` {#options-enablelazydeploymentcompletedgetter}

<Badge text="Available since Tact 1.6" variant="tip" size="medium"/><p/>

`false{:json}` by default.

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.

```json filename="tact.config.json" {8,14}
{
  "projects": [
    {
      "name": "contract",
      "path": "./contract.tact",
      "output": "./output",
      "options": {
        "enableLazyDeploymentCompletedGetter": true
      }
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "enableLazyDeploymentCompletedGetter": true
      }
    }
  ]
}
```

### `verbose` {#projects-verbose}

<Badge text="Available since Tact 1.6" variant="tip" size="medium"/><p/>

`1{:json}` by default.

Sets the verbosity level — higher values produce more output.

```json filename="tact.config.json" {7}
{
  "projects": [
    {
      "name": "func_only",
      "path": "./contract.tact",
      "output": "./contract_output",
      "verbose": 2
    }
  ]
}
```

### `mode` {#projects-mode}

Compilation mode of the project. Valid values are:

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

In [Blueprint][bp], `mode` is always set to `"full"{:json}` and cannot be overridden.

```json filename="tact.config.json" {7,13}
{
  "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

```json filename="tact.config.json" copy=false
{
  "$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
      },
      "verbose": 2
    },
    {
      "name": "ContractUnderBlueprint",
      "options": {
        "debug": false,
        "external": false,
        "ipfsAbiGetter": true,
        "interfacesGetter": true,
        "experimental": {
          "inline": false
        },
        "safety": {
          "nullChecks": false
        },
        "optimizations": {
          "alwaysSaveContractData": true,
          "internalExternalReceiversOutsideMethodsMap": true
        },
        "enableLazyDeploymentCompletedGetter": true
      }
    }
  ]
}
```

[bp]: https://github.com/ton-org/blueprint
[bp-config]: https://github.com/ton-org/blueprint/tree/main?tab=readme-ov-file#configuration
