aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/2.0.0/tokens/ERC20Token/IERC20Token.sol
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-07-27 07:30:07 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-08-17 08:31:21 +0800
commitbb3c34589130c6453f4a7ec5a96c75f729b24a67 (patch)
tree72da54e3a4e344c8125c9a9944b81c4d29aa8485 /packages/contracts/src/2.0.0/tokens/ERC20Token/IERC20Token.sol
parent0f3201d72a181c3dc7bafba9a82c141f91463ce9 (diff)
downloaddexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.tar
dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.tar.gz
dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.tar.bz2
dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.tar.lz
dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.tar.xz
dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.tar.zst
dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.zip
Update ERC20Token
Diffstat (limited to 'packages/contracts/src/2.0.0/tokens/ERC20Token/IERC20Token.sol')
-rw-r--r--packages/contracts/src/2.0.0/tokens/ERC20Token/IERC20Token.sol65
1 files changed, 39 insertions, 26 deletions
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 5ee5e1011..a752d3869 100644
--- a/packages/contracts/src/2.0.0/tokens/ERC20Token/IERC20Token.sol
+++ b/packages/contracts/src/2.0.0/tokens/ERC20Token/IERC20Token.sol
@@ -21,54 +21,67 @@ pragma solidity 0.4.24;
contract IERC20Token {
- /// @notice send `value` token to `to` from `msg.sender`
+ // solhint-disable-next-line no-simple-event-func-name
+ event Transfer(
+ address indexed _from,
+ address indexed _to,
+ uint256 _value
+ );
+
+ event Approval(
+ address indexed _owner,
+ address indexed _spender,
+ uint256 _value
+ );
+
+ /// @dev send `value` token to `to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
- /// @return Whether the transfer was successful or not
+ /// @return True if transfer was successful
function transfer(address _to, uint256 _value)
- public
+ external
returns (bool);
- /// @notice send `value` token to `to` from `from` on the condition it is approved by `from`
+ /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
- /// @return Whether the transfer was successful or not
- function transferFrom(address _from, address _to, uint256 _value)
- public
+ /// @return True if transfer was successful
+ function transferFrom(
+ address _from,
+ address _to,
+ uint256 _value
+ )
+ external
returns (bool);
- /// @notice `msg.sender` approves `_spender` to spend `_value` tokens
+ /// @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 Whether the approval was successful or not
+ /// @return Always true if enough call has enough gas to complete execution
function approve(address _spender, uint256 _value)
- public
+ external
returns (bool);
+ /// @dev Query total supply of token
+ /// @return Total supply of token
+ function totalSupply()
+ external
+ view
+ returns (uint256);
+
/// @param _owner The address from which the balance will be retrieved
- /// @return The balance
+ /// @return Balance of owner
function balanceOf(address _owner)
- public view
+ external
+ view
returns (uint256);
/// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent
function allowance(address _owner, address _spender)
- public view
+ external
+ view
returns (uint256);
-
- // solhint-disable-next-line no-simple-event-func-name
- event Transfer(
- address indexed _from,
- address indexed _to,
- uint256 _value
- );
-
- event Approval(
- address indexed _owner,
- address indexed _spender,
- uint256 _value
- );
}