Easy guide for developers
This article is a taste of the developer experience and a demonstration of how Solidity++ functions. Here is an example of a simple smart contract written in Solidity++ on the Vite network.
This code defines a simple smart contract called “SimpleStorage” written in Solidity++. The first line, “pragma soliditypp >=0.8.0 <0.9.0;”, is called a version pragma. It tells the compiler which version of the Solidity++ compiler to use. In this case, it specifies a version greater than or equal to 0.8.0 and less than 0.9.0.
The contract has two state variables:
“storedData” which is an unsigned integer (uint) variable.
The contract has two functions:
“set(uint x)” function which is an external function, used to set the value of “storedData” to the value of “x.”
“get()” function which is an external view function and returns the value of “storedData” as an unsigned integer.
In simple words, this contract allows storage of a single unsigned integer value on the blockchain and two functions to get/set the value of the storedData.
The “external” keyword in the function means that the function can be called from outside of the contract, while the “view” keyword in the get function means that the function only reads data from the contract and does not modify the contract’s state.
In deployment of this smart contract on the Vite network, the following steps would happen:
1- Connect to the Vite network using a Vite wallet or Vite browser extension.
2- Deploy the compiled contract to the Vite blockchain. Transaction includes the bytecode and necessary details for deploying smart contract.
3- Once the contract is deployed, other users on the Vite network can interact with it by calling its functions and reading its state. They can also make transactions that would call functions and alter the state of the contract.
Deploying a smart contract on the Vite network would require 10 VITE tokens to be burned as a one-time cost. Note that this is just an example and the process of working with smart contracts on the Vite network may be different depending on the specific tools being used.
Here are a few examples of smart contracts written in Solidity++:
Official: https://www.vite.org/
ViteX Community DEX : https://vitex.net/
Twitter: https://twitter.com/vitelabs
Vite Forum: https://forum.vite.net
Telegram:
Russian: https://t.me/vite_russian
Arabic: https://t.me/vite_arabic
Spanish: https://t.me/VITE_Spain
Indian: https://t.me/VITE_India
Vite announcement: https://t.me/vite_ann
Korean Kakao Community: https://open.kakao.com/o/gWp9av5c
Reddit : https://www.reddit.com/r/vitelabs/