// SPDX-License-Identifier: MIT pragma solidity 0.8.0; /** * @title A standard interface for tokens. * @dev This interface uses the official ERC-20 specification from * https://eips.ethereum.org/EIPS/eip-20 with the additional requirement that * the functions specified as optional have become required. */ interface ERC20 { /** * @dev Returns the name of the token. * @return _name Token name. */ function name() external view returns (string memory _name); /** * @dev Returns the symbol of the token. * @return _symbol Token symbol. */ function symbol() external view returns (string memory _symbol); /** * @dev Returns the number of decimals the token uses. * @return _decimals Number of decimals. */ function decimals() external view returns (uint8 _decimals); /** * @dev Returns the total token supply. * @return _totalSupply Total supply. */ function totalSupply() external view returns (uint256 _totalSupply); /** * @dev Returns the account balance of another account with address _owner. * @param _owner The address from which the balance will be retrieved. * @return _balance Balance of _owner. */ function balanceOf( address _owner ) external view returns (uint256 _balance); /** * @dev Transfers _value amount of tokens to address _to, and MUST fire the Transfer event. The * function SHOULD throw if the message caller's account balance does not have enough tokens to * spend. * @param _to The address of the recipient. * @param _value The amount of token to be transferred. * @return _success Success of operation. */ function transfer( address _to, uint256 _value ) external returns (bool _success); /** * @dev Transfers _value amount of tokens from address _from to address _to, and MUST fire the * Transfer event. * @param _from The address of the sender. * @param _to The address of the recipient. * @param _value The amount of token to be transferred. * @return _success Success of operation. */ function transferFrom( address _from, address _to, uint256 _value ) external returns (bool _success); /** * @dev Allows _spender to withdraw from your account multiple times, up to * the _value amount. If this function is called again it overwrites the current * allowance with _value. * @param _spender The address of the account able to transfer the tokens. * @param _value The amount of tokens to be approved for transfer. * @return _success Success of operation. */ function approve( address _spender, uint256 _value ) external returns (bool _success); /** * @dev Returns the amount which _spender is still allowed to withdraw from _owner. * @param _owner The address of the account owning tokens. * @param _spender The address of the account able to transfer the tokens. * @return _remaining Remaining allowance. */ function allowance( address _owner, address _spender ) external view returns (uint256 _remaining); /** * @dev Triggers when tokens are transferred, including zero value transfers. */ event Transfer( address indexed _from, address indexed _to, uint256 _value ); /** * @dev Triggers on any successful call to approve(address _spender, uint256 _value). */ event Approval( address indexed _owner, address indexed _spender, uint256 _value ); }