I created a template repo to fullfil the above requirements:
https://github.com/ton-defi-org/tonstarter-contracts
Simply clone this repo and rename the directory and you can start working. The README has a very thorough explanation how everything works.
There is no one official way to develop smart contracts for TON. Every developer has their own best practices. This setup is definitely opinionated and some developers may not appreciate the choices made. Nevertheless, I stand by every choice made here and believe that this is the optimal setup to develop fully tested contracts in the most seamless way possible.
Some of the opinionated choices made here include:
- Cross platform support - allow developers to work on Mac M1, Mac Intel, Windows or Linux
- Strong belief in tests - contracts often manage money - they must be developed under high scrutiny
- Clear and documented code to help users audit the contracts sources and understand what they do
- Reliance on modern TypeScript to develop clean and typed scripts and tests in a modern framework
- Reliance on TypeScript for deployment instead of working with
fift
CLI tools - it's simply easier - Tests are executed in JavaScript with TVM in web-assembly - a great balance of speed and convenience
- Following of the TON contract best practices appearing in the official docs