0

I'm learning the usage of interface in solidity, and I think its most usage is to provide a API for other contract or Dapp to call.

I also notice a lot of contract inherit the interface. I wonder what is the advantage for a contract to inherit the interface of another contract instead of inheriting the another contract itself?

I can't convince myself since the following reasons:

  1. Inheriting interface needs to write the interface first.
  2. Inheriting interface needs to rewrite the function code.
Huowuge
  • 41
  • 5

0 Answers0