Skip to content

Commit

Permalink
rename to IERC20Extended
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Mar 4, 2021
1 parent 171c135 commit 1e7d7a5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Rename `UpgradeableProxy` to `ERC1967Proxy`. ([#2547](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2547))
* `ERC777`: Optimize the gas costs of the constructor. ([#2551](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2551))
* `ERC721URIStorage`: Add a new extension that implements the `_setTokenURI` behavior as it was available in 3.4.0. ([#2555](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2555))
* `IERC20Metadata`: Add a new extended interface that includes the optional `name()`, `symbol()` and `decimals()` functions. ([#2561](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2561))
* `IERC20Extended`: Interface file for the extended ERC20 standard (that includes the optional `name()`, `symbol()` and `decimals()`). ([#2561](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2561))

### How to upgrade from 3.x

Expand Down
5 changes: 2 additions & 3 deletions contracts/token/ERC20/ERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "./IERC20Extended.sol";
import "../../utils/Context.sol";

/**
Expand All @@ -30,7 +29,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, IERC20Metadata {
contract ERC20 is Context, IERC20Extended {
mapping (address => uint256) private _balances;

mapping (address => mapping (address => uint256)) private _allowances;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "./IERC20.sol";

/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
* @dev Interface of the extended ERC20 standard.
*/
interface IERC20Metadata is IERC20 {
interface IERC20Extended is IERC20 {
/**
* @dev Returns the name of the token.
*/
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/ERC20/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TIP: For an overview of ERC20 tokens and a walk through on how to create a token
There a few core contracts that implement the behavior specified in the EIP:

* {IERC20}: the interface all ERC20 implementations should conform to.
* {IERC20Metadata}: the extended ERC20 interface including the <<ERC20-name,`name`>>, <<ERC20-symbol,`symbol`>> and <<ERC20-decimals,`decimals`>> functions.
* {IERC20Extended}: the extended ERC20 interface including the <<ERC20-name,`name`>>, <<ERC20-symbol,`symbol`>> and <<ERC20-decimals,`decimals`>> functions.
* {ERC20}: the implementation of the ERC20 interface, including the <<ERC20-name,`name`>>, <<ERC20-symbol,`symbol`>> and <<ERC20-decimals,`decimals`>> optional standard extension to the base interface.
Additionally there are multiple custom extensions, including:
Expand Down

0 comments on commit 1e7d7a5

Please sign in to comment.