Skip to main content

How to become a Blockchain developer and write your first Smart Contract

Introduction

This is an introductory article to help you understanding the tools and frameworks needed so that you can know from where and how to start creating your own Smart Contracts.

In this post I will give you an overview of the tools, frameworks, libraries and languages used to create a Smart Contract in the Ethereum Blockchain. In the second part of this article, we are going to see how to create a Smart Contracts using Solidity and ee are also going to see how to run a Blockchain locally using Ganache, so that you can deploy, interact and test your Smart Contract in your local development environment.

According to a definition from the Wikipedia website:
A blockchain is a decentralized, distributed, and often public, digital ledger consisting of records called blocks that are used to record transactions across many computers so that any involved block cannot be altered retroactively, without the alteration of all subsequent blocks..

What do you need to know?

There are a lot of tools, frameworks, libraries and languages that you need to know and understand how everything relate to each other in order to start working as a Blockchain developer. To try to give you a simple model of how things work and fit inside this huge ecosystem that is Blockchain, I have created the following diagram.

Hopefully by the end of this article you can have a better understanding of how things works and can use it as a starting point to seek for more knowledge afterwards.
During this article we are going to see in more detail all components of the diagram so that you can have a more clear vision of how Dapps and Smart Contracts works.

What is a Blockchain?

We can think of a Blockchain as a chain of blocks that each contain a set of immutable transactions, hence the name Blockchain.

What is Ethereum?

Ethereum is a Blockchain network where you can deploy your own Smart Contracts. We can interact with a Smart Contract on the Ethereum network using Ether (ETH), the Etherum currency. You can find more information about it in this link.

Smart Contracts and Dapps

Dapps are decentralized applications that can interact with a Smart Contract running in the Ethereum network. The Smart Contract is the back-end of your Dapp app.

A Dapp is a front-end application that can interact with some piece of back-end code in the Blockchain. That piece of back-end code running in the Blockchain is the Smart Contract which contains the code supporting your business.

We can create a Dapp using pure javascript or using a js framework like react. To start calling functions in a Smart Contract and make transactions using ether we need a library that can interact with the Blockchain where our contract is deployed. Usually we do that through a front-end application using a library like web3.js. Web3.js is a javascript library that allow us to interact with a Smart Contract in an Ethereum network.

What is NFT?

According to OpenSea, the largest marketplace for NFTs, "An NFT (non-fungible token) is a unique digital item stored on a blockchain. NFTs can represent almost anything, and serve as a digital record of ownership".

What is Solidity?

Solidity is the programming language that we use to create a Smart Contract that runs mostly on the Ethereum Blockchain. We are going to create our first Smart Contract using Solidity in the next part of this article.

What is a Wallet?

To connect to the Ethereum network you need a crypto Wallet that you can use to sign in to applications, prove your identity and make transactions. You can have multiple accounts inside a Wallet where you can manage your balance and assets like NFTs. We are going to use the Crypto Wallet from MetaMask. You can find more information about it in it's website.

Conclusion

In the next article we are going to see how we can levarage the Truffle Framework to deploy our first Smart Contract to our local Blockchain using Ganache.

References

Ethereum
Solidity
Ganache
Truffle Framework
MetaMask
OpenSea

Comments

Popular posts from this blog

Log Aggregation with ELK stack and Spring Boot

Introduction In order to be able to search our logs based on a key/value pattern, we need to prepare our application to log and send information in a structured way to our log aggregation tool. In this article I am going to show you how to send structured log to ElasticSearch using Logstash as a data pipeline tool and how to visualize and filter log information using Kibana. According to a definition from the Wikipedia website: Elasticsearch is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents. According to Elasticsearch platform website , Elasticsearch is the heart of the Elastic stack, which centrally stores your data for lightning fast search. The use of Elasticsearch, Kibana, Beats and Logstash as a search platform is commonly known as the ELK stack. Next we are going to start up Elasticsearch, Kibana and Logstash using docker so we can better underst

Selection Sort Explained

Introduction If you are trying to get a remote job in a top IT consulting company, you will definitely fall into a live code exercise where your algorithms, logical thinking and problem solving skills will be tested and you will have to demonstrate a solid knowledge of these concepts. Today I decided to write about a type of sorting algorithm that I found several times in interviews and decided, after studying the approach used, to create an initial solution in the simplest possible way. Understanding the logic As we know, the sort algorithm basically uses three basic principles to sort the items in a list. A comparator, a swap function, and recursion. For this selection sort algorithm I will focus in the first two. Given that we have the following list of numbers: 64, 25, 12, 22, 11, how would we use selection sort to swap and sort the list in an ascending order? The following code from the init function uses two for loops to create a temporary list (line 2) with the r

How to use Splunk SPL commands to write better queries - Part I

Introduction As a software engineer, we are quite used to deal with logs in our daily lives, but in addition to ensuring that the necessary logs are being sent by the application itself or through a service mesh, we often have to go a little further and interact with some log tool to extract more meaningful data. This post is inspired by a problem I had to solve for a client who uses Splunk as their main data analysis tool and this is the first in a series of articles where we will delve deeper and learn how to use different Splunk commands. Running Splunk with Docker To run Splunk with docker, just run the following command: docker run -d —rm -p 8000:8000 -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_PASSWORD=SOME_PASSWORD --name splunk splunk/splunk:latest Sample Data We are going to use the sample data provided by Splunk. You can find more information and download the zip file from their web site . How does it work? In order to be able to interact with Splunk t