Framework for development of TON smart contracts
npm install @ton/blueprintA development environment for TON blockchain for writing, testing, and deploying smart contracts.
* Quick start
* Overview
* Core features
* Tech stack
* Requirements
* Features overview
* Project creation
* Directory structure
* Building contracts
* Running the test suites
* Running scripts
* Deploying contracts
* Using Mnemonic Provider
* Contract development
* Creating contracts
* Writing contract code
* Testing contracts
* Benchmark contracts
* Configuration
* Plugins
* Custom network
* Contributors
* License
* Donations
Run the command in terminal to create a new project and follow the on-screen instructions:
``console`
npm create ton@latest
Blueprint is an all-in-one development environment designed to enhance the process of creating, testing, and deploying smart contracts on TON blockchain using Tolk, FunC, and Tact languages.
* Create a development environment from template - npm create ton@latest
* Streamlined workflow for building, testing and deploying smart contracts
* Dead simple deployment to mainnet/testnet using your favorite wallet (eg. Tonkeeper)
* Blazing fast testing of multiple smart contracts in an isolated blockchain running in-process
1. Compiling Tolk with https://github.com/ton-blockchain/tolk-js
2. Compiling FunC with https://github.com/ton-community/func-js
3. Compiling Tact with https://github.com/tact-lang/tact
* Uses tact.config.json as the build configuration file
4. Testing smart contracts with https://github.com/ton-org/sandbox
5. Deploying smart contracts with TON Connect 2 or a ton:// deeplink
* Node.js with a recent version like v18. Version can be verified with node -v
* IDE with TON support:
* Visual Studio Code with the TON plugin or Tact plugin
* IntelliJ IDEA
* TON Development plugin for Tolk, FunC and Fift
* Tact plugin by TON Studio for Tact
1. Run and follow the on-screen instructions: npm create ton@latest or npx create-ton@latestnpm/yarn install
2. From the project directory run to install dependencies
* contracts/ - Source code for all smart contracts and their importswrappers/
* - TypeScript interface classes for all contracts except Tact. tact.config.json
* Tact-generated wrappers are located according to the build path defined in Contract
* Each wrapper implements interface from @ton/corecompilables/
* Includes message [de]serialization primitives, getter wrappers and compilation functions
* Used by the test suite and client code to interact with the contracts from TypeScript
* - Compilations scripts for contractstests/
* - TypeScript test suite for all contracts (relying on Sandbox for in-process tests)scripts/
* - Deployment scripts to mainnet/testnet and other scripts interacting with live contractsbuild/
* - Compilation artifacts created here after running a build command
1. You need a compilation script in compilables/ - examplenpx blueprint build
2. Run interactive: or yarn blueprint buildnpx/yarn blueprint build
3. Non-interactive: OR build all contracts yarn blueprint build --allyarn blueprint build counter
* Example: build/
4. Build results are generated in build/
5. Tact generated files are located in directorybuild/
6. Fift output is located in
1. Run in terminal: npx blueprint test or yarn blueprint testnpm test
2. Alternative method: or yarn testnpm/yarn test
3. You can specify test file to run: yarn test counter
* Example:
> Learn more about writing tests from the Sandbox's documentation - here.
1. Custom scripts should be located in scripts folderrun
2. Script file must have exported function `ts`
export async function run(provider: NetworkProvider, args: string[]) {
//
}npx/yarn blueprint run
3. Script can be run using