Browse Source

Remove presets (#3637)

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
Co-authored-by: JulissaDantes <julissadcj@gmail.com>
Hadrien Croubois 2 years ago
parent
commit
4a9db80cb9

+ 1 - 0
CHANGELOG.md

@@ -3,6 +3,7 @@
 ## Unreleased (Breaking)
 
  * `TimelockController`: Changed the role architecture to use `DEFAULT_ADMIN_ROLE` as the admin for all roles, instead of the bespoke `TIMELOCK_ADMIN_ROLE` that was used previously. This aligns with the general recommendation for `AccessControl` and makes the addition of new roles easier. Accordingly, the `admin` parameter and timelock will now be granted `DEFAULT_ADMIN_ROLE` instead of `TIMELOCK_ADMIN_ROLE`. ([#3799](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3799))
+* Removed presets in favor of [OpenZeppelin Contracts Wizard](https://wizard.openzeppelin.com/).
 
 ## Unreleased
 

+ 1 - 7
contracts/token/ERC1155/README.adoc

@@ -14,7 +14,7 @@ Additionally there are multiple custom extensions, including:
 * designation of addresses that can pause token transfers for all users ({ERC1155Pausable}).
 * destruction of own tokens ({ERC1155Burnable}).
 
-NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC1155 (such as <<ERC1155-_mint-address-uint256-uint256-bytes-,`_mint`>>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc1155.adoc#Presets[ERC1155 Presets] (such as {ERC1155PresetMinterPauser}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.
+NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC1155 (such as <<ERC1155-_mint-address-uint256-uint256-bytes-,`_mint`>>) and expose them as external functions in the way they prefer.
 
 == Core
 
@@ -38,12 +38,6 @@ NOTE: This core set of contracts is designed to be unopinionated, allowing devel
 
 {{ERC1155URIStorage}}
 
-== Presets
-
-These contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code.
-
-{{ERC1155PresetMinterPauser}}
-
 == Utilities
 
 {{ERC1155Holder}}

+ 0 - 128
contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol

@@ -1,128 +0,0 @@
-// SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)
-
-pragma solidity ^0.8.0;
-
-import "../ERC1155.sol";
-import "../extensions/ERC1155Burnable.sol";
-import "../extensions/ERC1155Pausable.sol";
-import "../../../access/AccessControlEnumerable.sol";
-import "../../../utils/Context.sol";
-
-/**
- * @dev {ERC1155} token, including:
- *
- *  - ability for holders to burn (destroy) their tokens
- *  - a minter role that allows for token minting (creation)
- *  - a pauser role that allows to stop all token transfers
- *
- * This contract uses {AccessControl} to lock permissioned functions using the
- * different roles - head to its documentation for details.
- *
- * The account that deploys the contract will be granted the minter and pauser
- * roles, as well as the default admin role, which will let it grant both minter
- * and pauser roles to other accounts.
- *
- * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._
- */
-contract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {
-    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
-    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
-
-    /**
-     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that
-     * deploys the contract.
-     */
-    constructor(string memory uri) ERC1155(uri) {
-        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
-
-        _setupRole(MINTER_ROLE, _msgSender());
-        _setupRole(PAUSER_ROLE, _msgSender());
-    }
-
-    /**
-     * @dev Creates `amount` new tokens for `to`, of token type `id`.
-     *
-     * See {ERC1155-_mint}.
-     *
-     * Requirements:
-     *
-     * - the caller must have the `MINTER_ROLE`.
-     */
-    function mint(
-        address to,
-        uint256 id,
-        uint256 amount,
-        bytes memory data
-    ) public virtual {
-        require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint");
-
-        _mint(to, id, amount, data);
-    }
-
-    /**
-     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.
-     */
-    function mintBatch(
-        address to,
-        uint256[] memory ids,
-        uint256[] memory amounts,
-        bytes memory data
-    ) public virtual {
-        require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint");
-
-        _mintBatch(to, ids, amounts, data);
-    }
-
-    /**
-     * @dev Pauses all token transfers.
-     *
-     * See {ERC1155Pausable} and {Pausable-_pause}.
-     *
-     * Requirements:
-     *
-     * - the caller must have the `PAUSER_ROLE`.
-     */
-    function pause() public virtual {
-        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to pause");
-        _pause();
-    }
-
-    /**
-     * @dev Unpauses all token transfers.
-     *
-     * See {ERC1155Pausable} and {Pausable-_unpause}.
-     *
-     * Requirements:
-     *
-     * - the caller must have the `PAUSER_ROLE`.
-     */
-    function unpause() public virtual {
-        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to unpause");
-        _unpause();
-    }
-
-    /**
-     * @dev See {IERC165-supportsInterface}.
-     */
-    function supportsInterface(bytes4 interfaceId)
-        public
-        view
-        virtual
-        override(AccessControlEnumerable, ERC1155)
-        returns (bool)
-    {
-        return super.supportsInterface(interfaceId);
-    }
-
-    function _beforeTokenTransfer(
-        address operator,
-        address from,
-        address to,
-        uint256[] memory ids,
-        uint256[] memory amounts,
-        bytes memory data
-    ) internal virtual override(ERC1155, ERC1155Pausable) {
-        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
-    }
-}

+ 0 - 1
contracts/token/ERC1155/presets/README.md

@@ -1 +0,0 @@
-Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative.

+ 0 - 1
contracts/token/ERC20/ERC20.sol

@@ -12,7 +12,6 @@ import "../../utils/Context.sol";
  *
  * This implementation is agnostic to the way tokens are created. This means
  * that a supply mechanism has to be added in a derived contract using {_mint}.
- * For a generic mechanism see {ERC20PresetMinterPauser}.
  *
  * TIP: For a detailed writeup see our guide
  * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How

+ 1 - 9
contracts/token/ERC20/README.adoc

@@ -31,7 +31,7 @@ Finally, there are some utilities to interact with ERC20 contracts in various wa
 * {SafeERC20}: a wrapper around the interface that eliminates the need to handle boolean return values.
 * {TokenTimelock}: hold tokens for a beneficiary until a specified time.
 
-NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC20 (such as <<ERC20-_mint-address-uint256-,`_mint`>>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc20.adoc#Presets[ERC20 Presets] (such as {ERC20PresetMinterPauser}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.
+NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC20 (such as <<ERC20-_mint-address-uint256-,`_mint`>>) and expose them as external functions in the way they prefer.
 
 == Core
 
@@ -63,14 +63,6 @@ NOTE: This core set of contracts is designed to be unopinionated, allowing devel
 
 {{ERC4626}}
 
-== Presets
-
-These contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code.
-
-{{ERC20PresetMinterPauser}}
-
-{{ERC20PresetFixedSupply}}
-
 == Utilities
 
 {{SafeERC20}}

+ 0 - 35
contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol

@@ -1,35 +0,0 @@
-// SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetFixedSupply.sol)
-pragma solidity ^0.8.0;
-
-import "../extensions/ERC20Burnable.sol";
-
-/**
- * @dev {ERC20} token, including:
- *
- *  - Preminted initial supply
- *  - Ability for holders to burn (destroy) their tokens
- *  - No access control mechanism (for minting/pausing) and hence no governance
- *
- * This contract uses {ERC20Burnable} to include burn capabilities - head to
- * its documentation for details.
- *
- * _Available since v3.4._
- *
- * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._
- */
-contract ERC20PresetFixedSupply is ERC20Burnable {
-    /**
-     * @dev Mints `initialSupply` amount of token and transfers them to `owner`.
-     *
-     * See {ERC20-constructor}.
-     */
-    constructor(
-        string memory name,
-        string memory symbol,
-        uint256 initialSupply,
-        address owner
-    ) ERC20(name, symbol) {
-        _mint(owner, initialSupply);
-    }
-}

+ 0 - 94
contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol

@@ -1,94 +0,0 @@
-// SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol)
-
-pragma solidity ^0.8.0;
-
-import "../ERC20.sol";
-import "../extensions/ERC20Burnable.sol";
-import "../extensions/ERC20Pausable.sol";
-import "../../../access/AccessControlEnumerable.sol";
-import "../../../utils/Context.sol";
-
-/**
- * @dev {ERC20} token, including:
- *
- *  - ability for holders to burn (destroy) their tokens
- *  - a minter role that allows for token minting (creation)
- *  - a pauser role that allows to stop all token transfers
- *
- * This contract uses {AccessControl} to lock permissioned functions using the
- * different roles - head to its documentation for details.
- *
- * The account that deploys the contract will be granted the minter and pauser
- * roles, as well as the default admin role, which will let it grant both minter
- * and pauser roles to other accounts.
- *
- * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._
- */
-contract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable {
-    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
-    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
-
-    /**
-     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the
-     * account that deploys the contract.
-     *
-     * See {ERC20-constructor}.
-     */
-    constructor(string memory name, string memory symbol) ERC20(name, symbol) {
-        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
-
-        _setupRole(MINTER_ROLE, _msgSender());
-        _setupRole(PAUSER_ROLE, _msgSender());
-    }
-
-    /**
-     * @dev Creates `amount` new tokens for `to`.
-     *
-     * See {ERC20-_mint}.
-     *
-     * Requirements:
-     *
-     * - the caller must have the `MINTER_ROLE`.
-     */
-    function mint(address to, uint256 amount) public virtual {
-        require(hasRole(MINTER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have minter role to mint");
-        _mint(to, amount);
-    }
-
-    /**
-     * @dev Pauses all token transfers.
-     *
-     * See {ERC20Pausable} and {Pausable-_pause}.
-     *
-     * Requirements:
-     *
-     * - the caller must have the `PAUSER_ROLE`.
-     */
-    function pause() public virtual {
-        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to pause");
-        _pause();
-    }
-
-    /**
-     * @dev Unpauses all token transfers.
-     *
-     * See {ERC20Pausable} and {Pausable-_unpause}.
-     *
-     * Requirements:
-     *
-     * - the caller must have the `PAUSER_ROLE`.
-     */
-    function unpause() public virtual {
-        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to unpause");
-        _unpause();
-    }
-
-    function _beforeTokenTransfer(
-        address from,
-        address to,
-        uint256 amount
-    ) internal virtual override(ERC20, ERC20Pausable) {
-        super._beforeTokenTransfer(from, to, amount);
-    }
-}

+ 0 - 1
contracts/token/ERC20/presets/README.md

@@ -1 +0,0 @@
-Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative.

+ 1 - 7
contracts/token/ERC721/README.adoc

@@ -29,7 +29,7 @@ Additionally there are a few of other extensions:
 * {ERC721Pausable}: A primitive to pause contract operation.
 * {ERC721Burnable}: A way for token holders to burn their own tokens.
 
-NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC721 (such as <<ERC721-_mint-address-uint256-,`_mint`>>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc721.adoc#Presets[ERC721 Presets] (such as {ERC721PresetMinterPauserAutoId}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.
+NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC721 (such as <<ERC721-_mint-address-uint256-,`_mint`>>) and expose them as external functions in the way they prefer.
 
 == Core
 
@@ -59,12 +59,6 @@ NOTE: This core set of contracts is designed to be unopinionated, allowing devel
 
 {{ERC721Royalty}}
 
-== Presets
-
-These contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code.
-
-{{ERC721PresetMinterPauserAutoId}}
-
 == Utilities
 
 {{ERC721Holder}}

+ 0 - 140
contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol

@@ -1,140 +0,0 @@
-// SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol)
-
-pragma solidity ^0.8.0;
-
-import "../ERC721.sol";
-import "../extensions/ERC721Enumerable.sol";
-import "../extensions/ERC721Burnable.sol";
-import "../extensions/ERC721Pausable.sol";
-import "../../../access/AccessControlEnumerable.sol";
-import "../../../utils/Context.sol";
-import "../../../utils/Counters.sol";
-
-/**
- * @dev {ERC721} token, including:
- *
- *  - ability for holders to burn (destroy) their tokens
- *  - a minter role that allows for token minting (creation)
- *  - a pauser role that allows to stop all token transfers
- *  - token ID and URI autogeneration
- *
- * This contract uses {AccessControl} to lock permissioned functions using the
- * different roles - head to its documentation for details.
- *
- * The account that deploys the contract will be granted the minter and pauser
- * roles, as well as the default admin role, which will let it grant both minter
- * and pauser roles to other accounts.
- *
- * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._
- */
-contract ERC721PresetMinterPauserAutoId is
-    Context,
-    AccessControlEnumerable,
-    ERC721Enumerable,
-    ERC721Burnable,
-    ERC721Pausable
-{
-    using Counters for Counters.Counter;
-
-    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
-    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
-
-    Counters.Counter private _tokenIdTracker;
-
-    string private _baseTokenURI;
-
-    /**
-     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the
-     * account that deploys the contract.
-     *
-     * Token URIs will be autogenerated based on `baseURI` and their token IDs.
-     * See {ERC721-tokenURI}.
-     */
-    constructor(
-        string memory name,
-        string memory symbol,
-        string memory baseTokenURI
-    ) ERC721(name, symbol) {
-        _baseTokenURI = baseTokenURI;
-
-        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
-
-        _setupRole(MINTER_ROLE, _msgSender());
-        _setupRole(PAUSER_ROLE, _msgSender());
-    }
-
-    function _baseURI() internal view virtual override returns (string memory) {
-        return _baseTokenURI;
-    }
-
-    /**
-     * @dev Creates a new token for `to`. Its token ID will be automatically
-     * assigned (and available on the emitted {IERC721-Transfer} event), and the token
-     * URI autogenerated based on the base URI passed at construction.
-     *
-     * See {ERC721-_mint}.
-     *
-     * Requirements:
-     *
-     * - the caller must have the `MINTER_ROLE`.
-     */
-    function mint(address to) public virtual {
-        require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint");
-
-        // We cannot just use balanceOf to create the new tokenId because tokens
-        // can be burned (destroyed), so we need a separate counter.
-        _mint(to, _tokenIdTracker.current());
-        _tokenIdTracker.increment();
-    }
-
-    /**
-     * @dev Pauses all token transfers.
-     *
-     * See {ERC721Pausable} and {Pausable-_pause}.
-     *
-     * Requirements:
-     *
-     * - the caller must have the `PAUSER_ROLE`.
-     */
-    function pause() public virtual {
-        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause");
-        _pause();
-    }
-
-    /**
-     * @dev Unpauses all token transfers.
-     *
-     * See {ERC721Pausable} and {Pausable-_unpause}.
-     *
-     * Requirements:
-     *
-     * - the caller must have the `PAUSER_ROLE`.
-     */
-    function unpause() public virtual {
-        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause");
-        _unpause();
-    }
-
-    function _beforeTokenTransfer(
-        address from,
-        address to,
-        uint256 firstTokenId,
-        uint256 batchSize
-    ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
-        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);
-    }
-
-    /**
-     * @dev See {IERC165-supportsInterface}.
-     */
-    function supportsInterface(bytes4 interfaceId)
-        public
-        view
-        virtual
-        override(AccessControlEnumerable, ERC721, ERC721Enumerable)
-        returns (bool)
-    {
-        return super.supportsInterface(interfaceId);
-    }
-}

+ 0 - 1
contracts/token/ERC721/presets/README.md

@@ -1 +0,0 @@
-Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative.

+ 0 - 6
contracts/token/ERC777/README.adoc

@@ -22,9 +22,3 @@ Additionally there are interfaces used to develop contracts that react to token
 {{IERC777Sender}}
 
 {{IERC777Recipient}}
-
-== Presets
-
-These contracts are preconfigured combinations of features. They can be used through inheritance or as models to copy and paste their source code.
-
-{{ERC777PresetFixedSupply}}

+ 0 - 30
contracts/token/ERC777/presets/ERC777PresetFixedSupply.sol

@@ -1,30 +0,0 @@
-// SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts v4.4.1 (token/ERC777/presets/ERC777PresetFixedSupply.sol)
-pragma solidity ^0.8.0;
-
-import "../ERC777.sol";
-
-/**
- * @dev {ERC777} token, including:
- *
- *  - Preminted initial supply
- *  - No access control mechanism (for minting/pausing) and hence no governance
- *
- * _Available since v3.4._
- */
-contract ERC777PresetFixedSupply is ERC777 {
-    /**
-     * @dev Mints `initialSupply` amount of token and transfers them to `owner`.
-     *
-     * See {ERC777-constructor}.
-     */
-    constructor(
-        string memory name,
-        string memory symbol,
-        address[] memory defaultOperators,
-        uint256 initialSupply,
-        address owner
-    ) ERC777(name, symbol, defaultOperators) {
-        _mint(owner, initialSupply, "", "");
-    }
-}

+ 0 - 8
docs/modules/ROOT/pages/erc1155.adoc

@@ -143,11 +143,3 @@ contract MyContract is ERC1155Holder {
 ----
 
 We can also implement more complex scenarios using the xref:api:token/ERC1155.adoc#IERC1155Receiver-onERC1155Received-address-address-uint256-uint256-bytes-[`onERC1155Received`] and xref:api:token/ERC1155.adoc#IERC1155Receiver-onERC1155BatchReceived-address-address-uint256---uint256---bytes-[`onERC1155BatchReceived`] functions.
-
-[[Presets]]
-== Preset ERC1155 contract
-A preset ERC1155 is available, https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.7/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol[`ERC1155PresetMinterPauser`]. It is preset to allow for token minting (create) - including batch minting, stop all token transfers (pause) and allow holders to burn (destroy) their tokens. The contract uses xref:access-control.adoc[Access Control] to control access to the minting and pausing functionality.  The account that deploys the contract will be granted the minter and pauser roles, as well as the default admin role.
-
-This contract is ready to deploy without having to write any Solidity code.  It can be used as-is for quick prototyping and testing, but is also suitable for production environments.
-
-NOTE: Contract presets are now deprecated in favor of https://wizard.openzeppelin.com[Contracts Wizard] as a more powerful alternative.

+ 3 - 31
docs/modules/ROOT/pages/erc20-supply.adoc

@@ -54,40 +54,12 @@ contract ERC20WithMinerReward is ERC20 {
 
 As we can see, `_mint` makes it super easy to do this correctly.
 
-[[modularizing-the-mechanism]]
-== Modularizing the Mechanism
-
-There is one supply mechanism already included in Contracts: `ERC20PresetMinterPauser`. This is a generic mechanism in which a set of accounts is assigned the `minter` role, granting them the permission to call a `mint` function, an external version of `_mint`.
-
-This can be used for centralized minting, where an externally owned account (i.e. someone with a pair of cryptographic keys) decides how much supply to create and for whom. There are very legitimate use cases for this mechanism, such as https://medium.com/reserve-currency/why-another-stablecoin-866f774afede#3aea[traditional asset-backed stablecoins].
-
-The accounts with the minter role don't need to be externally owned, though, and can just as well be smart contracts that implement a trustless mechanism. We can in fact implement the same behavior as the previous section.
-
-[source,solidity]
-----
-contract MinerRewardMinter {
-    ERC20PresetMinterPauser _token;
-
-    constructor(ERC20PresetMinterPauser token) {
-        _token = token;
-    }
-
-    function mintMinerReward() public {
-        _token.mint(block.coinbase, 1000);
-    }
-}
-----
-
-This contract, when initialized with an `ERC20PresetMinterPauser` instance, and granted the `minter` role for that contract, will result in exactly the same behavior implemented in the previous section. What is interesting about using `ERC20PresetMinterPauser` is that we can easily combine multiple supply mechanisms by assigning the role to multiple contracts, and moreover that we can do this dynamically.
-
-TIP: To learn more about roles and permissioned systems, head to our xref:access-control.adoc[Access Control guide].
-
 [[automating-the-reward]]
 == Automating the Reward
 
-So far our supply mechanisms were triggered manually, but `ERC20` also allows us to extend the core functionality of the token through the xref:api:token/ERC20.adoc#ERC20-_beforeTokenTransfer-address-address-uint256-[`_beforeTokenTransfer`] hook (see xref:extending-contracts.adoc#using-hooks[Using Hooks]).
+So far our supply mechanism was triggered manually, but `ERC20` also allows us to extend the core functionality of the token through the xref:api:token/ERC20.adoc#ERC20-_beforeTokenTransfer-address-address-uint256-[`_beforeTokenTransfer`] hook (see xref:extending-contracts.adoc#using-hooks[Using Hooks]).
 
-Adding to the supply mechanism from previous sections, we can use this hook to mint a miner reward for every token transfer that is included in the blockchain.
+Adding to the supply mechanism from the previous section, we can use this hook to mint a miner reward for every token transfer that is included in the blockchain.
 
 [source,solidity]
 ----
@@ -110,4 +82,4 @@ contract ERC20WithAutoMinerReward is ERC20 {
 [[wrapping-up]]
 == Wrapping Up
 
-We've seen two ways to implement ERC20 supply mechanisms: internally through `_mint`, and externally through `ERC20PresetMinterPauser`. Hopefully this has helped you understand how to use OpenZeppelin Contracts and some of the design principles behind it, and you can apply them to your own smart contracts.
+We've seen how to implement a ERC20 supply mechanism: internally through `_mint`. Hopefully this has helped you understand how to use OpenZeppelin Contracts and some of the design principles behind it, and you can apply them to your own smart contracts.

+ 0 - 8
docs/modules/ROOT/pages/erc20.adoc

@@ -75,11 +75,3 @@ So if you want to send `5` tokens using a token contract with 18 decimals, the m
 ```solidity
 transfer(recipient, 5 * (10 ** 18));
 ```
-
-[[Presets]]
-== Preset ERC20 contract
-A preset ERC20 is available, https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.7/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol[`ERC20PresetMinterPauser`]. It is preset to allow for token minting (create), stop all token transfers (pause) and allow holders to burn (destroy) their tokens. The contract uses xref:access-control.adoc[Access Control] to control access to the minting and pausing functionality.  The account that deploys the contract will be granted the minter and pauser roles, as well as the default admin role.
-
-This contract is ready to deploy without having to write any Solidity code.  It can be used as-is for quick prototyping and testing, but is also suitable for production environments.
-
-NOTE: Contract presets are now deprecated in favor of https://wizard.openzeppelin.com[Contracts Wizard] as a more powerful alternative.

+ 0 - 8
docs/modules/ROOT/pages/erc721.adoc

@@ -80,11 +80,3 @@ For more information about the `tokenURI` metadata JSON Schema, check out the ht
 NOTE: You'll notice that the item's information is included in the metadata, but that information isn't on-chain! So a game developer could change the underlying metadata, changing the rules of the game! 
 
 TIP: If you'd like to put all item information on-chain, you can extend ERC721 to do so (though it will be rather costly) by providing a xref:utilities.adoc#base64[`Base64`] Data URI with the JSON schema encoded. You could also leverage IPFS to store the tokenURI information, but these techniques are out of the scope of this overview guide.
-
-[[Presets]]
-== Preset ERC721 contract
-A preset ERC721 is available, https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.7/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol[`ERC721PresetMinterPauserAutoId`]. It is preconfigured with token minting (creation) with token ID and URI auto generation, the ability to stop all token transfers (pause), and it allows holders to burn (destroy) their tokens. The contract uses xref:access-control.adoc[Access Control] to control access to the minting and pausing functionality.  The account that deploys the contract will be granted the minter and pauser roles, as well as the default admin role.
-
-This contract is ready to deploy without having to write any Solidity code. It can be used as-is for quick prototyping and testing but is also suitable for production environments.
-
-NOTE: Contract presets are now deprecated in favor of https://wizard.openzeppelin.com[Contracts Wizard] as a more powerful alternative.

+ 0 - 3
package-lock.json

@@ -8,9 +8,6 @@
       "name": "openzeppelin-solidity",
       "version": "4.7.0",
       "license": "MIT",
-      "bin": {
-        "openzeppelin-contracts-migrate-imports": "scripts/migrate-imports.js"
-      },
       "devDependencies": {
         "@nomicfoundation/hardhat-network-helpers": "^1.0.3",
         "@nomiclabs/hardhat-truffle5": "^2.0.5",

+ 0 - 3
package.json

@@ -7,9 +7,6 @@
     "/build/contracts/*.json",
     "!/contracts/mocks/**/*"
   ],
-  "bin": {
-    "openzeppelin-contracts-migrate-imports": "scripts/migrate-imports.js"
-  },
   "scripts": {
     "compile": "hardhat compile",
     "coverage": "env COVERAGE=true hardhat coverage",

+ 0 - 29
test/migrate-imports.test.js

@@ -1,29 +0,0 @@
-const path = require('path');
-const { promises: fs, constants: { F_OK } } = require('fs');
-const { expect } = require('chai');
-
-const { pathUpdates, updateImportPaths, getUpgradeablePath } = require('../scripts/migrate-imports.js');
-
-describe('migrate-imports.js', function () {
-  it('every new path exists', async function () {
-    for (const p of Object.values(pathUpdates)) {
-      try {
-        await fs.access(path.join('contracts', p), F_OK);
-      } catch (e) {
-        await fs.access(path.join('contracts', getUpgradeablePath(p)), F_OK);
-      }
-    }
-  });
-
-  it('replaces import paths in a file', async function () {
-    const source = `
-import '@openzeppelin/contracts/math/Math.sol';
-import '@openzeppelin/contracts-upgradeable/math/MathUpgradeable.sol';
-    `;
-    const expected = `
-import '@openzeppelin/contracts/utils/math/Math.sol';
-import '@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol';
-    `;
-    expect(updateImportPaths(source)).to.equal(expected);
-  });
-});

+ 0 - 146
test/token/ERC1155/presets/ERC1155PresetMinterPauser.test.js

@@ -1,146 +0,0 @@
-const { BN, constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers');
-const { ZERO_ADDRESS } = constants;
-const { shouldSupportInterfaces } = require('../../../utils/introspection/SupportsInterface.behavior');
-
-const { expect } = require('chai');
-
-const ERC1155PresetMinterPauser = artifacts.require('ERC1155PresetMinterPauser');
-
-contract('ERC1155PresetMinterPauser', function (accounts) {
-  const [ deployer, other ] = accounts;
-
-  const firstTokenId = new BN('845');
-  const firstTokenIdAmount = new BN('5000');
-
-  const secondTokenId = new BN('48324');
-  const secondTokenIdAmount = new BN('77875');
-
-  const DEFAULT_ADMIN_ROLE = '0x0000000000000000000000000000000000000000000000000000000000000000';
-  const MINTER_ROLE = web3.utils.soliditySha3('MINTER_ROLE');
-  const PAUSER_ROLE = web3.utils.soliditySha3('PAUSER_ROLE');
-
-  const uri = 'https://token.com';
-
-  beforeEach(async function () {
-    this.token = await ERC1155PresetMinterPauser.new(uri, { from: deployer });
-  });
-
-  shouldSupportInterfaces(['ERC1155', 'AccessControl', 'AccessControlEnumerable']);
-
-  it('deployer has the default admin role', async function () {
-    expect(await this.token.getRoleMemberCount(DEFAULT_ADMIN_ROLE)).to.be.bignumber.equal('1');
-    expect(await this.token.getRoleMember(DEFAULT_ADMIN_ROLE, 0)).to.equal(deployer);
-  });
-
-  it('deployer has the minter role', async function () {
-    expect(await this.token.getRoleMemberCount(MINTER_ROLE)).to.be.bignumber.equal('1');
-    expect(await this.token.getRoleMember(MINTER_ROLE, 0)).to.equal(deployer);
-  });
-
-  it('deployer has the pauser role', async function () {
-    expect(await this.token.getRoleMemberCount(PAUSER_ROLE)).to.be.bignumber.equal('1');
-    expect(await this.token.getRoleMember(PAUSER_ROLE, 0)).to.equal(deployer);
-  });
-
-  it('minter and pauser role admin is the default admin', async function () {
-    expect(await this.token.getRoleAdmin(MINTER_ROLE)).to.equal(DEFAULT_ADMIN_ROLE);
-    expect(await this.token.getRoleAdmin(PAUSER_ROLE)).to.equal(DEFAULT_ADMIN_ROLE);
-  });
-
-  describe('minting', function () {
-    it('deployer can mint tokens', async function () {
-      const receipt = await this.token.mint(other, firstTokenId, firstTokenIdAmount, '0x', { from: deployer });
-      expectEvent(receipt, 'TransferSingle',
-        { operator: deployer, from: ZERO_ADDRESS, to: other, value: firstTokenIdAmount, id: firstTokenId },
-      );
-
-      expect(await this.token.balanceOf(other, firstTokenId)).to.be.bignumber.equal(firstTokenIdAmount);
-    });
-
-    it('other accounts cannot mint tokens', async function () {
-      await expectRevert(
-        this.token.mint(other, firstTokenId, firstTokenIdAmount, '0x', { from: other }),
-        'ERC1155PresetMinterPauser: must have minter role to mint',
-      );
-    });
-  });
-
-  describe('batched minting', function () {
-    it('deployer can batch mint tokens', async function () {
-      const receipt = await this.token.mintBatch(
-        other, [firstTokenId, secondTokenId], [firstTokenIdAmount, secondTokenIdAmount], '0x', { from: deployer },
-      );
-
-      expectEvent(receipt, 'TransferBatch',
-        { operator: deployer, from: ZERO_ADDRESS, to: other },
-      );
-
-      expect(await this.token.balanceOf(other, firstTokenId)).to.be.bignumber.equal(firstTokenIdAmount);
-    });
-
-    it('other accounts cannot batch mint tokens', async function () {
-      await expectRevert(
-        this.token.mintBatch(
-          other, [firstTokenId, secondTokenId], [firstTokenIdAmount, secondTokenIdAmount], '0x', { from: other },
-        ),
-        'ERC1155PresetMinterPauser: must have minter role to mint',
-      );
-    });
-  });
-
-  describe('pausing', function () {
-    it('deployer can pause', async function () {
-      const receipt = await this.token.pause({ from: deployer });
-      expectEvent(receipt, 'Paused', { account: deployer });
-
-      expect(await this.token.paused()).to.equal(true);
-    });
-
-    it('deployer can unpause', async function () {
-      await this.token.pause({ from: deployer });
-
-      const receipt = await this.token.unpause({ from: deployer });
-      expectEvent(receipt, 'Unpaused', { account: deployer });
-
-      expect(await this.token.paused()).to.equal(false);
-    });
-
-    it('cannot mint while paused', async function () {
-      await this.token.pause({ from: deployer });
-
-      await expectRevert(
-        this.token.mint(other, firstTokenId, firstTokenIdAmount, '0x', { from: deployer }),
-        'ERC1155Pausable: token transfer while paused',
-      );
-    });
-
-    it('other accounts cannot pause', async function () {
-      await expectRevert(
-        this.token.pause({ from: other }),
-        'ERC1155PresetMinterPauser: must have pauser role to pause',
-      );
-    });
-
-    it('other accounts cannot unpause', async function () {
-      await this.token.pause({ from: deployer });
-
-      await expectRevert(
-        this.token.unpause({ from: other }),
-        'ERC1155PresetMinterPauser: must have pauser role to unpause',
-      );
-    });
-  });
-
-  describe('burning', function () {
-    it('holders can burn their tokens', async function () {
-      await this.token.mint(other, firstTokenId, firstTokenIdAmount, '0x', { from: deployer });
-
-      const receipt = await this.token.burn(other, firstTokenId, firstTokenIdAmount.subn(1), { from: other });
-      expectEvent(receipt, 'TransferSingle',
-        { operator: other, from: other, to: ZERO_ADDRESS, value: firstTokenIdAmount.subn(1), id: firstTokenId },
-      );
-
-      expect(await this.token.balanceOf(other, firstTokenId)).to.be.bignumber.equal('1');
-    });
-  });
-});

+ 0 - 42
test/token/ERC20/presets/ERC20PresetFixedSupply.test.js

@@ -1,42 +0,0 @@
-const { BN, constants, expectEvent } = require('@openzeppelin/test-helpers');
-const { ZERO_ADDRESS } = constants;
-
-const { expect } = require('chai');
-
-const ERC20PresetFixedSupply = artifacts.require('ERC20PresetFixedSupply');
-
-contract('ERC20PresetFixedSupply', function (accounts) {
-  const [deployer, owner] = accounts;
-
-  const name = 'PresetFixedSupply';
-  const symbol = 'PFS';
-
-  const initialSupply = new BN('50000');
-  const amount = new BN('10000');
-
-  before(async function () {
-    this.token = await ERC20PresetFixedSupply.new(name, symbol, initialSupply, owner, { from: deployer });
-  });
-
-  it('deployer has the balance equal to initial supply', async function () {
-    expect(await this.token.balanceOf(owner)).to.be.bignumber.equal(initialSupply);
-  });
-
-  it('total supply is equal to initial supply', async function () {
-    expect(await this.token.totalSupply()).to.be.bignumber.equal(initialSupply);
-  });
-
-  describe('burning', function () {
-    it('holders can burn their tokens', async function () {
-      const remainingBalance = initialSupply.sub(amount);
-      const receipt = await this.token.burn(amount, { from: owner });
-      expectEvent(receipt, 'Transfer', { from: owner, to: ZERO_ADDRESS, value: amount });
-      expect(await this.token.balanceOf(owner)).to.be.bignumber.equal(remainingBalance);
-    });
-
-    it('decrements totalSupply', async function () {
-      const expectedSupply = initialSupply.sub(amount);
-      expect(await this.token.totalSupply()).to.be.bignumber.equal(expectedSupply);
-    });
-  });
-});

+ 0 - 113
test/token/ERC20/presets/ERC20PresetMinterPauser.test.js

@@ -1,113 +0,0 @@
-const { BN, constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers');
-const { ZERO_ADDRESS } = constants;
-
-const { expect } = require('chai');
-
-const ERC20PresetMinterPauser = artifacts.require('ERC20PresetMinterPauser');
-
-contract('ERC20PresetMinterPauser', function (accounts) {
-  const [ deployer, other ] = accounts;
-
-  const name = 'MinterPauserToken';
-  const symbol = 'DRT';
-
-  const amount = new BN('5000');
-
-  const DEFAULT_ADMIN_ROLE = '0x0000000000000000000000000000000000000000000000000000000000000000';
-  const MINTER_ROLE = web3.utils.soliditySha3('MINTER_ROLE');
-  const PAUSER_ROLE = web3.utils.soliditySha3('PAUSER_ROLE');
-
-  beforeEach(async function () {
-    this.token = await ERC20PresetMinterPauser.new(name, symbol, { from: deployer });
-  });
-
-  it('deployer has the default admin role', async function () {
-    expect(await this.token.getRoleMemberCount(DEFAULT_ADMIN_ROLE)).to.be.bignumber.equal('1');
-    expect(await this.token.getRoleMember(DEFAULT_ADMIN_ROLE, 0)).to.equal(deployer);
-  });
-
-  it('deployer has the minter role', async function () {
-    expect(await this.token.getRoleMemberCount(MINTER_ROLE)).to.be.bignumber.equal('1');
-    expect(await this.token.getRoleMember(MINTER_ROLE, 0)).to.equal(deployer);
-  });
-
-  it('deployer has the pauser role', async function () {
-    expect(await this.token.getRoleMemberCount(PAUSER_ROLE)).to.be.bignumber.equal('1');
-    expect(await this.token.getRoleMember(PAUSER_ROLE, 0)).to.equal(deployer);
-  });
-
-  it('minter and pauser role admin is the default admin', async function () {
-    expect(await this.token.getRoleAdmin(MINTER_ROLE)).to.equal(DEFAULT_ADMIN_ROLE);
-    expect(await this.token.getRoleAdmin(PAUSER_ROLE)).to.equal(DEFAULT_ADMIN_ROLE);
-  });
-
-  describe('minting', function () {
-    it('deployer can mint tokens', async function () {
-      const receipt = await this.token.mint(other, amount, { from: deployer });
-      expectEvent(receipt, 'Transfer', { from: ZERO_ADDRESS, to: other, value: amount });
-
-      expect(await this.token.balanceOf(other)).to.be.bignumber.equal(amount);
-    });
-
-    it('other accounts cannot mint tokens', async function () {
-      await expectRevert(
-        this.token.mint(other, amount, { from: other }),
-        'ERC20PresetMinterPauser: must have minter role to mint',
-      );
-    });
-  });
-
-  describe('pausing', function () {
-    it('deployer can pause', async function () {
-      const receipt = await this.token.pause({ from: deployer });
-      expectEvent(receipt, 'Paused', { account: deployer });
-
-      expect(await this.token.paused()).to.equal(true);
-    });
-
-    it('deployer can unpause', async function () {
-      await this.token.pause({ from: deployer });
-
-      const receipt = await this.token.unpause({ from: deployer });
-      expectEvent(receipt, 'Unpaused', { account: deployer });
-
-      expect(await this.token.paused()).to.equal(false);
-    });
-
-    it('cannot mint while paused', async function () {
-      await this.token.pause({ from: deployer });
-
-      await expectRevert(
-        this.token.mint(other, amount, { from: deployer }),
-        'ERC20Pausable: token transfer while paused',
-      );
-    });
-
-    it('other accounts cannot pause', async function () {
-      await expectRevert(
-        this.token.pause({ from: other }),
-        'ERC20PresetMinterPauser: must have pauser role to pause',
-      );
-    });
-
-    it('other accounts cannot unpause', async function () {
-      await this.token.pause({ from: deployer });
-
-      await expectRevert(
-        this.token.unpause({ from: other }),
-        'ERC20PresetMinterPauser: must have pauser role to unpause',
-      );
-    });
-  });
-
-  describe('burning', function () {
-    it('holders can burn their tokens', async function () {
-      await this.token.mint(other, amount, { from: deployer });
-
-      const receipt = await this.token.burn(amount.subn(1), { from: other });
-      expectEvent(receipt, 'Transfer', { from: other, to: ZERO_ADDRESS, value: amount.subn(1) });
-
-      expect(await this.token.balanceOf(other)).to.be.bignumber.equal('1');
-    });
-  });
-});

+ 0 - 125
test/token/ERC721/presets/ERC721PresetMinterPauserAutoId.test.js

@@ -1,125 +0,0 @@
-const { BN, constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers');
-const { ZERO_ADDRESS } = constants;
-const { shouldSupportInterfaces } = require('../../../utils/introspection/SupportsInterface.behavior');
-
-const { expect } = require('chai');
-
-const ERC721PresetMinterPauserAutoId = artifacts.require('ERC721PresetMinterPauserAutoId');
-
-contract('ERC721PresetMinterPauserAutoId', function (accounts) {
-  const [ deployer, other ] = accounts;
-
-  const name = 'MinterAutoIDToken';
-  const symbol = 'MAIT';
-  const baseURI = 'my.app/';
-
-  const DEFAULT_ADMIN_ROLE = '0x0000000000000000000000000000000000000000000000000000000000000000';
-  const MINTER_ROLE = web3.utils.soliditySha3('MINTER_ROLE');
-
-  beforeEach(async function () {
-    this.token = await ERC721PresetMinterPauserAutoId.new(name, symbol, baseURI, { from: deployer });
-  });
-
-  shouldSupportInterfaces(['ERC721', 'ERC721Enumerable', 'AccessControl', 'AccessControlEnumerable']);
-
-  it('token has correct name', async function () {
-    expect(await this.token.name()).to.equal(name);
-  });
-
-  it('token has correct symbol', async function () {
-    expect(await this.token.symbol()).to.equal(symbol);
-  });
-
-  it('deployer has the default admin role', async function () {
-    expect(await this.token.getRoleMemberCount(DEFAULT_ADMIN_ROLE)).to.be.bignumber.equal('1');
-    expect(await this.token.getRoleMember(DEFAULT_ADMIN_ROLE, 0)).to.equal(deployer);
-  });
-
-  it('deployer has the minter role', async function () {
-    expect(await this.token.getRoleMemberCount(MINTER_ROLE)).to.be.bignumber.equal('1');
-    expect(await this.token.getRoleMember(MINTER_ROLE, 0)).to.equal(deployer);
-  });
-
-  it('minter role admin is the default admin', async function () {
-    expect(await this.token.getRoleAdmin(MINTER_ROLE)).to.equal(DEFAULT_ADMIN_ROLE);
-  });
-
-  describe('minting', function () {
-    it('deployer can mint tokens', async function () {
-      const tokenId = new BN('0');
-
-      const receipt = await this.token.mint(other, { from: deployer });
-      expectEvent(receipt, 'Transfer', { from: ZERO_ADDRESS, to: other, tokenId });
-
-      expect(await this.token.balanceOf(other)).to.be.bignumber.equal('1');
-      expect(await this.token.ownerOf(tokenId)).to.equal(other);
-
-      expect(await this.token.tokenURI(tokenId)).to.equal(baseURI + tokenId);
-    });
-
-    it('other accounts cannot mint tokens', async function () {
-      await expectRevert(
-        this.token.mint(other, { from: other }),
-        'ERC721PresetMinterPauserAutoId: must have minter role to mint',
-      );
-    });
-  });
-
-  describe('pausing', function () {
-    it('deployer can pause', async function () {
-      const receipt = await this.token.pause({ from: deployer });
-      expectEvent(receipt, 'Paused', { account: deployer });
-
-      expect(await this.token.paused()).to.equal(true);
-    });
-
-    it('deployer can unpause', async function () {
-      await this.token.pause({ from: deployer });
-
-      const receipt = await this.token.unpause({ from: deployer });
-      expectEvent(receipt, 'Unpaused', { account: deployer });
-
-      expect(await this.token.paused()).to.equal(false);
-    });
-
-    it('cannot mint while paused', async function () {
-      await this.token.pause({ from: deployer });
-
-      await expectRevert(
-        this.token.mint(other, { from: deployer }),
-        'ERC721Pausable: token transfer while paused',
-      );
-    });
-
-    it('other accounts cannot pause', async function () {
-      await expectRevert(
-        this.token.pause({ from: other }),
-        'ERC721PresetMinterPauserAutoId: must have pauser role to pause',
-      );
-    });
-
-    it('other accounts cannot unpause', async function () {
-      await this.token.pause({ from: deployer });
-
-      await expectRevert(
-        this.token.unpause({ from: other }),
-        'ERC721PresetMinterPauserAutoId: must have pauser role to unpause',
-      );
-    });
-  });
-
-  describe('burning', function () {
-    it('holders can burn their tokens', async function () {
-      const tokenId = new BN('0');
-
-      await this.token.mint(other, { from: deployer });
-
-      const receipt = await this.token.burn(tokenId, { from: other });
-
-      expectEvent(receipt, 'Transfer', { from: other, to: ZERO_ADDRESS, tokenId });
-
-      expect(await this.token.balanceOf(other)).to.be.bignumber.equal('0');
-      expect(await this.token.totalSupply()).to.be.bignumber.equal('0');
-    });
-  });
-});

+ 0 - 49
test/token/ERC777/presets/ERC777PresetFixedSupply.test.js

@@ -1,49 +0,0 @@
-const { BN, singletons } = require('@openzeppelin/test-helpers');
-
-const { expect } = require('chai');
-
-const ERC777PresetFixedSupply = artifacts.require('ERC777PresetFixedSupply');
-
-contract('ERC777PresetFixedSupply', function (accounts) {
-  const [registryFunder, owner, defaultOperatorA, defaultOperatorB, anyone] = accounts;
-
-  const initialSupply = new BN('10000');
-  const name = 'ERC777Preset';
-  const symbol = '777P';
-
-  const defaultOperators = [defaultOperatorA, defaultOperatorB];
-
-  before(async function () {
-    await singletons.ERC1820Registry(registryFunder);
-  });
-
-  beforeEach(async function () {
-    this.token = await ERC777PresetFixedSupply.new(name, symbol, defaultOperators, initialSupply, owner);
-  });
-
-  it('returns the name', async function () {
-    expect(await this.token.name()).to.equal(name);
-  });
-
-  it('returns the symbol', async function () {
-    expect(await this.token.symbol()).to.equal(symbol);
-  });
-
-  it('returns the default operators', async function () {
-    expect(await this.token.defaultOperators()).to.deep.equal(defaultOperators);
-  });
-
-  it('default operators are operators for all accounts', async function () {
-    for (const operator of defaultOperators) {
-      expect(await this.token.isOperatorFor(operator, anyone)).to.equal(true);
-    }
-  });
-
-  it('returns the total supply equal to initial supply', async function () {
-    expect(await this.token.totalSupply()).to.be.bignumber.equal(initialSupply);
-  });
-
-  it('returns the balance of owner equal to initial supply', async function () {
-    expect(await this.token.balanceOf(owner)).to.be.bignumber.equal(initialSupply);
-  });
-});