This template provides a beta template for developing and deploying Algorand TypeScript smart contracts.
To use it install AlgoKit and then either pass in -t typescript
to algokit init
or select the typescript
template.
To use it run:
algokit init --template-url https://github.com/algorandfoundation/algokit-typescript-template --UNSAFE-SECURITY-accept-template-url
This is one of the official templates used by AlgoKit to initialize an Algorand smart contract project. It's a Copier template.
This template supports the following features:
- Compilation of multiple Algorand TypeScript contracts to a predictable folder location and file layout where they can be deployed; docs, examples
- Deploy-time immutability and permanence control
- NPM for TypeScript packaging and dependency management
- TypeScript for strongly typed programming language that builds on JavaScript
- ts-node-dev for TypeScript deployment script execution
- Prettier for code formatting
- ESLint for linting
- vitest for automated testing (unit test and end-to-end)
- better-npm-audit for dependency vulnerability scanning
- pre-commit for managing and maintaining multi-language pre-commit hooks
- VS Code configuration (linting, formatting, breakpoint debugging)
- dotenv (.env) files for configuration
- Output stability tests of the TEAL output
- CI/CD pipeline using GitHub Actions
Once the template is instantiated you can follow the README.md file to see instructions for how to use the template.
To initialize using the algokit
CLI:
- Execute the command
algokit init
. This initiates an interactive wizard that assists in selecting the most appropriate template for your project requirements.
To initialize within GitHub Codespaces:
-
Follow these steps to leverage GitHub Codespaces for template selection:
- Go to the algokit-base-template repository.
- Initiate a new codespace by selecting the
Create codespace on main
option. This can be found by clicking theCode
button, then navigating to theCodespaces
tab. - Upon codespace preparation,
algokit
will automatically startLocalNet
and present a prompt with the next steps. Executingalgokit init
will initiate the interactive wizard.