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...

How to create a REST API Pagination in Spring Boot with Spring HATEOAS using MongoDB

Introduction In this post we are going to see how we can create a REST API pagination in Spring Boot with Spring HATEOAS and Spring Data MongoDB . For basic queries, we can interact with MongoDB using the MongoRepository interface which is what we are going to use in this tutorial. For more advanced operations like update and aggregations we can use the MongoTemplate class. With Spring applications we start adding the needed dependencies to our pom file if using Maven as our build tool. For this project we are going to use the following dependencies: Spring Web , Spring Data MongoDB and Spring HATEOAS . To quickly create your Spring Boot project with all your dependencies you can go to the Spring Initializr web page. This is how your project should look like: As with any MVC application like Spring there are some minimal layers that we need to create in our application in order to make it accessible like the Controller , Service , Model and Repository layers . For this...

Understanding RabbitMQ

Introduction RabbitMQ is a centralized message broker based on the AMQP (Advanced Message Queuing Protocol) protocol, acting as a Middleware between Producers and Consumers of different systems. In a message system, Publishers sends a message to a message broker where messages are consumed some time later by one or more Subscribers. By introducing a message brokeer between systems we are decoupling the sender application from the receiver. In this case the service that is responsible for sending or publishing the message does not need to know about any other service. All it needs to care about is the message and its format. With a message system you send a message to a message broker first and when the consumers or listeners of it become online they can start consuming from the message queue. This means you can keep sending messages without even care if the other application is online or if they had any failures. RabbitMQ Architecture Exchange, queue and bindings are the ...