mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adds @custom:.... natspec example to the natspec-format documentation.
Co-authored-by: Harikrishnan Mulackal <webmail.hari@gmail.com>
This commit is contained in:
parent
4080748b1d
commit
10ec49ddb9
@ -60,12 +60,13 @@ The following example shows a contract and a function using all available tags.
|
|||||||
.. code:: Solidity
|
.. code:: Solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >=0.6.12 <0.9.0;
|
pragma solidity >=0.8.2 < 0.9.0;
|
||||||
|
|
||||||
/// @title A simulator for trees
|
/// @title A simulator for trees
|
||||||
/// @author Larry A. Gardner
|
/// @author Larry A. Gardner
|
||||||
/// @notice You can use this contract for only the most basic simulation
|
/// @notice You can use this contract for only the most basic simulation
|
||||||
/// @dev All function calls are currently implemented without side effects
|
/// @dev All function calls are currently implemented without side effects
|
||||||
|
/// @custom:experimental This is an experimental contract.
|
||||||
contract Tree {
|
contract Tree {
|
||||||
/// @notice Calculate tree age in years, rounded up, for live trees
|
/// @notice Calculate tree age in years, rounded up, for live trees
|
||||||
/// @dev The Alexandr N. Tetearing algorithm could increase precision
|
/// @dev The Alexandr N. Tetearing algorithm could increase precision
|
||||||
@ -236,6 +237,7 @@ file should also be produced and should look like this:
|
|||||||
"kind" : "dev",
|
"kind" : "dev",
|
||||||
"author" : "Larry A. Gardner",
|
"author" : "Larry A. Gardner",
|
||||||
"details" : "All function calls are currently implemented without side effects",
|
"details" : "All function calls are currently implemented without side effects",
|
||||||
|
"custom:experimental": "This is an experimental contract.",
|
||||||
"methods" :
|
"methods" :
|
||||||
{
|
{
|
||||||
"age(uint256)" :
|
"age(uint256)" :
|
||||||
|
Loading…
Reference in New Issue
Block a user