September 2019
Beginner to intermediate
540 pages
13h 3m
English
A contract can extend from other contracts, abstract contracts, or interfaces. Inheritance is an important capability in most object-oriented languages, including Solidity. As shown in the following examples, the Orders contract has been rewritten to extend from the AbstractOrders contract. It implements the setOrder methods, in addition to reusing the get and set methods from its parent contract, AbstractOrders:

Abstract contracts or interfaces are not instantiable. When the getOrder or setOrder methods are invoked by an external account or contract, only the Orders contract will be instantiated.
Unlike Java, but similar to C++, ...
Read now
Unlock full access