“Hello World” Smart Contract in Remix-IDE

11 May, 2020
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:
You can use it online in any browser of your choice, by entering the URL: https://remix.ethereum.org/ in the browser.Or you can install it in your own system using this link.The third way is to use Mist (the Ethereum Dapp browser).
You can use it online in any browser of your choice, by entering the URL: https://remix.ethereum.org/ in the browser.
Or you can install it in your own system using this link.
The third way is to use Mist (the Ethereum Dapp browser).
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.
Open the remix-ide in your browser by typing: https://remix.ethereum.org/You will be presented with following screen:Click on the “file explorer” icon onto the left side bar (indicated by blue arrow in the above picture).Select Solidity in the Environment and click + symbol right to the browser.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';
    }
}
Once done click the icon just below the “file explorer” icon as shown below:You will be presented with following screen:Click “Compile HelloWorld.sol”. Leave rest setting as it is.Once compiled successfully click the icon below “Solidity Compiler” that is “Deploy and run transactions”. You will be welcomed by next screen: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: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 :Congratulations !!! on running your first smart contract in solidityReferences:https://en.wikipedia.org/wiki/Smart_contractMy Personal Notes
arrow_drop_upSave
Open the remix-ide in your browser by typing: https://remix.ethereum.org/
You will be presented with following screen:
Click on the “file explorer” icon onto the left side bar (indicated by blue arrow in the above picture).
Select Solidity in the Environment and click + symbol right to the browser.
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';
    }
}

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

Once done click the icon just below the “file explorer” icon as shown below:
You will be presented with following screen:
Click “Compile HelloWorld.sol”. Leave rest setting as it is.
Once compiled successfully click the icon below “Solidity Compiler” that is “Deploy and run transactions”. You will be welcomed by next screen:
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:
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 :
Congratulations !!! on running your first smart contract in solidity
References:
https://en.wikipedia.org/wiki/Smart_contract
https://en.wikipedia.org/wiki/Smart_contract
Machine Learning
Machine Learning
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.