Solidity Tutorial : all about Addresses

Jean Cvllr
17 min readAug 1, 2019

Table of Content

Introduction

  1. What is (technically) an Ethereum Address ?
  2. Basic of Addresses in Solidity & address literals
  3. Address vs address payable
  4. Methods available with addresses (including call(), delegatecall() and staticcall() )
  5. Types conversions between addresses and address payable
  6. Methods returning an address type
  7. The Zero Address
  8. Advanced Topics

References

There are nearly 49 million unique addresses on the Ethereum blockchain.

A Gentle Introduction

Let’s start with a very simple example to understand addresses in Ethereum (and in Blockchain in general). For this, we have to imagine a scenario.

Sender: You, Recipient: “John Doe, 13 example street, London, E11 2E3, UK”.

You are on holiday in New York. It’s the the first time you visit the city and you love it ! So much that you decide to tell to your friend John Doe that he should definitely visit it one day.

A good way to give him an idea would be to send him a postcard of the Empire State Building.

So you go to the post office, and the postman asks you “Where should I send it?”, to which you reply “to my friend, John Doe”.

The postbox at the door might have a label, that says that “John Doe” lives there.

The employee at the desk will definitely answer that 1) he does not know WHO is your friend John Doe and 2) He does not know WHERE he lives.

Since you know John’s address, you will write it on the postcard, and hand it to the post office employee at the desk.

The posting company will then be able to ship your postcard using its network of carrier and office branches around the world. The card will be relayed between post offices and courier carriers.

--

--