diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-08-16 01:55:48 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-08-17 08:32:16 +0800 |
commit | 8bce73dc679cb05353835d011b8e1dfcff7f4670 (patch) | |
tree | adc92957584ee92ba8da8e531ae24b701a908c57 /packages/contracts/src | |
parent | c13f538400e0ef9e06a5ea52e174979a5cc82bdc (diff) | |
download | dexon-0x-contracts-8bce73dc679cb05353835d011b8e1dfcff7f4670.tar.gz dexon-0x-contracts-8bce73dc679cb05353835d011b8e1dfcff7f4670.tar.zst dexon-0x-contracts-8bce73dc679cb05353835d011b8e1dfcff7f4670.zip |
Fix typos, run prettier, and allow anyone to call on DummyERC721Token
Diffstat (limited to 'packages/contracts/src')
5 files changed, 6 insertions, 6 deletions
diff --git a/packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol b/packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol index c6797c0d8..412c5d1ad 100644 --- a/packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol +++ b/packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol @@ -29,6 +29,7 @@ contract DummyERC20Token is string public name; string public symbol; uint256 public decimals; + uint256 public constant MAX_MINT_AMOUNT = 10000000000000000000000; constructor ( string _name, @@ -67,7 +68,7 @@ contract DummyERC20Token is external { require( - _value <= 10000000000000000000000, + _value <= MAX_MINT_AMOUNT, "VALUE_TOO_LARGE" ); diff --git a/packages/contracts/src/2.0.0/test/DummyERC721Token/DummyERC721Token.sol b/packages/contracts/src/2.0.0/test/DummyERC721Token/DummyERC721Token.sol index e995cc967..ac9068d1d 100644 --- a/packages/contracts/src/2.0.0/test/DummyERC721Token/DummyERC721Token.sol +++ b/packages/contracts/src/2.0.0/test/DummyERC721Token/DummyERC721Token.sol @@ -46,13 +46,12 @@ contract DummyERC721Token is /// @param _tokenId ID of the token to be minted by the msg.sender function mint(address _to, uint256 _tokenId) external - onlyOwner { _mint(_to, _tokenId); } /// @dev Function to burn a token - /// Reverts if the given token ID doesn't exist + /// Reverts if the given token ID doesn't exist or not called by contract owner /// @param _owner Owner of token with given token ID /// @param _tokenId ID of the token to be burned by the msg.sender function burn(address _owner, uint256 _tokenId) diff --git a/packages/contracts/src/2.0.0/tokens/ERC20Token/ERC20Token.sol b/packages/contracts/src/2.0.0/tokens/ERC20Token/ERC20Token.sol index db2d09b9d..5ef5ee7ce 100644 --- a/packages/contracts/src/2.0.0/tokens/ERC20Token/ERC20Token.sol +++ b/packages/contracts/src/2.0.0/tokens/ERC20Token/ERC20Token.sol @@ -101,7 +101,7 @@ contract ERC20Token is /// @dev `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer - /// @return Always true if enough call has enough gas to complete execution + /// @return Always true if the call has enough gas to complete execution function approve(address _spender, uint256 _value) external returns (bool) diff --git a/packages/contracts/src/2.0.0/tokens/ERC20Token/IERC20Token.sol b/packages/contracts/src/2.0.0/tokens/ERC20Token/IERC20Token.sol index 462be17fd..258d47393 100644 --- a/packages/contracts/src/2.0.0/tokens/ERC20Token/IERC20Token.sol +++ b/packages/contracts/src/2.0.0/tokens/ERC20Token/IERC20Token.sol @@ -58,7 +58,7 @@ contract IERC20Token { /// @dev `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer - /// @return Always true if enough call has enough gas to complete execution + /// @return Always true if the call has enough gas to complete execution function approve(address _spender, uint256 _value) external returns (bool); diff --git a/packages/contracts/src/2.0.0/tokens/ERC721Token/ERC721Token.sol b/packages/contracts/src/2.0.0/tokens/ERC721Token/ERC721Token.sol index 94e084731..530f080c0 100644 --- a/packages/contracts/src/2.0.0/tokens/ERC721Token/ERC721Token.sol +++ b/packages/contracts/src/2.0.0/tokens/ERC721Token/ERC721Token.sol @@ -45,7 +45,7 @@ contract ERC721Token is /// @notice Transfers the ownership of an NFT from one address to another address /// @dev Throws unless `msg.sender` is the current owner, an authorized - /// perator, or the approved address for this NFT. Throws if `_from` is + /// operator, or the approved address for this NFT. Throws if `_from` is /// not the current owner. Throws if `_to` is the zero address. Throws if /// `_tokenId` is not a valid NFT. When transfer is complete, this function /// checks if `_to` is a smart contract (code size > 0). If so, it calls |