mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'origin/develop' into HEAD
This commit is contained in:
@@ -255,9 +255,9 @@ which only need to be created if there is a dispute.
|
||||
|
||||
contract C {
|
||||
function createDSalted(bytes32 salt, uint arg) public {
|
||||
/// This complicated expression just tells you how the address
|
||||
/// can be pre-computed. It is just there for illustration.
|
||||
/// You actually only need ``new D{salt: salt}(arg)``.
|
||||
// This complicated expression just tells you how the address
|
||||
// can be pre-computed. It is just there for illustration.
|
||||
// You actually only need ``new D{salt: salt}(arg)``.
|
||||
address predictedAddress = address(uint(keccak256(abi.encodePacked(
|
||||
byte(0xff),
|
||||
address(this),
|
||||
|
||||
@@ -28,6 +28,9 @@ Documentation Example
|
||||
Documentation is inserted above each ``class``, ``interface`` and
|
||||
``function`` using the doxygen notation format.
|
||||
|
||||
Note: a ``public`` state variable is equivalent to a ``function``
|
||||
for the purposes of NatSpec.
|
||||
|
||||
- For Solidity you may choose ``///`` for single or multi-line
|
||||
comments, or ``/**`` and ending with ``*/``.
|
||||
|
||||
@@ -82,10 +85,10 @@ Tag
|
||||
=========== =============================================================================== =============================
|
||||
``@title`` A title that should describe the contract/interface contract, interface
|
||||
``@author`` The name of the author contract, interface, function
|
||||
``@notice`` Explain to an end user what this does contract, interface, function
|
||||
``@dev`` Explain to a developer any extra details contract, interface, function
|
||||
``@notice`` Explain to an end user what this does contract, interface, function, public state variable
|
||||
``@dev`` Explain to a developer any extra details contract, interface, function, state variable
|
||||
``@param`` Documents a parameter just like in doxygen (must be followed by parameter name) function
|
||||
``@return`` Documents the return variables of a contract's function function
|
||||
``@return`` Documents the return variables of a contract's function function, public state variable
|
||||
=========== =============================================================================== =============================
|
||||
|
||||
If your function returns multiple values, like ``(int quotient, int remainder)``
|
||||
|
||||
@@ -63,7 +63,7 @@ complete contract):
|
||||
|
||||
// THIS CONTRACT CONTAINS A BUG - DO NOT USE
|
||||
contract Fund {
|
||||
/// Mapping of ether shares of the contract.
|
||||
/// @dev Mapping of ether shares of the contract.
|
||||
mapping(address => uint) shares;
|
||||
/// Withdraw your share.
|
||||
function withdraw() public {
|
||||
@@ -87,7 +87,7 @@ as it uses ``call`` which forwards all remaining gas by default:
|
||||
|
||||
// THIS CONTRACT CONTAINS A BUG - DO NOT USE
|
||||
contract Fund {
|
||||
/// Mapping of ether shares of the contract.
|
||||
/// @dev Mapping of ether shares of the contract.
|
||||
mapping(address => uint) shares;
|
||||
/// Withdraw your share.
|
||||
function withdraw() public {
|
||||
@@ -106,7 +106,7 @@ outlined further below:
|
||||
pragma solidity >=0.4.11 <0.8.0;
|
||||
|
||||
contract Fund {
|
||||
/// Mapping of ether shares of the contract.
|
||||
/// @dev Mapping of ether shares of the contract.
|
||||
mapping(address => uint) shares;
|
||||
/// Withdraw your share.
|
||||
function withdraw() public {
|
||||
|
||||
@@ -415,7 +415,7 @@ Array slices are useful to ABI-decode secondary data passed in function paramete
|
||||
pragma solidity >=0.6.0 <0.8.0;
|
||||
|
||||
contract Proxy {
|
||||
/// Address of the client contract managed by proxy i.e., this contract
|
||||
/// @dev Address of the client contract managed by proxy i.e., this contract
|
||||
address client;
|
||||
|
||||
constructor(address _client) public {
|
||||
|
||||
Reference in New Issue
Block a user