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: about 2 months ago
JSON representation
Tact project template
- Host: GitHub
- URL: https://github.com/tact-lang/tact-template
- Owner: tact-lang
- Created: 2023-02-17T11:37:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-21T15:43:27.000Z (3 months ago)
- Last Synced: 2024-06-22T08:17:21.635Z (3 months ago)
- Topics: tact, template, ton
- Language: TypeScript
- Homepage:
- Size: 456 KB
- Stars: 40
- Watchers: 7
- Forks: 32
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
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 [tact-emulator](https://github.com/tact-lang/tact-emulator), and a sample demonstrating how to run tests.
```shell
yarn test # To test contract
yarn build # To build contract
yarn deploy # To deploy contract
```## 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`, make sure to update [`tact.config.json`](./tact.config.json) correspondingly. Refer to the [Tact Documentation](https://docs.tact-lang.org/language/guides/config) for detailed information.
## Testing
You can find some examples of contract tests in [`contract.spec.ts`](./sources/contract.spec.ts). For more information about testing, see the [Tact Documentation](https://docs.tact-lang.org/language/guides/debug).
To add new test files to your contracts, you should create `*.spec.ts` files similar to the template's one and they would be automatically included in testing.
## License
MIT