4

Why Solidity is used to Develop Smart Contracts?

 2 years ago
source link: https://blog.knoldus.com/why-solidity-is-used-to-develop-smart-contracts/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Why Solidity is used to Develop Smart Contracts?

Reading Time: 3 minutes

Solidity was first proposed and developed in year 2014 by Gavin Woodand since then it has come a long way. Then Ethereum’s Solidity team led by Christian Reitwiessner developed it later.

It is a high-level , object-oriented language used for implementing smart contracts.

A smart contract is a self-executing contract. It has the terms of the agreement between buyer and seller. The code and the agreements contained therein exist across a distributed, decentralized blockchain network. The code controls the execution, and transactions are trackable and irreversible.

Solidity Ethereum

Solidity is a curly bracket language and it is similar to one of the most common programming languages, JavaScript. It is a dialect of JavaScript. This means that if you understand JavaScript, it can be easy to pick up Solidity. Solidity also shares similar characteristics to the programming languages C++ and Python. And it’s design target the Ethereum Virtual Machine (EVM). 

Solidity is a statically typed language. It supports inheritance, libraries and complex user-defined types among other features.

How Solidity works

Many different cryptocurrencies and decentralized applications use Ethereum’s ecosystem.

All kinds of businesses and organizations can use smart contracts. And make it possible for unique technologies to build on Ethereum.

For Fungible tokens and non-fungible tokens, Smart contracts are created using Solidity. A non-fungible token is a unique and non-interchangeable unit of data stored on a digital ledger. Non-fungible tokens and fungible tokens are build on different standards in the Ethereum ecosystem.

Solidity allows different types of use cases for Ethereum. It enables people to use tokens and non-fungible tokens on Ethereum.

Minting non-fungible tokens , Adding non-fungible to yield farming pools for extra interest, different kinds of uses for tokens are made possible by Ethereum.

Decentralized Autonomous Organizations (DAOs) is a new type of online organizational structure. We use Solidity to write DAOs .

DAOs allow different people to come together as members on an online platform where they vote on the DAO’s key decisions.

Solidity makes it possible to automate processes within the DAO. Examples of process automation in DAOs include making votes for key decisions and the allocation of reputation to DAO members for their contributions to the group.

Solidity Basics

Let us start learning basics of solidity just by using a small example:

pragma solidity^0.4.0;
contract StorageBasic {
  uint storedValue;
  function set(uint var) {
     storedValue= var;
  }
  function get() constant returns (uint) {
   return storedValue;
  }
}

In this program, the very first line of code declares that the source code to be written in Solidity’s Version solidity^0.4.0.

Now the code will compile and compatible with the corresponding EVM or any other superior version.

The word “Pragma” refers to the instructions given to a compiler to sequentially execute the source code. Such atype of declarations are essential to ensure that the program executes as expected with all compatible versions of the compiler. 

So in our next blog I will explain how to start with Solidity, what all installations we need for the same.

Thank you to all the Readers and please stay connected for more such blogs.

If you want to read more content like this?  Subscribe to Rust Times Newsletter and receive insights and latest updates, bi-weekly, straight into your inbox. Subscribe to Rust Times Newsletter: https://bit.ly/2Vdlld7.


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK