Setting Environmental Salt Panks Developing with Visual Research Code
Sorana is a popular, fast and scalable Blockchain platform that has attracted significant attention in the cryptocurrency area. As its development environment becomes more mature, setting up a suitable development environment on your machine may be irresistible for beginners. This article goes through the environmental establishment process to develop Solan using the Visual Studio Code (VS code), which is a great choice for developers because of its light and adaptive nature.
Prerequisites
Before we start, make sure you have the following conditions:
- Modern operating system (Windows, Macos or Linux)
- Recent version of NODO.JS (recommendation LTS or latest version)
- Solana Clli (knot pack management) installed on your machine
- Knowledge with Gita and Basic Coding Concepts
Step 1: Install the required packages
To set the salt development environment, the VS code must install the following packages:
Solan-clli '
- VScode solan
To install these packages via NPM or thread:
Bash
NPM Install -G Sorana -Cli @vScode/Sorana
`
or
Bash
Predja Global Add Soana-Clli @vScode/Sorana
`
Step 2: Create a new Solane project
Create a new folder for your project and go. Then create a new directory for the project folder with the name of your choice (egmy_solana_project).
Bash
mkdir my_solana_project
Cd my_solana_project
`
Phase 3: Format Sorana Cli
Platform Solana Clli to download and manage packages:
Bash
Solan init
`
This command will create a new directory structure for your project, including the necessary files for the Sorana Clu.
Step 4: Install dependency
Install all the necessary addiction by launching the following commands:
Bash
NPM Install – -Save @Sorana/Web3.js
`
or
Bash
LANGA MORE @Sorana/Web3.js
`
Step 5: Set vs code settings
Update vs code settings to incorporate the Sorana Clli. You can do this by creating a new file called.vscode/setins.jsonand add the following content:
Json
{
“Extensions”: [“Typescript”],
“Solan version”: “1.9.0”,
“SolanodePath”: “/USR/bin/knot”
Iche
`
This configuration speaks to VS code NODO.JS version 1.9.0, which is a recommended version of salt development.
Step 6: Create a new Sorana folder
Create a new directory called "SRC in your project folder:
`Bash
Mkdir src
Cd src
`
Step 7: Create a new strength file
Create a new file called "Main.sol Division” SRC/Agreement “, which acts as the main group:
`Strength
Pragman solidity ^0.8.0;
MyContkrt agreement
Nint256 public number;
Function Income () Public {
Count ++;
Iche
Function GetCount () Public View Returns (Naint256) {) {
Return number;
Iche
Iche
`
This strength code defines a simple contract with the activities of the I GetCount collection feature.
Step 8: Build and assemble a project
Complete and Build the Sorana project with the following commands:
`Bash
NPM Run Build: Dev
Npm run compile
`
or
Bash
Building Yarns: Dev
Yarn construction
`
Build: Devproduces a file '.sol
in the same directory.
Step 9: Open your new project in vs code
Open the new Sorana project with vs code. You should see a new folder structure with multiple files and folders including:
Main.Sol
: Your main power basket
Contracts.
- Contract.abi`: ABI (Binary application interface) your contract
Step 10: Type code in vs code
You can now write the code directly in the editor or open an existing file.