Skip to content
Related Articles

Related Articles

“Hello World” Smart Contract in Remix-IDE

View Discussion
Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 11 May, 2020

What do you mean by Smart Contract?

Smart contracts are self-executing contracts. The term was coined by Nick in 1994. Smart contracts are very different from traditional software programs. They are immutable once deployed on the blockchain. It was because of Ethereum the term smart contract became so popular and used in the Ethereum blockchain.
Solidity is the main programming language for writing smart contracts for the Ethereum blockchain. It is a contract-oriented language, which means that smart contracts are responsible for storing all of the programming logic that transacts with the blockchain. The term smart in smart contracts is as the contract gets executed depending upon some logical condition and all nodes in blockchain have the same copy of that smart contract.

What is Remix-IDE?
The Remix is an Integrated Development Environment(IDE) for developing smart contracts in Solidity programming language. The IDE can be used to write, compile, and debug the Solidity code. It was written in JavaScript and supports testing, debugging and deploying smart contracts, and much more.
Remix-IDE can be accessed in many different ways:

  1. You can use it online in any browser of your choice, by entering the URL: in the browser.
  2. Or you can install it in your own system using this link.
  3. The third way is to use Mist (the Ethereum Dapp browser).

Getting Started

This article is all about writing your first smart contract in solidity using remix-ide which is a browser-based IDE. So let’s get started with our first simple “Hello World” program.

  1. Open the remix-ide in your browser by typing:
  2. You will be presented with following screen:
  3. Click on the “file explorer” icon onto the left side bar (indicated by blue arrow in the above picture).
  4. Select Solidity in the Environment and click + symbol right to the browser.
  5. Type the file name “HelloWorld.sol” and enter the following code into it

    // My First Smart Contract 
    pragma solidity >=0.5.0 <0.7.0;
    contract HelloWorld {
        function get()public pure returns (string memory){
            return 'Hello Contracts';

  6. Once done click the icon just below the “file explorer” icon as shown below:
  7. You will be presented with following screen:
  8. Click “Compile HelloWorld.sol”. Leave rest setting as it is.
  9. Once compiled successfully click the icon below “Solidity Compiler” that is “Deploy and run transactions”. You will be welcomed by next screen:
  10. Without changing any of the values as shown above just click “Deploy” button to deploy your smart contract. Once deployed you will find your smart contract just below in “Deployed Contracts” heading:
  11. Click “>” before your contract you will see a button “get” below as our contract has get function that returns a string. Click get button and you will get :
  12. Congratulations !!! on running your first smart contract in solidity


    My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!