Solidity is the programming language that started making Ethereum DApps possible by allowing developers an easy way to run complex distributed applications that get the most out of Ethereum EVM.
Ethe name of Solidity refers to a high level static typing language with which you can program smart contracts for the network of Ethereum. Its syntax is very similar to that of well-known languages such as C++ o javascript. Solidity was created with the purpose of allowing the writing of smart contracts in a simple way for the Ethereum network. It is a language designed to get the most out of Ethereum Virtual Machine, allowing the creation and development of smart contracts that can be optimally executed in the EVM.
To do this, the programmer can develop their applications in a language that is easy to use, read and maintain so that, when finished, the Solidity engine converts that simple code into the machine code that the EVM will understand, a machine code that is practically impossible to understand by one. person.
In essence Solidity facilitates the development of smart contracts on Ethereum and, although it is not the only language, it was the first, the most versatile and on which the most smart contracts have been developed.
Solidity, a Turing Complete language
The main characteristic of Solidity is that this programming language is of type Turing Complete. Thanks to Solidity and its relationship with EVM, developers can make programs that are Turing Complete. This because EVM has the ability to execute any code that is defined by a developer within the framework of its capabilities.
This represents a great advantage for the Ethereum network. Thanks to EVM and Solidity developers can program actions that will then be executed by EVM in a decentralized way in the Ethereum network. But this also implies that a protection mechanism must be available to prevent its misuse. This mechanism is known as Gas and it serves to prevent the system from being collapsed by creating infinite loops or other malicious actions. East Gas works like him computational expense that involves processing a transaction or a smart contract on the network.
The concept resembles for example that devised by Adam Back with its system to fight spam email, the HashCash.
Importance and development of Solidity
Ethereum was born as an alternative to the network Bitcoin. Your Creator, Vitalik Buterin at the time, he proposed incorporating a Turing Complete type language into the Bitcoin network. Since it considered that the language with which Bitcoin was developed was insufficient for the evolution of the network. But receiving no response from the developers, Buterin decided to create and develop his own project: Ethereum.
Today, Bitcoin and Ethereum are the most valuable networks, known and used by the cryptocurrency community. Occupying the first and second place respectively. However, Bitcoin and Ethereum have big differences. For example bitcoin, the currency of the Bitcoin network, was created as a means of payment and value safeguard. While Ethereum was developed with the aim of being much more flexible and programmable, allowing it to evolve with new capabilities over time.
This is thanks to EVM and Solidity, the two tools that allow developers to get the most out of Ethereum. Solidity makes it easy to develop applications distributed (DApps) or other functions that make use of smart contracts.
The development of Ethereum started as an idea in the mind of Gavin Wood in 2014. The idea was materialized by Christian reitwiessner together with a work team. The result of this work led to Solidity. Since then, the development of Solidity has maintained its evolution and is currently in the version 0.7.4 of language (November 2020).
Features
- Solidity is a type of Object Oriented Language (OO) like C ++ and C #.
- It was specifically designed to develop applications for the Ethereum network. So it only runs on the Ethereum blockchain or compatible derivatives.
- An advantage of this language is that the source code of the programs that are made with it can be publicly accessed from the blockchain. Even being in bytecode, it is possible to decompile it and get a fairly clear sample of the original source code.
- Solidity supports The heritage and multiple inheritance, giving it great flexibility when programming complex elements.
- This language also provides a series of very useful libraries that facilitate the programming of smart contracts, making the code reusable and easier to maintain.
Available development environments
Like almost any programming language, Solidity can exploit the benefits of an integrated development environment or IDE. In Ethereum, the official IDE is known as Remix. This makes it easier for developers to create smart contracts, while allowing access to the status and properties of smart contracts already created. It also has powerful code proofing and analysis tools to help developers debug their programs.
Remix can also be executed and used online through Firefox or Chrome or directly on our computer. And although this is the official Ethereum IDE, there are also other environments that support the Solidity language. For example, EthereumStudio It is a specialized IDE that provides access to a complete Ethereum environment through a command interpreter known as shell.
Likewise, we find ourselves Solidity plugin for IntelliJ IDEA, another IDE created for the development of computer programs compatible with Solidity. Atom is an editable tool that can be used to customize anything. We can find a package known as etheratom which uses the web3.js library to interact with a node from Ethereum.
Another IDE that we can find is the Visual Studio plugin, created by Microsoft. This allows the creation and development of smart contracts through a Solidity compiler. It also allows the creation of applications for Microsoft and modern web applications and cloud services that use its Azure service.
Introductory course to DeFi
Medium levelTime to update. Traditional finance has changed, discover the revolutionary ecosystem of decentralized finance (DeFi).