A solidity is a contract high-level programming language. High-level programming languages are

It is a static typed high-level programming language, which means each variable stored

Solidity code runs on Ethereum Virtual Machine(EVM). EVMs are run time environments for running contract code in the Ethereum platform.

Solidity Advantages

  • Object-oriented language that classes and inheritance
  • Hight level language, and human-readable code
  • Large community support
  • Lot of developer tools available
  • Static type language, means every data contains a type before storing it
  • Everything is contracted oriented
  • Runs on Ethereum Virtual machine

Solidity Disadvantages

  • Once Contract is created, adding features to the existing contract is not possible.
  • Solidity is the latest and young, Still, some bugs exist.
  • It does not have a floating type

Solidity source code file extension

File extension tells the type of the file. smart contracts created with a file name and .sol extension.

For example, HelloWorld.sol is a hello world smart contract example.

you can create and edit solidity contracts in any editor.

Multiple ways to deploy Contract deployment types in blockchain

Once the solidity smart contract code is ready, We can deploy contracts to different types in the blockchain.

You can use frameworks or REMIX to deploy to blockchain environments.

  • Private

    It uses private Ethereum networks for running contracts and testing the code.

  • Public Testnet:

    These are public blockchain Ethereum network for testing contracts, and does not use fake funds

  • Public Mainnet:

    These are public blockchains Ethereum is real production-ready which uses real money funds and has access to everyone.

Important Notes:

  • Each line or statement ends with a semicolon (;)
  • Case sensitive

What is a Contract in Solidity.

The contract is similar to classes in java. It is a collection of contract functions and their data(state) that is stored in the Ethereum blockchain network.

Solidity Compilation Process


                                    --- ABI
                                    |
Solidity code > Solidity Compiler --|
                                    |
                                    ---- MachineByte Code -- Ethereum Blockchain