Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
i582 committed Feb 5, 2025
1 parent 318336b commit df48abb
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
23 changes: 23 additions & 0 deletions docs/src/content/docs/book/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,29 @@ Null checks are always enabled in the [`debug`](#options-debug) mode.
}
```

#### `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 generation of `lazy_deployment_completed()` getter.

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

### `verbose` {#verbose}

<Badge text="Available since Tact 1.6" variant="tip" size="medium"/><p/>
Expand Down
5 changes: 5 additions & 0 deletions src/config/configSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
"description": "True by default. If set to true, enables run-time null checks for the `!!` operator. Set it to `false` if you'd like to decrease gas consumption."
}
}
},
"enableLazyDeploymentCompletedGetter": {
"type": "boolean",
"default": false,
"description": "False by default. If set to true, enables generation of `lazy_deployment_completed()` getter."
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/config/parseConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ export const optionsSchema = z
*/
safety: safetyOptionsSchema.optional(),
/**
* If set to true, enables generation of `lazy_deployment_completed()` method.
* If set to true, enables generation of `lazy_deployment_completed()` getter.
*/
enableLazyDeploymentCompletedMethod: z.boolean().optional(),
enableLazyDeploymentCompletedGetter: z.boolean().optional(),
})
.strict();

Expand Down
2 changes: 1 addition & 1 deletion src/generator/writers/writeContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export function writeMainContract(
ctx.append();
}

if (config.options?.enableLazyDeploymentCompletedMethod) {
if (config.options?.enableLazyDeploymentCompletedGetter) {
// Deployed
ctx.append(`_ lazy_deployment_completed() method_id {`);
ctx.inIndent(() => {
Expand Down

0 comments on commit df48abb

Please sign in to comment.