Commit 07020e95 by Arun Kumar Committed by Matt Condon

Remove redundant @dev tags (#995)

* Remove redundant @dev tags

* Remove redundant @notice tags
parent b4406d38
...@@ -3,12 +3,9 @@ pragma solidity ^0.4.24; ...@@ -3,12 +3,9 @@ pragma solidity ^0.4.24;
/** /**
* @title Eliptic curve signature operations * @title Eliptic curve signature operations
*
* @dev Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d * @dev Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d
*
* TODO Remove this library once solidity supports passing a signature to ecrecover. * TODO Remove this library once solidity supports passing a signature to ecrecover.
* See https://github.com/ethereum/solidity/issues/864 * See https://github.com/ethereum/solidity/issues/864
*
*/ */
library ECRecovery { library ECRecovery {
...@@ -59,7 +56,7 @@ library ECRecovery { ...@@ -59,7 +56,7 @@ library ECRecovery {
/** /**
* toEthSignedMessageHash * toEthSignedMessageHash
* @dev prefix a bytes32 value with "\x19Ethereum Signed Message:" * @dev prefix a bytes32 value with "\x19Ethereum Signed Message:"
* @dev and hash the result * and hash the result
*/ */
function toEthSignedMessageHash(bytes32 hash) function toEthSignedMessageHash(bytes32 hash)
internal internal
......
...@@ -4,8 +4,8 @@ pragma solidity ^0.4.24; ...@@ -4,8 +4,8 @@ pragma solidity ^0.4.24;
/** /**
* @title LimitBalance * @title LimitBalance
* @dev Simple contract to limit the balance of child contract. * @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); * 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 * See: https://github.com/ConsenSys/smart-contract-best-practices#remember-that-ether-can-be-forcibly-sent-to-an-account
*/ */
contract LimitBalance { contract LimitBalance {
......
...@@ -3,8 +3,8 @@ pragma solidity ^0.4.24; ...@@ -3,8 +3,8 @@ pragma solidity ^0.4.24;
/* /*
* @title MerkleProof * @title MerkleProof
* @dev Merkle proof verification * @dev Merkle proof verification based on
* @note Based on https://github.com/ameensol/merkle-tree-solidity/blob/master/src/MerkleProof.sol * https://github.com/ameensol/merkle-tree-solidity/blob/master/src/MerkleProof.sol
*/ */
library MerkleProof { library MerkleProof {
/* /*
......
...@@ -9,28 +9,25 @@ import "../ECRecovery.sol"; ...@@ -9,28 +9,25 @@ import "../ECRecovery.sol";
* @title SignatureBouncer * @title SignatureBouncer
* @author PhABC, Shrugs and aflesher * @author PhABC, Shrugs and aflesher
* @dev Bouncer allows users to submit a signature as a permission to do an action. * @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 * If the signature is from one of the authorized bouncer addresses, the signature
* @dev is valid. The owner of the contract adds/removes bouncers. * is valid. The owner of the contract adds/removes bouncers.
* @dev Bouncer addresses can be individual servers signing grants or different * Bouncer addresses can be individual servers signing grants or different
* @dev users within a decentralized club that have permission to invite other members. * users within a decentralized club that have permission to invite other members.
* @dev * This technique is useful for whitelists and airdrops; instead of putting all
* @dev This technique is useful for whitelists and airdrops; instead of putting all * valid addresses on-chain, simply sign a grant of the form
* @dev valid addresses on-chain, simply sign a grant of the form * keccak256(abi.encodePacked(`:contractAddress` + `:granteeAddress`)) using a valid bouncer address.
* @dev keccak256(abi.encodePacked(`:contractAddress` + `:granteeAddress`)) using a valid bouncer address. * Then restrict access to your crowdsale/whitelist/airdrop using the
* @dev Then restrict access to your crowdsale/whitelist/airdrop using the * `onlyValidSignature` modifier (or implement your own using isValidSignature).
* @dev `onlyValidSignature` modifier (or implement your own using isValidSignature). * In addition to `onlyValidSignature`, `onlyValidSignatureAndMethod` and
* @dev * `onlyValidSignatureAndData` can be used to restrict access to only a given method
* @dev In addition to `onlyValidSignature`, `onlyValidSignatureAndMethod` and * or a given method with given parameters respectively.
* @dev `onlyValidSignatureAndData` can be used to restrict access to only a given method * See the tests Bouncer.test.js for specific usage examples.
* @dev or a given method with given parameters respectively.
* @dev
* @dev See the tests Bouncer.test.js for specific usage examples.
* @notice A method that uses the `onlyValidSignatureAndData` modifier must make the _sig * @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 * 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 * 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. * 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 * 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. * much more complex. See https://ethereum.stackexchange.com/a/50616 for more details.
*/ */
contract SignatureBouncer is Ownable, RBAC { contract SignatureBouncer is Ownable, RBAC {
using ECRecovery for bytes32; using ECRecovery for bytes32;
...@@ -146,7 +143,7 @@ contract SignatureBouncer is Ownable, RBAC { ...@@ -146,7 +143,7 @@ contract SignatureBouncer is Ownable, RBAC {
/** /**
* @dev internal function to convert a hash to an eth signed message * @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 * @return bool
*/ */
function isValidDataHash(bytes32 hash, bytes _sig) function isValidDataHash(bytes32 hash, bytes _sig)
......
...@@ -8,7 +8,7 @@ import "../ownership/rbac/RBAC.sol"; ...@@ -8,7 +8,7 @@ import "../ownership/rbac/RBAC.sol";
/** /**
* @title Whitelist * @title Whitelist
* @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions. * @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 { contract Whitelist is Ownable, RBAC {
event WhitelistedAddressAdded(address addr); event WhitelistedAddressAdded(address addr);
......
...@@ -7,14 +7,13 @@ import "../ownership/rbac/RBAC.sol"; ...@@ -7,14 +7,13 @@ import "../ownership/rbac/RBAC.sol";
* @title RBACWithAdmin * @title RBACWithAdmin
* @author Matt Condon (@Shrugs) * @author Matt Condon (@Shrugs)
* @dev It's recommended that you define constants in the contract, * @dev It's recommended that you define constants in the contract,
* @dev like ROLE_ADMIN below, to avoid typos. * like ROLE_ADMIN below, to avoid typos.
* @dev * @notice RBACWithAdmin is probably too expansive and powerful for your
* @dev NOTE: RBACWithAdmin is probably too expansive and powerful for your * application; an admin is actually able to change any address to any role
* @dev 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
* @dev which is a very large API surface. It's recommended that you follow a strategy * of strictly defining the abilities of your roles
* @dev of strictly defining the abilities of your roles * and the API-surface of your contract.
* @dev and the API-surface of your contract. * This is just an example for example's sake.
* @dev This is just an example for example's sake.
*/ */
contract RBACWithAdmin is RBAC { contract RBACWithAdmin is RBAC {
/** /**
......
...@@ -11,7 +11,7 @@ interface ERC165 { ...@@ -11,7 +11,7 @@ interface ERC165 {
* @notice Query if a contract implements an interface * @notice Query if a contract implements an interface
* @param _interfaceId The interface identifier, as specified in ERC-165 * @param _interfaceId The interface identifier, as specified in ERC-165
* @dev Interface identification is specified in ERC-165. This function * @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) function supportsInterface(bytes4 _interfaceId)
external external
......
...@@ -22,7 +22,7 @@ contract SupportsInterfaceWithLookup is ERC165 { ...@@ -22,7 +22,7 @@ contract SupportsInterfaceWithLookup is ERC165 {
/** /**
* @dev A contract implementing SupportsInterfaceWithLookup * @dev A contract implementing SupportsInterfaceWithLookup
* @dev implement ERC165 itself * implement ERC165 itself
*/ */
constructor() constructor()
public public
......
...@@ -17,7 +17,7 @@ contract HasNoEther is Ownable { ...@@ -17,7 +17,7 @@ contract HasNoEther is Ownable {
/** /**
* @dev Constructor that rejects incoming Ether * @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 * 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 * constructor. By doing it this way we prevent a payable constructor from working. Alternatively
* we could use assembly to access msg.value. * we could use assembly to access msg.value.
......
...@@ -8,8 +8,8 @@ import "./rbac/RBAC.sol"; ...@@ -8,8 +8,8 @@ import "./rbac/RBAC.sol";
/** /**
* @title Superuser * @title Superuser
* @dev The Superuser contract defines a single superuser who can transfer the ownership * @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. * 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. * A superuser can transfer his role to a new address.
*/ */
contract Superuser is Ownable, RBAC { contract Superuser is Ownable, RBAC {
string public constant ROLE_SUPERUSER = "superuser"; string public constant ROLE_SUPERUSER = "superuser";
......
...@@ -7,8 +7,8 @@ import "./Roles.sol"; ...@@ -7,8 +7,8 @@ import "./Roles.sol";
* @title RBAC (Role-Based Access Control) * @title RBAC (Role-Based Access Control)
* @author Matt Condon (@Shrugs) * @author Matt Condon (@Shrugs)
* @dev Stores and provides setters and getters for roles and addresses. * @dev Stores and provides setters and getters for roles and addresses.
* @dev Supports unlimited numbers of roles and addresses. * Supports unlimited numbers of roles and addresses.
* @dev See //contracts/mocks/RBACMock.sol for an example of usage. * See //contracts/mocks/RBACMock.sol for an example of usage.
* This RBAC method uses strings to key roles. It may be beneficial * 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, * It's also recommended that you define constants in the contract, like ROLE_ADMIN below,
......
...@@ -4,7 +4,7 @@ pragma solidity ^0.4.24; ...@@ -4,7 +4,7 @@ pragma solidity ^0.4.24;
/** /**
* @title ERC20Basic * @title ERC20Basic
* @dev Simpler version of ERC20 interface * @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 { contract ERC20Basic {
function totalSupply() public view returns (uint256); function totalSupply() public view returns (uint256);
......
...@@ -7,7 +7,6 @@ import "../../ownership/Ownable.sol"; ...@@ -7,7 +7,6 @@ import "../../ownership/Ownable.sol";
/** /**
* @title Mintable token * @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation * @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 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/ */
contract MintableToken is StandardToken, Ownable { contract MintableToken is StandardToken, Ownable {
......
...@@ -8,8 +8,8 @@ import "./ERC20.sol"; ...@@ -8,8 +8,8 @@ import "./ERC20.sol";
* @title Standard ERC20 token * @title Standard ERC20 token
* *
* @dev Implementation of the basic standard token. * @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20 * https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ */
contract StandardToken is ERC20, BasicToken { contract StandardToken is ERC20, BasicToken {
...@@ -43,7 +43,6 @@ 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. * @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 * 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 * 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: * 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 { ...@@ -76,7 +75,6 @@ contract StandardToken is ERC20, BasicToken {
/** /**
* @dev Increase the amount of tokens that an owner allowed to a spender. * @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment * 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 * allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined) * the first transaction is mined)
...@@ -99,7 +97,6 @@ contract StandardToken is ERC20, BasicToken { ...@@ -99,7 +97,6 @@ contract StandardToken is ERC20, BasicToken {
/** /**
* @dev Decrease the amount of tokens that an owner allowed to a spender. * @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement * 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 * allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined) * the first transaction is mined)
......
...@@ -6,7 +6,7 @@ import "./ERC721.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 * @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 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 { contract DeprecatedERC721 is ERC721 {
function takeOwnership(uint256 _tokenId) public; function takeOwnership(uint256 _tokenId) public;
......
...@@ -111,9 +111,9 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { ...@@ -111,9 +111,9 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
/** /**
* @dev Approves another address to transfer the given token ID * @dev Approves another address to transfer the given token ID
* @dev The zero address indicates there is no approved address. * The zero address indicates there is no approved address.
* @dev There can only be one approved address per token at a given time. * 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. * Can only be called by the token owner or an approved operator.
* @param _to address to be approved for the given token ID * @param _to address to be approved for the given token ID
* @param _tokenId uint256 ID of the token to be approved * @param _tokenId uint256 ID of the token to be approved
*/ */
...@@ -137,7 +137,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { ...@@ -137,7 +137,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
/** /**
* @dev Sets or unsets the approval of a given operator * @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 _to operator address to set the approval
* @param _approved representing the status of the approval to be set * @param _approved representing the status of the approval to be set
*/ */
...@@ -166,8 +166,8 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { ...@@ -166,8 +166,8 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
/** /**
* @dev Transfers the ownership of a given token ID to another address * @dev Transfers the ownership of a given token ID to another address
* @dev Usage of this method is discouraged, use `safeTransferFrom` whenever possible * Usage of this method is discouraged, use `safeTransferFrom` whenever possible
* @dev Requires the msg sender to be the owner, approved, or operator * Requires the msg sender to be the owner, approved, or operator
* @param _from current owner of the token * @param _from current owner of the token
* @param _to address to receive the ownership of the given token ID * @param _to address to receive the ownership of the given token ID
* @param _tokenId uint256 ID of the token to be transferred * @param _tokenId uint256 ID of the token to be transferred
...@@ -192,11 +192,12 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { ...@@ -192,11 +192,12 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
/** /**
* @dev Safely transfers the ownership of a given token ID to another address * @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`, * If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value * which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise,
* the transfer is reverted. * the transfer is reverted.
* @dev Requires the msg sender to be the owner, approved, or operator *
* Requires the msg sender to be the owner, approved, or operator
* @param _from current owner of the token * @param _from current owner of the token
* @param _to address to receive the ownership of the given token ID * @param _to address to receive the ownership of the given token ID
* @param _tokenId uint256 ID of the token to be transferred * @param _tokenId uint256 ID of the token to be transferred
...@@ -215,11 +216,11 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { ...@@ -215,11 +216,11 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
/** /**
* @dev Safely transfers the ownership of a given token ID to another address * @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`, * If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value * which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise,
* the transfer is reverted. * the transfer is reverted.
* @dev Requires the msg sender to be the owner, approved, or operator * Requires the msg sender to be the owner, approved, or operator
* @param _from current owner of the token * @param _from current owner of the token
* @param _to address to receive the ownership of the given token ID * @param _to address to receive the ownership of the given token ID
* @param _tokenId uint256 ID of the token to be transferred * @param _tokenId uint256 ID of the token to be transferred
...@@ -267,7 +268,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { ...@@ -267,7 +268,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
/** /**
* @dev Internal function to mint a new token * @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 _to The address that will own the minted token
* @param _tokenId uint256 ID of the token to be minted by the msg.sender * @param _tokenId uint256 ID of the token to be minted by the msg.sender
*/ */
...@@ -279,7 +280,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { ...@@ -279,7 +280,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
/** /**
* @dev Internal function to burn a specific token * @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 * @param _tokenId uint256 ID of the token being burned by the msg.sender
*/ */
function _burn(address _owner, uint256 _tokenId) internal { function _burn(address _owner, uint256 _tokenId) internal {
...@@ -290,7 +291,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { ...@@ -290,7 +291,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
/** /**
* @dev Internal function to clear current approval of a given token ID * @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 _owner owner of the token
* @param _tokenId uint256 ID of the token to be transferred * @param _tokenId uint256 ID of the token to be transferred
*/ */
...@@ -326,7 +327,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { ...@@ -326,7 +327,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
/** /**
* @dev Internal function to invoke `onERC721Received` on a target address * @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 _from address representing the previous owner of the given token ID
* @param _to target address that will receive the tokens * @param _to target address that will receive the tokens
* @param _tokenId uint256 ID of the token to be transferred * @param _tokenId uint256 ID of the token to be transferred
......
...@@ -80,7 +80,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { ...@@ -80,7 +80,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 {
/** /**
* @dev Returns an URI for a given token ID * @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 * @param _tokenId uint256 ID of the token to query
*/ */
function tokenURI(uint256 _tokenId) public view returns (string) { function tokenURI(uint256 _tokenId) public view returns (string) {
...@@ -116,7 +116,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { ...@@ -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 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 * @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 * @return uint256 token ID at the given index of the tokens list
*/ */
...@@ -127,7 +127,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { ...@@ -127,7 +127,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 {
/** /**
* @dev Internal function to set the token URI for a given token * @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 _tokenId uint256 ID of the token to set its URI
* @param _uri string URI to assign * @param _uri string URI to assign
*/ */
...@@ -173,7 +173,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { ...@@ -173,7 +173,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 {
/** /**
* @dev Internal function to mint a new token * @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 _to address the beneficiary that will own the minted token
* @param _tokenId uint256 ID of the token to be minted by the msg.sender * @param _tokenId uint256 ID of the token to be minted by the msg.sender
*/ */
...@@ -186,7 +186,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { ...@@ -186,7 +186,7 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 {
/** /**
* @dev Internal function to burn a specific token * @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 _owner owner of the token to burn
* @param _tokenId uint256 ID of the token being burned by the msg.sender * @param _tokenId uint256 ID of the token being burned by the msg.sender
*/ */
......
...@@ -8,8 +8,8 @@ import "../ERC20/ERC20.sol"; ...@@ -8,8 +8,8 @@ import "../ERC20/ERC20.sol";
* @title ERC827 interface, an extension of ERC20 token standard * @title ERC827 interface, an extension of ERC20 token standard
* *
* @dev Interface of a ERC827 token, following the ERC20 standard with extra * @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 * methods to transfer value and data and execute calls in transfers and
* @dev approvals. * approvals.
*/ */
contract ERC827 is ERC20 { contract ERC827 is ERC20 {
function approveAndCall( function approveAndCall(
......
...@@ -10,28 +10,23 @@ import "../ERC20/StandardToken.sol"; ...@@ -10,28 +10,23 @@ import "../ERC20/StandardToken.sol";
* @title ERC827, an extension of ERC20 token standard * @title ERC827, an extension of ERC20 token standard
* *
* @dev Implementation the ERC827, following the ERC20 standard with extra * @dev Implementation the ERC827, following the ERC20 standard with extra
* @dev methods to transfer value and data and execute calls in transfers and * methods to transfer value and data and execute calls in transfers and
* @dev approvals. * approvals. Uses OpenZeppelin StandardToken.
*
* @dev Uses OpenZeppelin StandardToken.
*/ */
contract ERC827Token is ERC827, StandardToken { contract ERC827Token is ERC827, StandardToken {
/** /**
* @dev Addition to ERC20 token methods. It allows to * @dev Addition to ERC20 token methods. It allows to
* @dev approve the transfer of value and execute a call with the sent data. * 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
* @dev Beware that changing an allowance with this method brings the risk that * someone may use both the old and the new allowance by unfortunate
* @dev someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race condition
* @dev 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
* @dev is to first reduce the spender's allowance to 0 and set the desired value * afterwards:
* @dev afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @dev https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* @param _spender The address that will spend the funds. * @param _spender The address that will spend the funds.
* @param _value The amount of tokens to be spent. * @param _value The amount of tokens to be spent.
* @param _data ABI-encoded contract call to call `_to` address. * @param _data ABI-encoded contract call to call `_to` address.
*
* @return true if the call function was executed successfully * @return true if the call function was executed successfully
*/ */
function approveAndCall( function approveAndCall(
...@@ -55,12 +50,10 @@ contract ERC827Token is ERC827, StandardToken { ...@@ -55,12 +50,10 @@ contract ERC827Token is ERC827, StandardToken {
/** /**
* @dev Addition to ERC20 token methods. Transfer tokens to a specified * @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 _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered * @param _value uint256 the amout of tokens to be transfered
* @param _data ABI-encoded contract call to call `_to` address. * @param _data ABI-encoded contract call to call `_to` address.
*
* @return true if the call function was executed successfully * @return true if the call function was executed successfully
*/ */
function transferAndCall( function transferAndCall(
...@@ -83,13 +76,11 @@ contract ERC827Token is ERC827, StandardToken { ...@@ -83,13 +76,11 @@ contract ERC827Token is ERC827, StandardToken {
/** /**
* @dev Addition to ERC20 token methods. Transfer tokens from one address to * @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 _from The address which you want to send tokens from
* @param _to The address which you want to transfer to * @param _to The address which you want to transfer to
* @param _value The amout of tokens to be transferred * @param _value The amout of tokens to be transferred
* @param _data ABI-encoded contract call to call `_to` address. * @param _data ABI-encoded contract call to call `_to` address.
*
* @return true if the call function was executed successfully * @return true if the call function was executed successfully
*/ */
function transferFromAndCall( function transferFromAndCall(
...@@ -111,13 +102,11 @@ contract ERC827Token is ERC827, StandardToken { ...@@ -111,13 +102,11 @@ contract ERC827Token is ERC827, StandardToken {
/** /**
* @dev Addition to StandardToken methods. Increase the amount of tokens that * @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. * an owner allowed to a spender and execute a call with the sent data.
* * approve should be called when allowed[_spender] == 0. To increment
* @dev 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
* @dev allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined)
* @dev the first transaction is mined) * From MonolithDAO Token.sol
* @dev From MonolithDAO Token.sol
*
* @param _spender The address which will spend the funds. * @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by. * @param _addedValue The amount of tokens to increase the allowance by.
* @param _data ABI-encoded contract call to call `_spender` address. * @param _data ABI-encoded contract call to call `_spender` address.
...@@ -143,13 +132,11 @@ contract ERC827Token is ERC827, StandardToken { ...@@ -143,13 +132,11 @@ contract ERC827Token is ERC827, StandardToken {
/** /**
* @dev Addition to StandardToken methods. Decrease the amount of tokens that * @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. * an owner allowed to a spender and execute a call with the sent data.
* * approve should be called when allowed[_spender] == 0. To decrement
* @dev 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
* @dev allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined)
* @dev the first transaction is mined) * From MonolithDAO Token.sol
* @dev From MonolithDAO Token.sol
*
* @param _spender The address which will spend the funds. * @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by. * @param _subtractedValue The amount of tokens to decrease the allowance by.
* @param _data ABI-encoded contract call to call `_spender` address. * @param _data ABI-encoded contract call to call `_spender` address.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment