Solidity Tutorial: all about interfaces

Jean Cvllr
Coinmonks

--

Hand drawing by Jean Cvllr — different light switches to represent the concept of interfaces

When you flip a light switch, the light goes on.

You do not care “how” the switch turns the light on.

You just care that “it does turn the light on”.

Table of Contents

The idea behind interfaces

What are smart contract interfaces?

Interfaces in Solidity

How to define and use an interface in Solidity?

Functions defined inside an interface.

Function visibility inside interfaces

Benefits of using contract interfaces

Types defined inside an interface

Interfaces and inheritance

Function overloading inside interfaces

Defining events inside interfaces

interfaces and their JSON ABIs

What cannot be defined inside an interface

Security Considerations around…

--

--