From 07020e954475a4fdd36e0252e88717b60f790b71 Mon Sep 17 00:00:00 2001 From: Arun Kumar Date: Thu, 14 Jun 2018 17:19:59 -0500 Subject: [PATCH] Remove redundant @dev tags (#995) * Remove redundant @dev tags * Remove redundant @notice tags --- contracts/AddressUtils.sol | 2 +- contracts/ECRecovery.sol | 5 +- contracts/LimitBalance.sol | 4 +- contracts/MerkleProof.sol | 4 +- contracts/access/SignatureBouncer.sol | 41 +++++++------- contracts/access/Whitelist.sol | 2 +- contracts/examples/RBACWithAdmin.sol | 15 +++-- contracts/introspection/ERC165.sol | 2 +- .../SupportsInterfaceWithLookup.sol | 2 +- contracts/ownership/HasNoEther.sol | 2 +- contracts/ownership/Superuser.sol | 6 +- contracts/ownership/rbac/RBAC.sol | 8 +-- contracts/ownership/rbac/Roles.sol | 2 +- contracts/token/ERC20/ERC20Basic.sol | 2 +- contracts/token/ERC20/MintableToken.sol | 1 - contracts/token/ERC20/StandardToken.sol | 7 +-- contracts/token/ERC721/DeprecatedERC721.sol | 2 +- contracts/token/ERC721/ERC721BasicToken.sol | 41 +++++++------- contracts/token/ERC721/ERC721Receiver.sol | 10 ++-- contracts/token/ERC721/ERC721Token.sol | 10 ++-- contracts/token/ERC827/ERC827.sol | 4 +- contracts/token/ERC827/ERC827Token.sol | 55 +++++++------------ 22 files changed, 102 insertions(+), 125 deletions(-) diff --git a/contracts/AddressUtils.sol b/contracts/AddressUtils.sol index 00dc070a1..d93072389 100644 --- a/contracts/AddressUtils.sol +++ b/contracts/AddressUtils.sol @@ -9,7 +9,7 @@ library AddressUtils { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, - * as the code is not actually created until after the constructor finishes. + * as the code is not actually created until after the constructor finishes. * @param addr address to check * @return whether the target address is a contract */ diff --git a/contracts/ECRecovery.sol b/contracts/ECRecovery.sol index 4e6e25b28..ff8841a00 100644 --- a/contracts/ECRecovery.sol +++ b/contracts/ECRecovery.sol @@ -3,12 +3,9 @@ pragma solidity ^0.4.24; /** * @title Eliptic curve signature operations - * * @dev Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d - * * TODO Remove this library once solidity supports passing a signature to ecrecover. * See https://github.com/ethereum/solidity/issues/864 - * */ library ECRecovery { @@ -59,7 +56,7 @@ library ECRecovery { /** * toEthSignedMessageHash * @dev prefix a bytes32 value with "\x19Ethereum Signed Message:" - * @dev and hash the result + * and hash the result */ function toEthSignedMessageHash(bytes32 hash) internal diff --git a/contracts/LimitBalance.sol b/contracts/LimitBalance.sol index d22cb7afa..c3d495a3c 100644 --- a/contracts/LimitBalance.sol +++ b/contracts/LimitBalance.sol @@ -4,8 +4,8 @@ pragma solidity ^0.4.24; /** * @title LimitBalance * @dev Simple contract to limit the balance of child contract. - * @dev Note this doesn't prevent other contracts to send funds by using selfdestruct(address); - * @dev See: https://github.com/ConsenSys/smart-contract-best-practices#remember-that-ether-can-be-forcibly-sent-to-an-account + * Note this doesn't prevent other contracts to send funds by using selfdestruct(address); + * See: https://github.com/ConsenSys/smart-contract-best-practices#remember-that-ether-can-be-forcibly-sent-to-an-account */ contract LimitBalance { diff --git a/contracts/MerkleProof.sol b/contracts/MerkleProof.sol index 09d0bd0e4..8c902bcc5 100644 --- a/contracts/MerkleProof.sol +++ b/contracts/MerkleProof.sol @@ -3,8 +3,8 @@ pragma solidity ^0.4.24; /* * @title MerkleProof - * @dev Merkle proof verification - * @note Based on https://github.com/ameensol/merkle-tree-solidity/blob/master/src/MerkleProof.sol + * @dev Merkle proof verification based on + * https://github.com/ameensol/merkle-tree-solidity/blob/master/src/MerkleProof.sol */ library MerkleProof { /* diff --git a/contracts/access/SignatureBouncer.sol b/contracts/access/SignatureBouncer.sol index 78f717d06..1fae399e8 100644 --- a/contracts/access/SignatureBouncer.sol +++ b/contracts/access/SignatureBouncer.sol @@ -9,28 +9,25 @@ import "../ECRecovery.sol"; * @title SignatureBouncer * @author PhABC, Shrugs and aflesher * @dev Bouncer allows users to submit a signature as a permission to do an action. - * @dev If the signature is from one of the authorized bouncer addresses, the signature - * @dev is valid. The owner of the contract adds/removes bouncers. - * @dev Bouncer addresses can be individual servers signing grants or different - * @dev users within a decentralized club that have permission to invite other members. - * @dev - * @dev This technique is useful for whitelists and airdrops; instead of putting all - * @dev valid addresses on-chain, simply sign a grant of the form - * @dev keccak256(abi.encodePacked(`:contractAddress` + `:granteeAddress`)) using a valid bouncer address. - * @dev Then restrict access to your crowdsale/whitelist/airdrop using the - * @dev `onlyValidSignature` modifier (or implement your own using isValidSignature). - * @dev - * @dev In addition to `onlyValidSignature`, `onlyValidSignatureAndMethod` and - * @dev `onlyValidSignatureAndData` can be used to restrict access to only a given method - * @dev or a given method with given parameters respectively. - * @dev - * @dev See the tests Bouncer.test.js for specific usage examples. + * If the signature is from one of the authorized bouncer addresses, the signature + * is valid. The owner of the contract adds/removes bouncers. + * Bouncer addresses can be individual servers signing grants or different + * users within a decentralized club that have permission to invite other members. + * This technique is useful for whitelists and airdrops; instead of putting all + * valid addresses on-chain, simply sign a grant of the form + * keccak256(abi.encodePacked(`:contractAddress` + `:granteeAddress`)) using a valid bouncer address. + * Then restrict access to your crowdsale/whitelist/airdrop using the + * `onlyValidSignature` modifier (or implement your own using isValidSignature). + * In addition to `onlyValidSignature`, `onlyValidSignatureAndMethod` and + * `onlyValidSignatureAndData` can be used to restrict access to only a given method + * or a given method with given parameters respectively. + * See the tests Bouncer.test.js for specific usage examples. * @notice A method that uses the `onlyValidSignatureAndData` modifier must make the _sig - * @notice parameter the "last" parameter. You cannot sign a message that has its own - * @notice signature in it so the last 128 bytes of msg.data (which represents the - * @notice length of the _sig data and the _sig data itself) is ignored when validating. - * @notice Also non fixed sized parameters make constructing the data in the signature - * @notice much more complex. See https://ethereum.stackexchange.com/a/50616 for more details. + * parameter the "last" parameter. You cannot sign a message that has its own + * signature in it so the last 128 bytes of msg.data (which represents the + * length of the _sig data and the _sig data itself) is ignored when validating. + * Also non fixed sized parameters make constructing the data in the signature + * much more complex. See https://ethereum.stackexchange.com/a/50616 for more details. */ contract SignatureBouncer is Ownable, RBAC { using ECRecovery for bytes32; @@ -146,7 +143,7 @@ contract SignatureBouncer is Ownable, RBAC { /** * @dev internal function to convert a hash to an eth signed message - * @dev and then recover the signature and check it against the bouncer role + * and then recover the signature and check it against the bouncer role * @return bool */ function isValidDataHash(bytes32 hash, bytes _sig) diff --git a/contracts/access/Whitelist.sol b/contracts/access/Whitelist.sol index 78fa8964c..312d5f075 100644 --- a/contracts/access/Whitelist.sol +++ b/contracts/access/Whitelist.sol @@ -8,7 +8,7 @@ import "../ownership/rbac/RBAC.sol"; /** * @title Whitelist * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions. - * @dev This simplifies the implementation of "user permissions". + * This simplifies the implementation of "user permissions". */ contract Whitelist is Ownable, RBAC { event WhitelistedAddressAdded(address addr); diff --git a/contracts/examples/RBACWithAdmin.sol b/contracts/examples/RBACWithAdmin.sol index 1e44e315f..af76bf8f7 100644 --- a/contracts/examples/RBACWithAdmin.sol +++ b/contracts/examples/RBACWithAdmin.sol @@ -7,14 +7,13 @@ import "../ownership/rbac/RBAC.sol"; * @title RBACWithAdmin * @author Matt Condon (@Shrugs) * @dev It's recommended that you define constants in the contract, - * @dev like ROLE_ADMIN below, to avoid typos. - * @dev - * @dev NOTE: RBACWithAdmin is probably too expansive and powerful for your - * @dev application; an admin is actually able to change any address to any role - * @dev which is a very large API surface. It's recommended that you follow a strategy - * @dev of strictly defining the abilities of your roles - * @dev and the API-surface of your contract. - * @dev This is just an example for example's sake. + * like ROLE_ADMIN below, to avoid typos. + * @notice RBACWithAdmin is probably too expansive and powerful for your + * application; an admin is actually able to change any address to any role + * which is a very large API surface. It's recommended that you follow a strategy + * of strictly defining the abilities of your roles + * and the API-surface of your contract. + * This is just an example for example's sake. */ contract RBACWithAdmin is RBAC { /** diff --git a/contracts/introspection/ERC165.sol b/contracts/introspection/ERC165.sol index 4d5cd0dc3..06f20a074 100644 --- a/contracts/introspection/ERC165.sol +++ b/contracts/introspection/ERC165.sol @@ -11,7 +11,7 @@ interface ERC165 { * @notice Query if a contract implements an interface * @param _interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function - * @dev uses less than 30,000 gas. + * uses less than 30,000 gas. */ function supportsInterface(bytes4 _interfaceId) external diff --git a/contracts/introspection/SupportsInterfaceWithLookup.sol b/contracts/introspection/SupportsInterfaceWithLookup.sol index 4f38a775e..96132932e 100644 --- a/contracts/introspection/SupportsInterfaceWithLookup.sol +++ b/contracts/introspection/SupportsInterfaceWithLookup.sol @@ -22,7 +22,7 @@ contract SupportsInterfaceWithLookup is ERC165 { /** * @dev A contract implementing SupportsInterfaceWithLookup - * @dev implement ERC165 itself + * implement ERC165 itself */ constructor() public diff --git a/contracts/ownership/HasNoEther.sol b/contracts/ownership/HasNoEther.sol index 0e301a6e5..cc0453a16 100644 --- a/contracts/ownership/HasNoEther.sol +++ b/contracts/ownership/HasNoEther.sol @@ -17,7 +17,7 @@ contract HasNoEther is Ownable { /** * @dev Constructor that rejects incoming Ether - * @dev The `payable` flag is added so we can access `msg.value` without compiler warning. If we + * The `payable` flag is added so we can access `msg.value` without compiler warning. If we * leave out payable, then Solidity will allow inheriting contracts to implement a payable * constructor. By doing it this way we prevent a payable constructor from working. Alternatively * we could use assembly to access msg.value. diff --git a/contracts/ownership/Superuser.sol b/contracts/ownership/Superuser.sol index 9f981136a..abfef4069 100644 --- a/contracts/ownership/Superuser.sol +++ b/contracts/ownership/Superuser.sol @@ -7,9 +7,9 @@ import "./rbac/RBAC.sol"; /** * @title Superuser - * @dev The Superuser contract defines a single superuser who can transfer the ownership - * @dev of a contract to a new address, even if he is not the owner. - * @dev A superuser can transfer his role to a new address. + * @dev The Superuser contract defines a single superuser who can transfer the ownership + * of a contract to a new address, even if he is not the owner. + * A superuser can transfer his role to a new address. */ contract Superuser is Ownable, RBAC { string public constant ROLE_SUPERUSER = "superuser"; diff --git a/contracts/ownership/rbac/RBAC.sol b/contracts/ownership/rbac/RBAC.sol index e8d671274..b749d1faa 100644 --- a/contracts/ownership/rbac/RBAC.sol +++ b/contracts/ownership/rbac/RBAC.sol @@ -7,12 +7,12 @@ import "./Roles.sol"; * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. - * @dev Supports unlimited numbers of roles and addresses. - * @dev See //contracts/mocks/RBACMock.sol for an example of usage. + * Supports unlimited numbers of roles and addresses. + * See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings to key roles. It may be beneficial - * for you to write your own implementation of this interface using Enums or similar. + * for you to write your own implementation of this interface using Enums or similar. * It's also recommended that you define constants in the contract, like ROLE_ADMIN below, - * to avoid typos. + * to avoid typos. */ contract RBAC { using Roles for Roles.Role; diff --git a/contracts/ownership/rbac/Roles.sol b/contracts/ownership/rbac/Roles.sol index 55b3f85ad..d8e1eebe7 100644 --- a/contracts/ownership/rbac/Roles.sol +++ b/contracts/ownership/rbac/Roles.sol @@ -5,7 +5,7 @@ pragma solidity ^0.4.24; * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. - * See RBAC.sol for example usage. + * See RBAC.sol for example usage. */ library Roles { struct Role { diff --git a/contracts/token/ERC20/ERC20Basic.sol b/contracts/token/ERC20/ERC20Basic.sol index 5bdc14ce6..9504a9038 100644 --- a/contracts/token/ERC20/ERC20Basic.sol +++ b/contracts/token/ERC20/ERC20Basic.sol @@ -4,7 +4,7 @@ pragma solidity ^0.4.24; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface - * @dev see https://github.com/ethereum/EIPs/issues/179 + * See https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); diff --git a/contracts/token/ERC20/MintableToken.sol b/contracts/token/ERC20/MintableToken.sol index 3a3b2ec05..6ceaca252 100644 --- a/contracts/token/ERC20/MintableToken.sol +++ b/contracts/token/ERC20/MintableToken.sol @@ -7,7 +7,6 @@ import "../../ownership/Ownable.sol"; /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation - * @dev Issue: * https://github.com/OpenZeppelin/openzeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken, Ownable { diff --git a/contracts/token/ERC20/StandardToken.sol b/contracts/token/ERC20/StandardToken.sol index 5c21deaa8..7c236130d 100644 --- a/contracts/token/ERC20/StandardToken.sol +++ b/contracts/token/ERC20/StandardToken.sol @@ -8,8 +8,8 @@ import "./ERC20.sol"; * @title Standard ERC20 token * * @dev Implementation of the basic standard token. - * @dev https://github.com/ethereum/EIPs/issues/20 - * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol + * https://github.com/ethereum/EIPs/issues/20 + * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { @@ -43,7 +43,6 @@ contract StandardToken is ERC20, BasicToken { /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. - * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: @@ -76,7 +75,6 @@ contract StandardToken is ERC20, BasicToken { /** * @dev Increase the amount of tokens that an owner allowed to a spender. - * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) @@ -99,7 +97,6 @@ contract StandardToken is ERC20, BasicToken { /** * @dev Decrease the amount of tokens that an owner allowed to a spender. - * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) diff --git a/contracts/token/ERC721/DeprecatedERC721.sol b/contracts/token/ERC721/DeprecatedERC721.sol index 68a2476d1..3cf1f3b2d 100644 --- a/contracts/token/ERC721/DeprecatedERC721.sol +++ b/contracts/token/ERC721/DeprecatedERC721.sol @@ -6,7 +6,7 @@ import "./ERC721.sol"; /** * @title ERC-721 methods shipped in OpenZeppelin v1.7.0, removed in the latest version of the standard * @dev Only use this interface for compatibility with previously deployed contracts - * @dev Use ERC721 for interacting with new contracts which are standard-compliant + * Use ERC721 for interacting with new contracts which are standard-compliant */ contract DeprecatedERC721 is ERC721 { function takeOwnership(uint256 _tokenId) public; diff --git a/contracts/token/ERC721/ERC721BasicToken.sol b/contracts/token/ERC721/ERC721BasicToken.sol index c2bbfe298..7890a9ee1 100644 --- a/contracts/token/ERC721/ERC721BasicToken.sol +++ b/contracts/token/ERC721/ERC721BasicToken.sol @@ -111,9 +111,9 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { /** * @dev Approves another address to transfer the given token ID - * @dev The zero address indicates there is no approved address. - * @dev There can only be one approved address per token at a given time. - * @dev Can only be called by the token owner or an approved operator. + * The zero address indicates there is no approved address. + * There can only be one approved address per token at a given time. + * Can only be called by the token owner or an approved operator. * @param _to address to be approved for the given token ID * @param _tokenId uint256 ID of the token to be approved */ @@ -137,7 +137,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { /** * @dev Sets or unsets the approval of a given operator - * @dev An operator is allowed to transfer all tokens of the sender on their behalf + * An operator is allowed to transfer all tokens of the sender on their behalf * @param _to operator address to set the approval * @param _approved representing the status of the approval to be set */ @@ -166,8 +166,8 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { /** * @dev Transfers the ownership of a given token ID to another address - * @dev Usage of this method is discouraged, use `safeTransferFrom` whenever possible - * @dev Requires the msg sender to be the owner, approved, or operator + * Usage of this method is discouraged, use `safeTransferFrom` whenever possible + * Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the ownership of the given token ID * @param _tokenId uint256 ID of the token to be transferred @@ -192,11 +192,12 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { /** * @dev Safely transfers the ownership of a given token ID to another address - * @dev If the target address is a contract, it must implement `onERC721Received`, - * which is called upon a safe transfer, and return the magic value - * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, - * the transfer is reverted. - * @dev Requires the msg sender to be the owner, approved, or operator + * If the target address is a contract, it must implement `onERC721Received`, + * which is called upon a safe transfer, and return the magic value + * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, + * the transfer is reverted. + * + * Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the ownership of the given token ID * @param _tokenId uint256 ID of the token to be transferred @@ -215,11 +216,11 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { /** * @dev Safely transfers the ownership of a given token ID to another address - * @dev If the target address is a contract, it must implement `onERC721Received`, - * which is called upon a safe transfer, and return the magic value - * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, - * the transfer is reverted. - * @dev Requires the msg sender to be the owner, approved, or operator + * If the target address is a contract, it must implement `onERC721Received`, + * which is called upon a safe transfer, and return the magic value + * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, + * the transfer is reverted. + * Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the ownership of the given token ID * @param _tokenId uint256 ID of the token to be transferred @@ -267,7 +268,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { /** * @dev Internal function to mint a new token - * @dev Reverts if the given token ID already exists + * Reverts if the given token ID already exists * @param _to The address that will own the minted token * @param _tokenId uint256 ID of the token to be minted by the msg.sender */ @@ -279,7 +280,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { /** * @dev Internal function to burn a specific token - * @dev Reverts if the token does not exist + * Reverts if the token does not exist * @param _tokenId uint256 ID of the token being burned by the msg.sender */ function _burn(address _owner, uint256 _tokenId) internal { @@ -290,7 +291,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { /** * @dev Internal function to clear current approval of a given token ID - * @dev Reverts if the given address is not indeed the owner of the token + * Reverts if the given address is not indeed the owner of the token * @param _owner owner of the token * @param _tokenId uint256 ID of the token to be transferred */ @@ -326,7 +327,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { /** * @dev Internal function to invoke `onERC721Received` on a target address - * @dev The call is not executed if the target address is not a contract + * The call is not executed if the target address is not a contract * @param _from address representing the previous owner of the given token ID * @param _to target address that will receive the tokens * @param _tokenId uint256 ID of the token to be transferred diff --git a/contracts/token/ERC721/ERC721Receiver.sol b/contracts/token/ERC721/ERC721Receiver.sol index 84e05e9f0..fa67a988c 100644 --- a/contracts/token/ERC721/ERC721Receiver.sol +++ b/contracts/token/ERC721/ERC721Receiver.sol @@ -4,7 +4,7 @@ pragma solidity ^0.4.24; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers - * from ERC721 asset contracts. + * from ERC721 asset contracts. */ contract ERC721Receiver { /** @@ -17,10 +17,10 @@ contract ERC721Receiver { /** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient - * after a `safetransfer`. This function MAY throw to revert and reject the - * transfer. This function MUST use 50,000 gas or less. Return of other - * than the magic value MUST result in the transaction being reverted. - * Note: the contract address is always the message sender. + * after a `safetransfer`. This function MAY throw to revert and reject the + * transfer. This function MUST use 50,000 gas or less. Return of other + * than the magic value MUST result in the transaction being reverted. + * Note: the contract address is always the message sender. * @param _from The sending address * @param _tokenId The NFT identifier which is being transfered * @param _data Additional data with no specified format diff --git a/contracts/token/ERC721/ERC721Token.sol b/contracts/token/ERC721/ERC721Token.sol index 0b28e0c45..4cc0edf3a 100644 --- a/contracts/token/ERC721/ERC721Token.sol +++ b/contracts/token/ERC721/ERC721Token.sol @@ -80,7 +80,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { /** * @dev Returns an URI for a given token ID - * @dev Throws if the token ID does not exist. May return an empty string. + * Throws if the token ID does not exist. May return an empty string. * @param _tokenId uint256 ID of the token to query */ function tokenURI(uint256 _tokenId) public view returns (string) { @@ -116,7 +116,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { /** * @dev Gets the token ID at a given index of all the tokens in this contract - * @dev Reverts if the index is greater or equal to the total number of tokens + * Reverts if the index is greater or equal to the total number of tokens * @param _index uint256 representing the index to be accessed of the tokens list * @return uint256 token ID at the given index of the tokens list */ @@ -127,7 +127,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { /** * @dev Internal function to set the token URI for a given token - * @dev Reverts if the token ID does not exist + * Reverts if the token ID does not exist * @param _tokenId uint256 ID of the token to set its URI * @param _uri string URI to assign */ @@ -173,7 +173,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { /** * @dev Internal function to mint a new token - * @dev Reverts if the given token ID already exists + * Reverts if the given token ID already exists * @param _to address the beneficiary that will own the minted token * @param _tokenId uint256 ID of the token to be minted by the msg.sender */ @@ -186,7 +186,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { /** * @dev Internal function to burn a specific token - * @dev Reverts if the token does not exist + * Reverts if the token does not exist * @param _owner owner of the token to burn * @param _tokenId uint256 ID of the token being burned by the msg.sender */ diff --git a/contracts/token/ERC827/ERC827.sol b/contracts/token/ERC827/ERC827.sol index 54aea98ac..a283e2aa6 100644 --- a/contracts/token/ERC827/ERC827.sol +++ b/contracts/token/ERC827/ERC827.sol @@ -8,8 +8,8 @@ import "../ERC20/ERC20.sol"; * @title ERC827 interface, an extension of ERC20 token standard * * @dev Interface of a ERC827 token, following the ERC20 standard with extra - * @dev methods to transfer value and data and execute calls in transfers and - * @dev approvals. + * methods to transfer value and data and execute calls in transfers and + * approvals. */ contract ERC827 is ERC20 { function approveAndCall( diff --git a/contracts/token/ERC827/ERC827Token.sol b/contracts/token/ERC827/ERC827Token.sol index 6fec245a8..e5544b86c 100644 --- a/contracts/token/ERC827/ERC827Token.sol +++ b/contracts/token/ERC827/ERC827Token.sol @@ -10,28 +10,23 @@ import "../ERC20/StandardToken.sol"; * @title ERC827, an extension of ERC20 token standard * * @dev Implementation the ERC827, following the ERC20 standard with extra - * @dev methods to transfer value and data and execute calls in transfers and - * @dev approvals. - * - * @dev Uses OpenZeppelin StandardToken. + * methods to transfer value and data and execute calls in transfers and + * approvals. Uses OpenZeppelin StandardToken. */ contract ERC827Token is ERC827, StandardToken { /** * @dev Addition to ERC20 token methods. It allows to - * @dev approve the transfer of value and execute a call with the sent data. - * - * @dev Beware that changing an allowance with this method brings the risk that - * @dev someone may use both the old and the new allowance by unfortunate - * @dev transaction ordering. One possible solution to mitigate this race condition - * @dev is to first reduce the spender's allowance to 0 and set the desired value - * @dev afterwards: - * @dev https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - * + * approve the transfer of value and execute a call with the sent data. + * Beware that changing an allowance with this method brings the risk that + * someone may use both the old and the new allowance by unfortunate + * transaction ordering. One possible solution to mitigate this race condition + * is to first reduce the spender's allowance to 0 and set the desired value + * afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address that will spend the funds. * @param _value The amount of tokens to be spent. * @param _data ABI-encoded contract call to call `_to` address. - * * @return true if the call function was executed successfully */ function approveAndCall( @@ -55,12 +50,10 @@ contract ERC827Token is ERC827, StandardToken { /** * @dev Addition to ERC20 token methods. Transfer tokens to a specified - * @dev address and execute a call with the sent data on the same transaction - * + * address and execute a call with the sent data on the same transaction * @param _to address The address which you want to transfer to * @param _value uint256 the amout of tokens to be transfered * @param _data ABI-encoded contract call to call `_to` address. - * * @return true if the call function was executed successfully */ function transferAndCall( @@ -83,13 +76,11 @@ contract ERC827Token is ERC827, StandardToken { /** * @dev Addition to ERC20 token methods. Transfer tokens from one address to - * @dev another and make a contract call on the same transaction - * + * another and make a contract call on the same transaction * @param _from The address which you want to send tokens from * @param _to The address which you want to transfer to * @param _value The amout of tokens to be transferred * @param _data ABI-encoded contract call to call `_to` address. - * * @return true if the call function was executed successfully */ function transferFromAndCall( @@ -111,13 +102,11 @@ contract ERC827Token is ERC827, StandardToken { /** * @dev Addition to StandardToken methods. Increase the amount of tokens that - * @dev an owner allowed to a spender and execute a call with the sent data. - * - * @dev approve should be called when allowed[_spender] == 0. To increment - * @dev allowed value is better to use this function to avoid 2 calls (and wait until - * @dev the first transaction is mined) - * @dev From MonolithDAO Token.sol - * + * an owner allowed to a spender and execute a call with the sent data. + * approve should be called when allowed[_spender] == 0. To increment + * allowed value is better to use this function to avoid 2 calls (and wait until + * the first transaction is mined) + * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. * @param _data ABI-encoded contract call to call `_spender` address. @@ -143,13 +132,11 @@ contract ERC827Token is ERC827, StandardToken { /** * @dev Addition to StandardToken methods. Decrease the amount of tokens that - * @dev an owner allowed to a spender and execute a call with the sent data. - * - * @dev approve should be called when allowed[_spender] == 0. To decrement - * @dev allowed value is better to use this function to avoid 2 calls (and wait until - * @dev the first transaction is mined) - * @dev From MonolithDAO Token.sol - * + * an owner allowed to a spender and execute a call with the sent data. + * approve should be called when allowed[_spender] == 0. To decrement + * allowed value is better to use this function to avoid 2 calls (and wait until + * the first transaction is mined) + * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. * @param _data ABI-encoded contract call to call `_spender` address.