Hello World in Solidity

Published on 01 November 2018 (Updated: 02 May 2020)

Hello World in Solidity

In this article, we’ll be tackling Hello World in Solidity, a smart contract language.

How to Implement the Solution

Without further ado, here’s an implementation of Hello World in Solidity:

pragma solidity ^0.4.22;
contract helloWorld {   
    function renderHelloWorld () public pure returns (string) {       
        return 'Hello, World!';             

While the format of Solidity looks a bit different from the more popular programming languages today, what’s happening behind is fairly straightforward.

First we import the version of Solidity we’d like to use. Then we create a function and specify we’d only like to return a string. And, voila!

How to Run the Solution

If you want to run the solution, remix provides an IDE you can visit to write and execute the smart contract. Every piece of code written in Solidity—or any blockchain programming language—is considered a smart contract.

Further Reading