I have a contract C
that is Ownable
so I can use ownerOnly
on its admin functions.
Recently, I added some functionality that I'm going to start using in other projects. I refactored the functionality out to a second contract Refactored
, so now contract C is Refactored, Ownable
.
But then I discovered that some of the functionality of Refactored
needs to be protected as well, so I added contract Refactored is Ownable
and everything broke with a Linearization of inheritance graph impossible
error.
I ended up leaving Ownable
on Refactored
and removing it from C
- and that solved it - but now it looks like C
is using ownerOnly
functionality without including Ownable
- i.e. it works, but doesn't look good.
Is there any way I can have both contracts be Ownable
and still have one of them inherit the other? (I'd like to avoid having a variable in C
be of type Refactored
because then I'll have to expose a bunch of getter functions, negating the whole refactoring).