0

I'm reviewing OpenZeppelin's smart contracts and in many cases I find that there tends to be a redundant or duplicate inheritance.

contract ERC20 is IERC20, IERC20Metadata {}

interface IERC20 {}

interface IERC20Metadata is IERC20 {}

In this example, ERC20 implements IERC20Metadata which already implements IERC20. Nonetheless, the contract implements both of them. I tried removing the redundant interfaces and it works just fine. Is there a reason for this? Is it for clarity or legibility purposes only?

fcurdi
  • 1

1 Answers1

2

The author of this code states in a comment:

It's technically not necessary, but it's good to be explicit.

Petr Hejda
  • 40,554
  • 8
  • 72
  • 100