Closed popelev closed 2 years ago
This is possible. I think I'd prefer the modifiers to the right of the function definition so they don't get confused with other stereotypes like event, abstract, fallback and payable. There can also be multiple modifiers so it'd need to be comma separated. And modifiers can have parameters so those would ideally be included. The parameter values would not need to be displayed as those are already shown with the function's parameters.
<<modifier>> modifierOne(someValue : uint256)
<<modifier>> modifierTwo(someValue : uint256)
foo(value : uint256) <<modifierOne(value), modifierTwo(value)>>
or just show modifiers without parameters
foo(value : uint256) <<modifierOne, modifierTwo>>
I've added in Release v2.2.0
I went with just listing the modifiers without the params.
The modifiers will be displayed by default. They can be hidden with the existing -hm, --hideModifiers
option
for example add option -hum (hide used modifiers. default true)
Public:
<<modifier>> onlyOwner()
<<onlyOwner>> withdraw()
<<onlyOwner>> transferOwnership(newOwner : address)