|
@@ -3,6 +3,7 @@
|
|
|
pragma solidity ^0.8.0;
|
|
|
|
|
|
import "./IERC20.sol";
|
|
|
+import "./extensions/IERC20Metadata.sol";
|
|
|
import "../../utils/Context.sol";
|
|
|
|
|
|
/**
|
|
@@ -29,7 +30,7 @@ import "../../utils/Context.sol";
|
|
|
* functions have been added to mitigate the well-known issues around setting
|
|
|
* allowances. See {IERC20-approve}.
|
|
|
*/
|
|
|
-contract ERC20 is Context, IERC20 {
|
|
|
+contract ERC20 is Context, IERC20, IERC20Metadata {
|
|
|
mapping (address => uint256) private _balances;
|
|
|
|
|
|
mapping (address => mapping (address => uint256)) private _allowances;
|
|
@@ -56,7 +57,7 @@ contract ERC20 is Context, IERC20 {
|
|
|
/**
|
|
|
* @dev Returns the name of the token.
|
|
|
*/
|
|
|
- function name() public view virtual returns (string memory) {
|
|
|
+ function name() public view virtual override returns (string memory) {
|
|
|
return _name;
|
|
|
}
|
|
|
|
|
@@ -64,7 +65,7 @@ contract ERC20 is Context, IERC20 {
|
|
|
* @dev Returns the symbol of the token, usually a shorter version of the
|
|
|
* name.
|
|
|
*/
|
|
|
- function symbol() public view virtual returns (string memory) {
|
|
|
+ function symbol() public view virtual override returns (string memory) {
|
|
|
return _symbol;
|
|
|
}
|
|
|
|
|
@@ -81,7 +82,7 @@ contract ERC20 is Context, IERC20 {
|
|
|
* no way affects any of the arithmetic of the contract, including
|
|
|
* {IERC20-balanceOf} and {IERC20-transfer}.
|
|
|
*/
|
|
|
- function decimals() public view virtual returns (uint8) {
|
|
|
+ function decimals() public view virtual override returns (uint8) {
|
|
|
return 18;
|
|
|
}
|
|
|
|