Learn Solidity with White Matrix: Chapter 1: Getting started with Solidity
Tags: solidity, dapps, blockchain, blockchaintechnology
Published: 2021-01-06 17:18:35

---
title: Learn Solidity with White Matrix: Chapter 1: Getting started with Solidity
published: true
date: 2021-01-05 15:17:11 UTC
tags: solidity,dapps,blockchain,blockchaintechnology
canonical_url: https://medium.com/coinmonks/learn-solidity-with-white-matrix-chapter-1-getting-started-with-solidity-6defa007a010
---

Solidity is an object-oriented, high-level programming language for implementing smart contracts. It was introduced in 2014. Smart contracts are programs that **govern the behavior of accounts** within the Ethereum state. Solidity was influenced by C++, Python, and JavaScript and is designed to target the Ethereum Virtual Machine (EVM).

Solidity is statically typed, supports inheritance, libraries, and complex user-defined types among other features. With Solidity, you can create contracts for uses such as voting, crowdfunding, blind auctions, and multi-signature wallets.

![](https://cdn-images-1.medium.com/max/1024/1*Ms1pP6x7iV-IhdaHVKhS0A.png)<figcaption>Learn Solidity with White Matrix (World’s First Cloud-based Blockchain IDE provider)</figcaption>

There are different tools available for implementing the solidity language but [**ChainIDE**](https://www.chainide.com/) is the most useful and commonly used tool for Ethereum based application development. It supports other blockchain platforms also (i.e. Fiscobcos, Libra, Ant, and etc). For more details, you can visit here [**ChainIDE**](https://www.chainide.com/) **.**

### Environment Setup :

Head over to [**ChainIDE**](https://www.chainide.com/). This will serve as the development platform for writing your first smart contract. Your screen should look like this or something similar:

### ChainIDE:

![](https://cdn-images-1.medium.com/max/1024/1*WrCGwLObwqMDCGuVcOWtpg.png)<figcaption>ChianIDE for the Blockchain Applications development using Solidity and Ethereum</figcaption>

ChainIDE is a Cross-platform smart contract cloud-based IDE, it is very easy to use. It is developed for the ease of researchers and practitioners in the field of blockchain. on the most left side, you can select to create the new smart contract as shown in the image below and start to write down your first program.


> **Take [**this course**](http://blog.coincodecap.com/go/learn) and learn about Etheruem development.**


![](https://cdn-images-1.medium.com/max/1024/1*2mpY14sc9VGlHFQhKQLbjw.png)

The first thing you need to do before writing any solidity program is to declare its compiler version that will be used to compile your solidity program. _pragma_ is used to declare compiler version for solidity. We can select an exact version of the compiler by pragma solidity by using _pragma solidity 0.4.25;_ or we can let the program select an appropriate version for us by using _pragma solidity >=0.4.0 <0.7.0;_

![](https://cdn-images-1.medium.com/max/925/1*l8dBX2nDnr7UzbSekWYydg.png)

Here we write down a very simple program for basic tasks (i.e. addition, multiplication, etc), test it, compile it, and deploy it.

![](https://cdn-images-1.medium.com/max/1024/1*0QXa473ITvbsX6XySjxPYw.png)

once you have successfully compiled your contract, it's time to deploy it on the Ethereum blockchain using MetaMask. After successful deployment, you can do transactions on the Ethereum blockchain.

**MetaMask**

MetaMask acts as both an Ethereum browser and a wallet. It allows you to interact with smart contracts and dApps on the web without downloading the blockchain or installing any software. You only need to add MetaMask as a Chrome Extension, create a wallet, and submit Ether. You must have some amount of Ethers in your Ethereum wallet to deploy an Ethereum smart contract on the network.

![](https://cdn-images-1.medium.com/max/1024/1*xpQpeOyGJfRyLtW3h77-rg.png)

For installing the MetaMask, we will go to the chrome store. or you can [click](https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?utm_source=chrome-ntp-icon) here to install the MetaMask. Once it is installed, It will ask for the account if you already have a MetaMask account, can log in to an already existing account otherwise you can create a new account.

![](https://cdn-images-1.medium.com/max/841/1*UVqxfzTItFIRx0_KwTKwuA.png)

Once you have set up your account, you will select _Ropsten Test Network._ Because you are just going to test your contract. For successful deployment of your contract to Ethereum blockchain, you need to have dummy ether in your account. These ethers will be used as the transaction fee for storing and computing on the Ethereum blockchain.

![](https://cdn-images-1.medium.com/max/352/1*I1jVuDyIPspMQboiy_Y98g.png)

Here is how will we add dummy ether to MetaMask. Once you have ethers in your wallet, you can simply go to ChainIDE and deploy it successfully.

![](https://cdn-images-1.medium.com/max/1024/1*H8s7L5_zW6Fk40soee2VWQ.png)

Once you have ether in your wallet, select the higher fee to accelerate the processing of your transaction. Accelerating transaction by using higher fee increases their chances of getting processed by the network faster, but it is always not guaranteed. The estimated processing fee will be totally dependent on your contract. The more complex the transaction is, the more gas is required to run the smart contract.

![](https://cdn-images-1.medium.com/max/342/1*9FsVF6TkHaDdtwj4CpCqHQ.png)

![](https://cdn-images-1.medium.com/max/1024/1*D3opU4r9kaLrlhhHB2Lprw.png)

After the successful deployment, you will get a notification “Deployment succeeded” as shown in the figure above. Now, you can make secure transactions using Ethereum blockchain resources by paying dummy ethers.

![](https://cdn-images-1.medium.com/max/368/1*ZvvS5rlX5VvXLbIcTzuTqA.png)

Thanks for your time. Hope this post helps you learn about Blockchain dapp development.

* * *