Comments (NATSPEC)
Tags
All tags are optional. The following table explains the purpose of each NatSpec tag and where it may be used. As a special case, if no tags are used then the Solidity compiler will interpret a ///
or /**
comment in the same way as if it were tagged with @notice
.
Tag | Description | Context |
---|---|---|
| A title that should describe the contract/interface | contract, library, interface |
| The name of the author | contract, library, interface |
| Explain to an end user what this does | contract, library, interface, function, public state variable, event |
| Explain to a developer any extra details | contract, library, interface, function, state variable, event |
| Documents a parameter just like in Doxygen (must be followed by parameter name) | function, event |
| Documents the return variables of a contractβs function | function, public state variable |
| Copies all missing tags from the base function (must be followed by the contract name) | function, public state variable |
| Custom tag, semantics is application-defined | everywhere |
Last updated