How to use onlyGovernance modifier?

Hey @DoDzilla, your understanding of the modifier is correct. The way it works is by inheritance, in which such modifier is inherited to other Governor contracts (eg. GovernorSettings) so they can use it in their implementations.

However, the modifier is not available for general use since it depends on the state of the Governor. You can use it only if you're working on a contract that also inherits from governor.

You can see its implementation here

1 Like