Skip to content

Latest commit

 

History

History
26 lines (23 loc) · 1.11 KB

Contract Types.md

File metadata and controls

26 lines (23 loc) · 1.11 KB
  1. Abstract Contracts: Contracts need to be marked as abstract when at least one of their functions is not implemented. They use the abstract keyword.

  2. Interfaces: They cannot have any functions implemented. There are further restrictions:

    1. They cannot inherit from other contracts, but they can inherit from other interfaces
    2. All declared functions must be external
    3. They cannot declare a constructor
    4. They cannot declare state variables. They use the interface keyword.
  3. Libraries: They are deployed only once at a specific address and their code is reused using the DELEGATECALL opcode. This means that if library functions are called, their code is executed in the context of the calling contract. They use the library keyword.


Slide Screenshot

103.jpg


Slide Text

  • Base -> Derived
  • Constructors
  • Constructors Called -> Linearization Rules
  • Constructor Arguments
  • Inheritance List or Derived Constructor

References


Tags