ERC20Token.sol
1 pragma solidity >=0.5.0 <0.7.0; 2 3 // Abstract contract for the full ERC 20 Token standard 4 // https://github.com/ethereum/EIPs/issues/20 5 6 interface ERC20Token { 7 8 /** 9 * @notice send `_value` token to `_to` from `msg.sender` 10 * @param _to The address of the recipient 11 * @param _value The amount of token to be transferred 12 * @return Whether the transfer was successful or not 13 */ 14 function transfer(address _to, uint256 _value) external returns (bool success); 15 16 /** 17 * @notice `msg.sender` approves `_spender` to spend `_value` tokens 18 * @param _spender The address of the account able to transfer the tokens 19 * @param _value The amount of tokens to be approved for transfer 20 * @return Whether the approval was successful or not 21 */ 22 function approve(address _spender, uint256 _value) external returns (bool success); 23 24 /** 25 * @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` 26 * @param _from The address of the sender 27 * @param _to The address of the recipient 28 * @param _value The amount of token to be transferred 29 * @return Whether the transfer was successful or not 30 */ 31 function transferFrom(address _from, address _to, uint256 _value) external returns (bool success); 32 33 /** 34 * @param _owner The address from which the balance will be retrieved 35 * @return The balance 36 */ 37 function balanceOf(address _owner) external view returns (uint256 balance); 38 39 /** 40 * @param _owner The address of the account owning tokens 41 * @param _spender The address of the account able to transfer the tokens 42 * @return Amount of remaining tokens allowed to spent 43 */ 44 function allowance(address _owner, address _spender) external view returns (uint256 remaining); 45 46 /** 47 * @notice return total supply of tokens 48 */ 49 function totalSupply() external view returns (uint256 supply); 50 51 event Transfer(address indexed _from, address indexed _to, uint256 _value); 52 event Approval(address indexed _owner, address indexed _spender, uint256 _value); 53 }