House Capet Family / Ruler Tree

“The idea of a Blockchain is certainly not new” (Alexander Lipton, 2017)

This article covers constructors, a function in Solidity that runs only once, when the contract is deployed onto the Ethereum network.

Table of Contents


How to define a constructor

Public vs Internal Constructors

Constructors’ parameters and inheritance

Payable Constructor


Constructors are a common concept in OOP. …

Welcome to All About Solidity, an article series that aim to help smart contracts developers, building applications on top of the Ethereum blockchain.

It consists of a series of articles that cover several aspects of the Solidity smart contract language, such as addresses, mappings, bytes, structs and more…

This page is the main entry point to the article series. You will find below a complete list of all the articles.

Feel free to leave a comment or a clap, if you like the article and found them useful, to give any feedback or report errors.

Table of Content

all about Addresses

all about Arrays

all about Assembly

all about Bytes

all about Comments

all about Contracts

all about Enums

all about Functions

all about Libraries

all about Mappings

all about Modifiers

all about Structs

Enjoy your reading !

Modifiers are analog to the decorator pattern (source:

In Solidity, Modifiers express what actions are occurring in a declarative and readable manner. They are similar to the decorator pattern used in Object Oriented Programming.

What is exactly a Modifier in Solidity ?

The Solidity documentation define a modifier as follow:

A function modifier is a compile-time source code roll-up.

It can be used to amend the…

The School Cloackroom by Malcolm Evans, a cartoon drawing used as an analogy to explain mappings in Solidity (taken from

Table of Content

  • Introduction to mappings
  • What mappings are used for?
  • How mappings are represented in storage?
  • Key and Values types allowed
  • Operations on Mappings
  • Nested Mappings
  • Mappings as function parameters
  • Structs as value types of mappings
  • Mappings Limitations

Introduction to mappings

Mappings in Solidity are similar to the concept of hash map in Java or…

Table of Contents

How are smart contracts created?

The “this” keyword

Abstract contracts

Contracts inheritance

The “super” keyword

Function overriding

Deactivate and selfdestruct

How are smart contracts created ?

The EVM in Ethereum know that a smart contract is created when an Externally Owned Account (EOA):

  • sends a transaction
  • specifies a zero-address (0x0000000000000000000000000000000000000000 ) as a recipient.

The data field of the transaction contain the compiled bytecode of the smart contract written in Solidity.

Do you want to see…

Table of Contents

Function visibility

View vs Pure

Named Arguments in Functions

Payable functions

Fallback functions

Receive functions

Functions overloading

Functions signature

External functions

Recursive Functions : preventing re-entrancy

Function Visibility


Solidity is a high level language for the EVM. The EVM under the hood does what we call EVM calls, known as message calls”. From a higher perspective, Solidity knows two kind of function calls:

  • internal ones: do not create an EVM call
  • external ones: create an EVM call

4 visibilities availables



What is Assembly?

Any program written in a high level language like C, Go, or Java is first compiled down to what is called an assembly language, before it is executed. But what is assembly?

Assembly ( also called assembler language ) refers to any low-level programming language that is converted to machine…

In Solidity, an array is an ordered list of items that is indexed numerically, starting at 0.

Array types

In this section, we provide two types of categorisation for arrays:

  • Fixed-size vs dynamic size arrays
  • One-dimensional vs Multi-Dimensional arrays.

Fixed-size vs Dynamic-Size array

The Solidity documentation make the distinction between fixed-size and dynamic size arrays. In…

Jean Cvllr

Full Stack Developer, Web / Mobile and Blockchain.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store