Gitcoin is GDPR complaint. Learn more in
Gitcoin's Terms & Conditions.
Check out the Issue Explorer
Looking to fund some work? You can submit a new Funded Issue here.
Certain use-cases require a check to be applied to all or at least many functions. Most notably, this includes a general smart contract deactivation function (as replacement for dangerous selfdestruct), a "pausable" pattern and so on.
Modifiers already provide basic support, but it is too easy to forget a modifier to be mentioned with a single function, also it requires quite some typing and can get cluttered fast.
Modifier areas ( #623 ) are a similar solution, but they do not work with inheritance.
This proposal tries to start a discussion about how modifier areas could work better with inheritance. The drawback of this proposal is that it provides less choice about which functions to apply.
using modifier for *;
This applies the given modifier to all functions in this contract, including inherited functions and all functions in potential derived contracts.
It might make sense to restrict this to functions that are non-view functions.
Potential syntax: `using modifier for payable, non-payable;`