Academy

What is Solidity

Learn what a Smart Contract is

Our objective throughout this course is to learn how to define the code required to implement a smart contract that matches our intent. The previous section, furthermore, told us that all smart contracts are defined by their state and their behaviors. Therefore, we claim the following:

Solidity is a high-level programming language which allows us to define both the state and behaviors of a smart contract.

Although these behaviors can be almost anything, the majority of the time, such behaviors manipulate the state of the contract.

Solidity v.s. Other Programming Languages

The first question one might have when learning a new language is the following: what does the language even look like? To start, we consider the following code snippet:

contract A {
    function getOne() public pure returns(uint) {
        return 1;
    }
}

In the above, we have a contract named A. Furthermore, we see that A contains a function getOne() that, when called, returns 1. Even though you might not understand everything that is going on in the code snippet, web developers may realize that the code snippet looks similar to JavaScript. The Solidity syntax, as a matter of fact, is actually inspired by JavaScript, and is a testament to the fact that Solidity itself is a high-level programming language.

Now that we have an idea of what both Solidity allows us to do and what the actually syntax of Solidity looks like, its time to learn the actual language itself.

Last updated on 3/7/2025

On this page

Privacy Policy

We respect your privacy and are committed to protecting your personal data. This privacy policy will inform you about how we look after your personal data and tell you about your privacy rights.

Read full policy