mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add NatSpec documentation.
This commit is contained in:
committed by
chriseth
parent
4312f6ec23
commit
916e151f46
+2
-23
@@ -1088,8 +1088,6 @@ Avoiding Naming Collisions
|
||||
This convention is suggested when the desired name collides with that of a
|
||||
built-in or otherwise reserved name.
|
||||
|
||||
.. _natspec:
|
||||
|
||||
*******
|
||||
NatSpec
|
||||
*******
|
||||
@@ -1126,25 +1124,6 @@ added looks like the one below::
|
||||
}
|
||||
}
|
||||
|
||||
Natspec uses doxygen style tags with some special meaning.
|
||||
If no tag is used, then the comment applies to ``@notice``.
|
||||
The ``@notice`` tag is the main NatSpec tag and its audience is
|
||||
users of the contract who have never seen the source code, so it should make
|
||||
as little assumptions about the inner details as possible.
|
||||
All tags are optional.
|
||||
It is recommended that Solidity contracts are fully annontated using `NatSpec <natspec>`_ for all public interfaces (everything in the ABI).
|
||||
|
||||
+-------------+-------------------------------------------+-------------------------------+
|
||||
| Tag | Description | Context |
|
||||
+=============+===========================================+===============================+
|
||||
| ``@title`` | A title that describes the contract | contract, interface |
|
||||
+-------------+-------------------------------------------+-------------------------------+
|
||||
| ``@author`` | The name of the author | contract, interface, function |
|
||||
+-------------+-------------------------------------------+-------------------------------+
|
||||
| ``@notice`` | Explanation of functionality | contract, interface, function |
|
||||
+-------------+-------------------------------------------+-------------------------------+
|
||||
| ``@dev`` | Any extra details | contract, interface, function |
|
||||
+-------------+-------------------------------------------+-------------------------------+
|
||||
| ``@param`` | Parameter type followed by parameter name | function |
|
||||
+-------------+-------------------------------------------+-------------------------------+
|
||||
| ``@return`` | The return value of a contract's function | function |
|
||||
+-------------+-------------------------------------------+-------------------------------+
|
||||
Please see the sectian about `NatSpec <natspec>`_ for a detailed explanation.
|
||||
Reference in New Issue
Block a user