Abstract Contracts

Learn how abstract contracts works in Solidity.

Abstract contracts in Solidity serve as basic blueprints, specifying the structure and a set of functions that derived contracts must implement. They can’t be instantiated and serve mostly as a template for other contracts to follow. Any derived contract that derives from an abstract contract must implement the incomplete functions, or else it will be labeled as abstract. It specifies the structure of the contract, and any derived contract that inherits from it must do the same.

Characteristics of abstract contracts

Here are the key characteristics of abstract contracts:

  • No implementation: These contracts contain at least one function without implementation. These functions act as placeholders, indicating that their details must be provided by any contract inheriting from the abstract contract. ...

Get hands-on with 1400+ tech skills courses.