The Chain logo

Beginner guide to Ethereum

Learn everything you need to know about Ethereum Technology

By Python ScriptPublished 4 years ago 5 min read
Beginner guide to Ethereum
Photo by Zoltan Tasi on Unsplash

Before we explore the world of Ethereum, let’s understand how the Internet functions. The reason we are doing this is because many experts in the field compare the emergence of blockchain technology to be very similar to how the internet disrupted almost every industry known to us. Our personal data, passwords and financial transaction details are all stored in centralized databases that are hosted and owned by large companies like Google, Amazon, Facebook, etc. Although this setup provides a number of conveniences to its users, the primary advantage being the presence of a team of specialists to monitor and maintain these databases.

However, there is also exists a major vulnerability. Once a hacker manages to get access into one of these centralized databases, all the information contained in it is compromised. What’s worse is that the data breach will not be apparent until all the damage is done. Bitcoin penetrated into the online banking sector and has left a huge dent. Similarly, Ethereum has been designed with the goal of using blockchain to replace internet third parties that are prevalent today. These include services like messaging applications and online document editing platforms from Evernote to Google docs.

So who stores the massive amounts of data being generated? People like you and me can volunteer to become a part of the peer-to-peer network, and thereby become a “node”. Thus, all serves and clouds are replaced by a thousands of “nodes” from all over the world. Our individual computers all unite to act a single “World Computer”. This is why Ethereum and the block chain technology it works on is so powerful. Although no individual or company is the owner of Ethereum, any computational process happening on the network cannot take place for free of cost.

The currency used within the Ethereum network to pay for computationally intensive processes is called Ether. Today, the value of 1 ether is approximately $215.84. This may vary depending on when you’re reading this post. Do check out what the current value of the currency is. What is an ether made of? It is just a unique piece of computer code which is run to pay for the usage of your computational resources. Like physical cash, you don’t require a third party to process the transaction.

Ethereum introduces us to a term called “Smart Contracts”. This term was introduced way back in 1997 by Nick Szabo. He was a computer scientist, cryptographer and law scholar. Smart contracts are just like contracts in the real world, the only difference being that they are completely digital. A smart contract is a computer program stored inside a block chain. A typical example to explain this is by referring to Kickstarter, an online crowd sourcing platform.

Product teams will set a funding goal and source money from people who believe in the idea. Kickstarter is a third party which handles these transactions which both the product teams and the public need to trust to handle their money correctly. With smart contracts, we don’t have to rely on a third party like Kickstarter. A smart contract is created to do the work that Kickstarter did. Transactions made by the public for a certain product is stored in the smart contract until the funding goal is reached. If the goal is reached, it sends the money across to the product team for further development of their product. If the funding goal is not reached, it automatically refunds the money to the public who supported the project. Since the smart contract is stored within a blockchain, it is completely distributed and no one is in control of the money. They are immutable and distributed. This means once a smart contract is created, it can never be changed again. The output of the contract is validated by everyone on the network. A single person cannot tamper with the contract and force it to release the funds before the funding goal is reached. Everyone on the network can verify that this attempt was malicious and stop the transaction from taking place.

This has several applications. For example, banks can issue loans using this technique, insurance companies can process claims, etc. Smart contracts can be specifically programmed using a programming language called “Solidity”, which has a syntax similar to JavaScript. We will now explore this programming language and write our first smart contract.

Getting Started With Solidity

Solidity is an object-oriented, high-level language for deploying smart contracts. Solidity was developed using C++, Python and JavaScript and is designed to target the Ethereum Virtual Machine (EVM). The main features of Solidity are that it is statically typed, supports inheritance, libraries and complex user-defined types. There are several ways of implementing Solidity code. The method that we will be using is using the in-browser IDE called Remix. Let’s write our first “Hello world” program using Solidity to get started. Create a new program by clicking on the plus button on the left side. Call the program helloworld.sol. All solidity programs will have the extension of .sol. Copy the following program.

pragma solidity ^0.4.0; //Sets the version of Solidity you're using

contract Hello {

string name; //Creating a string type variable called name

function Hello(){ //Hello constructor

name = "Steve"; //Setting the name to a default

}

function sayHello() constant returns(string,string){

return("Hello", name);

}

function setName(string custom_name){ //To set a customized name

name = custom_name;

}

In the case of Java, we write classes. Analogous to classes, in Solidity, which is also an object oriented programming language, we use the term “contracts”. So, contracts are basically classes. There’s a main class which uses other classes and inherits from various other classes. During the beginning of instantiation of a class in Solidity, we call a function called a constructor, and is given the same name as the contract. In our case, it’s the function called Hello. The constructor is called when you first deploy your smart contract into the blockchain, and is never called after that is done. The second function returns the words Hello and name Steve. The third function allows you to manually enter a name within with double quotes (e.g., “Elon Musk”), which will be assigned to the variable called name.

To deploy your smart contract, click on the tab called “Run” in the top right hand corner and hit “deploy”. On clicking sayHello function underneath in the “deployed contracts” section, your output should be as follows.

0: string: Hello

1: string: Steve

You can change the name under the setName contract, which will give you an output as below.

0: string: Hello

1: string: Elon Musk

alt coins

About the Creator

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2026 Creatd, Inc. All Rights Reserved.