Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tact-lang/tact-template
Tact project template
https://github.com/tact-lang/tact-template
tact template ton
Last synced: 3 days ago
JSON representation
Tact project template
- Host: GitHub
- URL: https://github.com/tact-lang/tact-template
- Owner: tact-lang
- License: mit
- Created: 2023-02-17T11:37:47.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-17T14:02:05.000Z (22 days ago)
- Last Synced: 2025-01-29T05:11:10.245Z (10 days ago)
- Topics: tact, template, ton
- Language: TypeScript
- Homepage:
- Size: 297 KB
- Stars: 76
- Watchers: 7
- Forks: 45
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tact - Tact Template - to-use Tact compiler with TypeScript + Jest and a Tact emulator. Includes examples of how to perform tests. (🎯 Get Coding in Tact / Templates)
README
# Tact template project
This template comes pre-configured to kickstart your new Tact project. It includes the Tact compiler, TypeScript, Jest integrated with [Sandbox](https://github.com/ton-org/sandbox), and a sample demonstrating how to run tests.
## How to use
First, let's install all the dependencies:
```shell
yarn install
```Now we're ready to build our contract:
```shell
yarn build
```Once you've built our contract, you can deploy it:
```shell
yarn deploy
```Let's look at some other useful commands.
To test your contract after changes, run:
```shell
yarn test
```If you want to quickly check your changes for validity, run:
```shell
yarn lint
```## Deployment
To deploy a contract, follow these steps:
1. Define the [`contract.tact`](./sources/contract.tact) file that will be used as entry point of your contract.
2. Customize the [`contract.deploy.ts`](./sources/contract.deploy.ts) file based on your `contract.tact` to generate a deployment link. It is crucial to ensure the proper invocation of the `init()` function within the contract.If you rename `contract.tact`, be sure to update [`tact.config.json`](./tact.config.json) accordingly. For a description of `tact.config.json`, see the [Configuration page in the Tact documentation](https://docs.tact-lang.org/book/config).
## Testing
You can find some examples of contract tests in [`contract.spec.ts`](./sources/contract.spec.ts). For more information about testing, see the [Debugging and testing page in the Tact Documentation](https://docs.tact-lang.org/book/debug).
To add new test files to your contracts, create `*.spec.ts` files similar to the template's one. They will be automatically picked up by the testing commands, such as `yarn test`.
## License
[MIT](./LICENSE)