Step 1.Install related packages
npm install -g solc truffle
Step 2.Download and unzip file
Step 3.Write Contract
eg. Contract1.sol
pragma solidity >=0.4.23;
contract Contract1{
string _field;
function get()public view returns (string memory){
return _field;
}
function set(string memory field)public{
_field=field;
}
}
Step 4. Compile Contract and Deploy Contract
truffle compile ;& node .\helper\deploy.js {ContractName}
Step 5. Call Contract
node .\src\main.js
Video: Tutorial