Skip to content

Latest commit

 

History

History
70 lines (44 loc) · 3.2 KB

File metadata and controls

70 lines (44 loc) · 3.2 KB

Setup development environment

Summary: In previous steps we learned concept of smart-contract and basic ways of interacting with TON blockchain through wallet apps and explorers.

This guide covers basic steps of setting up your smart-contract development environment using Blueprint SDK and creating basic project template.

But before we proceed to actual coding let's install and setup all required tools!

Prerequisites

  • Basic programming skills.
  • Familiarity with Command-line interface.
  • Your preferred code-editor/IDE.
  • Around 15 minutes of your time.

Setup development environment

For this guide we will rely on Blueprint SDK and Node.js/Typescript stack for writing wrappers, tests and deployments scripts for your smart-contract, because its provides easiest, ready to use environment for smart-contracts developing.

:::info Using native instruments and language-dependent SDK's for smart-contract development covered in more advanced sections here:

Step 1: Install Node.js

First, visit installation page and execute download commands in PowerShell or Bash corresponding to your operating system Windows/Linux.

Check node version by executing following command:

node -v
npm -v

Node version should be at least v18.

Step 2: Choose smart-contract development language

During guide we provide example on 3 languages: Func, Tact and Tolk. You can choose from any of them and even combine smart-contracts on different languages on latest sections. To proceed through guide there is now need of deep understanding of choosed one, basic programming skills will be enought. You can find their breaf overview here: Programming languages

Step 3: Setup Blueprint SDK

Change directory to parent folder of your future project and run following command:

npm create ton@latest

TODO: add short language description for choosing prefered one.

This will run interactive script for creating project template, you can enter anything you want, but if you want to have same paths as this guide choose following:

  1. Project name: Example.
  2. First created contract name: HelloWorld.
  3. Choose the project template: A simple counter contract corresponding to your choosen language.

And finally, change your current directory to generated project template folder, and install all required dependencies:

cd ./Example
npm install

Step 4(optional): IDE and editors support

Ton community developed plugins providing syntax support for several IDE's and code editors. You can find them here: Plugin List.

Also consider installing plugins providing support for JavaScript/TypeScript tools for your preferred IDE or code editor and, specifically, Jest for debugging smart-contract tests.